feat(knowledge): 更新知识库模块

- 添加知识库图标上传功能
- 优化知识库列表和详情页面的展示
- 新增智能体编辑功能
- 重构知识库表单组件
This commit is contained in:
陈昱达
2025-04-29 17:28:11 +08:00
parent 9c5fad7f75
commit 66944bcd47
7 changed files with 143 additions and 71 deletions

View File

@@ -24,6 +24,7 @@
:visible.sync="visible"
@confirm="confirm"
width="600px"
append-to-body
>
<div class="flex">
<cropper-canvas style="width: 100%;flex:1" cover image>
@@ -94,8 +95,30 @@ export default {
}
}
},
props: {},
watch: {},
props: {
list: {
type: Array,
default: () => []
},
url: {
type: String,
default: ''
}
},
watch: {
url: {
handler(val) {
this.fileList = []
if (val) {
this.fileList.push({
url: val
})
}
},
immediate: true,
deep: true
}
},
components: {},
filters: {},
methods: {
@@ -118,8 +141,9 @@ export default {
// 文件生成 bolburl
const blobUrl = URL.createObjectURL(res)
res.url = blobUrl
this.fileList = []
this.fileList.push(res)
this.$emit('getFiles', this.fileList)
this.$emit('getFiles', [res])
this.visible = false
})
// 根据canvas 生成一个图片