feat(web): add csv template

This commit is contained in:
zhaoying
2026-05-07 19:11:24 +08:00
parent 7f9dcaebfb
commit 6a43623aa3
4 changed files with 111 additions and 98 deletions

View File

@@ -0,0 +1 @@
Q A
1 Q A

View File

@@ -951,7 +951,8 @@ export const en = {
feishuFolderToken: 'Folder Token',
feishuFolderTokenRequired: 'Please enter Folder Token',
feishuFolderTokenPlaceholder: 'Enter your Feishu Folder Token',
}
},
csvTemplate: 'Click to download CSV template',
},
api: {
pageTitle: 'Memory library IAP document',

View File

@@ -438,7 +438,8 @@ export const zh = {
feishuFolderToken: '文件夹 Token',
feishuFolderTokenRequired: '请输入文件夹 Token',
feishuFolderTokenPlaceholder: '请输入您的飞书文件夹 Token',
}
},
csvTemplate: '点击下载 CSV 模板',
},
application: {
searchPlaceholder: '搜索应用',

View File

@@ -596,7 +596,7 @@ const CreateDataset = () => {
</div> }
<div className='rb:bg-white rb:rounded-xl rb:flex-1 rb:mt-3'>
{current === 0 && (
{current === 0 && (<>
<div className='rb:flex rb:w-full rb:p-6'>
{source && (source === 'local' || source === 'csv') && (
<UploadFiles
@@ -638,7 +638,8 @@ const CreateDataset = () => {
// Also allow removal in other cases (such as failed uploads)
return true;
}} />
}}
/>
)}
{source && source === 'link' && (
<div className='rb:flex rb:w-full rb:flex-col rb:mt-10 rb:px-40'>
@@ -700,7 +701,16 @@ const CreateDataset = () => {
</div>
)}
</div>
)}
{source === 'csv' &&
<a
href="@/assets/csv_template.csv"
download="csv_template.csv"
className='rb:mx-6 rb:text-sm rb:font-medium rb:text-gray-800 rb:-mt-6!'
>
{t('knowledgeBase.csvTemplate')}
</a>
}
</>)}
{current === 1 && (
<div className='rb:flex rb:flex-col rb:mt-10 rb:px-40'>