fix(knowledge): 优化多文件上传体验

This commit is contained in:
v-zhangjc9
2025-05-28 15:40:57 +08:00
parent 3ee6303cf5
commit 7fd484eeab
2 changed files with 17 additions and 1 deletions

View File

@@ -50,6 +50,7 @@ const DataImport: React.FC = () => {
{
body: [
{
id: 'a5219cc7-72dd-4199-9eeb-61305fe41075',
type: 'form',
wrapWithPanel: false,
actions: [],
@@ -93,6 +94,7 @@ const DataImport: React.FC = () => {
{
visibleOn: 'type === \'text\'',
type: 'editor',
required: true,
label: '数据内容',
name: 'content',
language: 'plaintext',
@@ -104,6 +106,7 @@ const DataImport: React.FC = () => {
{
visibleOn: 'type === \'file\'',
type: 'input-file',
required: true,
name: 'files',
label: '数据文件',
autoUpload: false,
@@ -144,9 +147,14 @@ const DataImport: React.FC = () => {
type: 'button-toolbar',
buttons: [
{
type: 'action',
type: 'reset',
label: '重置'
},
{
type: 'submit',
label: '预览',
actionType: 'ajax',
level: 'secondary',
api: {
method: 'post',
url: 'http://127.0.0.1:8080/knowledge/preview_text',