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 de3c86b88..0df6a1658 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
@@ -182,6 +182,7 @@
@keydown.enter="sendChatHandle($event)"
@paste="handlePaste"
@drop="handleDrop"
+ @dragover.prevent="handleDragOver"
/>
@@ -488,6 +489,7 @@ const handlePaste = (event: ClipboardEvent) => {
// 阻止默认粘贴行为
event.preventDefault()
}
+
// 新增拖拽处理
const handleDrop = (event: DragEvent) => {
if (!props.applicationDetails.file_upload_enable) return
@@ -507,6 +509,12 @@ const handleDrop = (event: DragEvent) => {
uploadFile(elFile, [elFile])
})
}
+
+const handleDragOver = (event: DragEvent) => {
+ if (event.dataTransfer) {
+ event.dataTransfer.dropEffect = 'copy' // Firefox需要这一行来允许放置操作
+ }
+}
// 语音录制任务id
const intervalId = ref
(null)
// 语音录制开始秒数
diff --git a/ui/src/views/application-workflow/index.vue b/ui/src/views/application-workflow/index.vue
index d623968a9..e6a95cbf0 100644
--- a/ui/src/views/application-workflow/index.vue
+++ b/ui/src/views/application-workflow/index.vue
@@ -3,7 +3,7 @@