mirror of
https://github.com/1Panel-dev/MaxKB.git
synced 2025-12-26 01:33:05 +00:00
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>,
|
||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||
return exportExcel(
|
||||
document_name + '.xlsx',
|
||||
document_name.trim() + '.xlsx',
|
||||
`${prefix.value}/${knowledge_id}/document/${document_id}/export`,
|
||||
{},
|
||||
loading,
|
||||
|
|
@ -180,7 +180,7 @@ const exportDocumentZip: (
|
|||
loading?: Ref<boolean>,
|
||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||
return exportFile(
|
||||
document_name + '.zip',
|
||||
document_name.trim() + '.zip',
|
||||
`${prefix.value}/${knowledge_id}/document/${document_id}/export_zip`,
|
||||
{},
|
||||
loading,
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ const exportDocument: (
|
|||
loading?: Ref<boolean>,
|
||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||
return exportExcel(
|
||||
document_name + '.xlsx',
|
||||
document_name.trim() + '.xlsx',
|
||||
`${prefix}/${knowledge_id}/document/${document_id}/export`,
|
||||
{},
|
||||
loading,
|
||||
|
|
@ -170,7 +170,7 @@ const exportDocumentZip: (
|
|||
loading?: Ref<boolean>,
|
||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||
return exportFile(
|
||||
document_name + '.zip',
|
||||
document_name.trim() + '.zip',
|
||||
`${prefix}/${knowledge_id}/document/${document_id}/export_zip`,
|
||||
{},
|
||||
loading,
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ const exportDocument: (
|
|||
loading?: Ref<boolean>,
|
||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||
return exportExcel(
|
||||
document_name + '.xlsx',
|
||||
document_name.trim() + '.xlsx',
|
||||
`${prefix}/${knowledge_id}/document/${document_id}/export`,
|
||||
{},
|
||||
loading,
|
||||
|
|
@ -170,7 +170,7 @@ const exportDocumentZip: (
|
|||
loading?: Ref<boolean>,
|
||||
) => Promise<any> = (document_name, knowledge_id, document_id, loading) => {
|
||||
return exportFile(
|
||||
document_name + '.zip',
|
||||
document_name.trim() + '.zip',
|
||||
`${prefix}/${knowledge_id}/document/${document_id}/export_zip`,
|
||||
{},
|
||||
loading,
|
||||
|
|
|
|||
Loading…
Reference in New Issue