diff --git a/ui/src/components/ai-chat/component/chat-input-operate/index.vue b/ui/src/components/ai-chat/component/chat-input-operate/index.vue index 6a05bf55c..7a12f3633 100644 --- a/ui/src/components/ai-chat/component/chat-input-operate/index.vue +++ b/ui/src/components/ai-chat/component/chat-input-operate/index.vue @@ -359,7 +359,7 @@ const imageExtensions = ['JPG', 'JPEG', 'PNG', 'GIF', 'BMP'] const documentExtensions = ['PDF', 'DOCX', 'TXT', 'XLS', 'XLSX', 'MD', 'HTML', 'CSV'] const videoExtensions: any = [] const audioExtensions = ['MP3', 'WAV', 'OGG', 'AAC', 'M4A'] -let otherExtensions = ['PPT', 'DOC'] +let otherExtensions = ref(['PPT', 'DOC']) const getAcceptList = () => { const { image, document, audio, video, other } = props.applicationDetails.file_upload_setting @@ -378,8 +378,8 @@ const getAcceptList = () => { } if (other) { // 其他文件类型 - otherExtensions = props.applicationDetails.file_upload_setting.otherExtensions - accepts = [...accepts, ...otherExtensions] + otherExtensions.value = props.applicationDetails.file_upload_setting.otherExtensions + accepts = [...accepts, ...otherExtensions.value] } if (accepts.length === 0) { @@ -507,7 +507,12 @@ const uploadImageList = computed(() => fileFilter(fileAllList.value, imageExtens const uploadDocumentList = computed(() => fileFilter(fileAllList.value, documentExtensions)) const uploadVideoList = computed(() => fileFilter(fileAllList.value, videoExtensions)) const uploadAudioList = computed(() => fileFilter(fileAllList.value, audioExtensions)) -const uploadOtherList = computed(() => fileFilter(fileAllList.value, otherExtensions)) +const uploadOtherList = computed(() => + fileFilter( + fileAllList.value, + otherExtensions.value.map((item) => item.toUpperCase()), + ), +) const showDelete = ref('')