提交 0fca4c95 作者: imClumsyPanda

Merge remote-tracking branch 'origin/dev' into dev

...@@ -32,3 +32,6 @@ export const deletefile = (params: any) => { ...@@ -32,3 +32,6 @@ export const deletefile = (params: any) => {
data: JSON.stringify(params), data: JSON.stringify(params),
}) })
} }
export const web_url = () => {
return window.location.origin
}
...@@ -3,7 +3,7 @@ import { onMounted, ref, toRef } from 'vue' ...@@ -3,7 +3,7 @@ import { onMounted, ref, toRef } from 'vue'
import { NInput, NP, NPopconfirm, NScrollbar, NText, NUpload, NUploadDragger } from 'naive-ui' import { NInput, NP, NPopconfirm, NScrollbar, NText, NUpload, NUploadDragger } from 'naive-ui'
import { SvgIcon } from '@/components/common' import { SvgIcon } from '@/components/common'
import { useChatStore } from '@/store' import { useChatStore } from '@/store'
import { deletefile, getfilelist } from '@/api/chat' import { deletefile, getfilelist, web_url } from '@/api/chat'
const knowledge = defineProps({ const knowledge = defineProps({
knowledgebaseid: { knowledgebaseid: {
type: String, // 类型字符串 type: String, // 类型字符串
...@@ -35,13 +35,14 @@ function handleEnter({ uuid }: Chat.History, isEdit: boolean, event: KeyboardEve ...@@ -35,13 +35,14 @@ function handleEnter({ uuid }: Chat.History, isEdit: boolean, event: KeyboardEve
if (event.key === 'Enter') if (event.key === 'Enter')
chatStore.updateHistory(uuid, { isEdit }) chatStore.updateHistory(uuid, { isEdit })
} }
console.log(`${web_url()}/api/local_doc_qa/upload_file`)
</script> </script>
<template> <template>
<NUpload <NUpload
multiple multiple
directory-dnd directory-dnd
action="http://127.0.0.1:1002/api/local_doc_qa/upload_file" :action="`${web_url()}/api/local_doc_qa/upload_file`"
:headers="{ :headers="{
'naive-info': 'hello!', 'naive-info': 'hello!',
}" }"
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论