fix: trim whitespace from document name in export functions
--bug=1058737 --user=刘瑞斌 【共享资源】web知识库文档中导出excel文档,导出默认文档名称优化 https://www.tapd.cn/62980211/s/1731548
This commit is contained in:
parent
26df300105
commit
2520461544
@ -159,7 +159,7 @@ const exportDocument: (
|
|||||||
loading?: Ref<boolean>,
|
loading?: Ref<boolean>,
|
||||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||||
return exportExcel(
|
return exportExcel(
|
||||||
document_name + '.xlsx',
|
document_name.trim() + '.xlsx',
|
||||||
`${prefix.value}/${knowledge_id}/document/${document_id}/export`,
|
`${prefix.value}/${knowledge_id}/document/${document_id}/export`,
|
||||||
{},
|
{},
|
||||||
loading,
|
loading,
|
||||||
@ -180,7 +180,7 @@ const exportDocumentZip: (
|
|||||||
loading?: Ref<boolean>,
|
loading?: Ref<boolean>,
|
||||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||||
return exportFile(
|
return exportFile(
|
||||||
document_name + '.zip',
|
document_name.trim() + '.zip',
|
||||||
`${prefix.value}/${knowledge_id}/document/${document_id}/export_zip`,
|
`${prefix.value}/${knowledge_id}/document/${document_id}/export_zip`,
|
||||||
{},
|
{},
|
||||||
loading,
|
loading,
|
||||||
|
|||||||
@ -149,7 +149,7 @@ const exportDocument: (
|
|||||||
loading?: Ref<boolean>,
|
loading?: Ref<boolean>,
|
||||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||||
return exportExcel(
|
return exportExcel(
|
||||||
document_name + '.xlsx',
|
document_name.trim() + '.xlsx',
|
||||||
`${prefix}/${knowledge_id}/document/${document_id}/export`,
|
`${prefix}/${knowledge_id}/document/${document_id}/export`,
|
||||||
{},
|
{},
|
||||||
loading,
|
loading,
|
||||||
@ -170,7 +170,7 @@ const exportDocumentZip: (
|
|||||||
loading?: Ref<boolean>,
|
loading?: Ref<boolean>,
|
||||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||||
return exportFile(
|
return exportFile(
|
||||||
document_name + '.zip',
|
document_name.trim() + '.zip',
|
||||||
`${prefix}/${knowledge_id}/document/${document_id}/export_zip`,
|
`${prefix}/${knowledge_id}/document/${document_id}/export_zip`,
|
||||||
{},
|
{},
|
||||||
loading,
|
loading,
|
||||||
|
|||||||
@ -149,7 +149,7 @@ const exportDocument: (
|
|||||||
loading?: Ref<boolean>,
|
loading?: Ref<boolean>,
|
||||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||||
return exportExcel(
|
return exportExcel(
|
||||||
document_name + '.xlsx',
|
document_name.trim() + '.xlsx',
|
||||||
`${prefix}/${knowledge_id}/document/${document_id}/export`,
|
`${prefix}/${knowledge_id}/document/${document_id}/export`,
|
||||||
{},
|
{},
|
||||||
loading,
|
loading,
|
||||||
@ -170,7 +170,7 @@ const exportDocumentZip: (
|
|||||||
loading?: Ref<boolean>,
|
loading?: Ref<boolean>,
|
||||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||||
return exportFile(
|
return exportFile(
|
||||||
document_name + '.zip',
|
document_name.trim() + '.zip',
|
||||||
`${prefix}/${knowledge_id}/document/${document_id}/export_zip`,
|
`${prefix}/${knowledge_id}/document/${document_id}/export_zip`,
|
||||||
{},
|
{},
|
||||||
loading,
|
loading,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user