Merge pull request #115 from zhaoshibao/feat-113-114
This commit is contained in:
commit
f5302c4c4b
@ -558,6 +558,13 @@ const getDatabaseInfo = () => {
|
|||||||
|
|
||||||
const deleteFile = (fileId) => {
|
const deleteFile = (fileId) => {
|
||||||
console.log(fileId)
|
console.log(fileId)
|
||||||
|
//删除提示
|
||||||
|
Modal.confirm({
|
||||||
|
title: '删除文件',
|
||||||
|
content: '确定要删除该文件吗?',
|
||||||
|
okText: '确认',
|
||||||
|
cancelText: '取消',
|
||||||
|
onOk: () => {
|
||||||
state.lock = true
|
state.lock = true
|
||||||
fetch('/api/data/document', {
|
fetch('/api/data/document', {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
@ -579,9 +586,16 @@ const deleteFile = (fileId) => {
|
|||||||
console.error(error)
|
console.error(error)
|
||||||
message.error(error.message)
|
message.error(error.message)
|
||||||
})
|
})
|
||||||
|
.finally(() => {
|
||||||
|
state.lock = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
onCancel: () => {
|
||||||
|
console.log('Cancel');
|
||||||
|
},
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const chunkParams = ref({
|
const chunkParams = ref({
|
||||||
chunk_size: 1000,
|
chunk_size: 1000,
|
||||||
chunk_overlap: 200,
|
chunk_overlap: 200,
|
||||||
|
|||||||
@ -9,7 +9,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</HeaderComponent>
|
</HeaderComponent>
|
||||||
|
|
||||||
<a-modal :open="newDatabase.open" title="新建数据库" @ok="createDatabase">
|
<a-modal :open="newDatabase.open" title="新建数据库" @ok="createDatabase" @cancel="newDatabase.open=false">
|
||||||
<h3>数据库名称<span style="color: var(--error-color)">*</span></h3>
|
<h3>数据库名称<span style="color: var(--error-color)">*</span></h3>
|
||||||
<a-input v-model:value="newDatabase.name" placeholder="新建数据库名称" />
|
<a-input v-model:value="newDatabase.name" placeholder="新建数据库名称" />
|
||||||
<h3 style="margin-top: 20px;">数据库描述</h3>
|
<h3 style="margin-top: 20px;">数据库描述</h3>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user