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 bb29ba29f..4ca225bd9 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 @@ -24,7 +24,7 @@ -
+
{{ item && item?.name }}
diff --git a/ui/src/components/ai-chat/component/question-content/index.vue b/ui/src/components/ai-chat/component/question-content/index.vue index 6c0bd3915..28355a6e5 100644 --- a/ui/src/components/ai-chat/component/question-content/index.vue +++ b/ui/src/components/ai-chat/component/question-content/index.vue @@ -18,10 +18,13 @@
- + diff --git a/ui/src/utils/utils.ts b/ui/src/utils/utils.ts index b4a87f38c..066399032 100644 --- a/ui/src/utils/utils.ts +++ b/ui/src/utils/utils.ts @@ -88,3 +88,14 @@ export function getAttrsArray(array: Array, attr: string) { export function getSum(array: Array) { return array.reduce((total, item) => total + item, 0) } + +// 下载 +export function downloadByURL(url: string, name: string) { + const a = document.createElement('a') + a.setAttribute('href', url) + a.setAttribute('target', '_blank') + a.setAttribute('download', name) + document.body.appendChild(a) + a.click() + document.body.removeChild(a) +}