mirror of
https://github.com/RYDE-WORK/Langchain-Chatchat.git
synced 2026-02-07 15:38:27 +08:00
打包配置
This commit is contained in:
parent
458ed26b79
commit
537269d5c4
@ -5,7 +5,7 @@ import axios from 'axios'
|
|||||||
import { useMessage } from 'naive-ui'
|
import { useMessage } from 'naive-ui'
|
||||||
const instance = axios.create({
|
const instance = axios.create({
|
||||||
// process.env.NODE_ENV === 'development' 来判断是否开发环境
|
// process.env.NODE_ENV === 'development' 来判断是否开发环境
|
||||||
baseURL: window.baseApi,
|
baseURL: window.baseApi ?? '/api',
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/json;charset=UTF-8',
|
'Content-Type': 'application/json;charset=UTF-8',
|
||||||
},
|
},
|
||||||
|
|||||||
3
views/src/global.d.ts
vendored
Normal file
3
views/src/global.d.ts
vendored
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
interface Window{
|
||||||
|
baseApi: string
|
||||||
|
}
|
||||||
@ -25,7 +25,7 @@ onMounted(async () => {
|
|||||||
} */
|
} */
|
||||||
|
|
||||||
async function handleDelete(item: any) {
|
async function handleDelete(item: any) {
|
||||||
/* const mid = */await deletefile(knowledge_base_id.value, item)
|
/* const mid = */await deletefile({ knowledge_base_id: knowledge_base_id.value, doc_name: item })
|
||||||
const res = await getfilelist(knowledge_base_id.value)
|
const res = await getfilelist(knowledge_base_id.value)
|
||||||
dataSources.value = res.data.data
|
dataSources.value = res.data.data
|
||||||
}
|
}
|
||||||
@ -41,7 +41,7 @@ function handleEnter({ uuid }: Chat.History, isEdit: boolean, event: KeyboardEve
|
|||||||
<NUpload
|
<NUpload
|
||||||
multiple
|
multiple
|
||||||
directory-dnd
|
directory-dnd
|
||||||
:action="`${web_url()}${setapi()}/local_doc_qa/upload_file`"
|
:action="setapi() === undefined ? `${web_url()}/api/local_doc_qa/upload_file` : `${setapi()}local_doc_qa/upload_file`"
|
||||||
:headers="{
|
:headers="{
|
||||||
'naive-info': 'hello!',
|
'naive-info': 'hello!',
|
||||||
}"
|
}"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user