File tree Expand file tree Collapse file tree 2 files changed +16
-14
lines changed
Expand file tree Collapse file tree 2 files changed +16
-14
lines changed Original file line number Diff line number Diff line change @@ -404,10 +404,13 @@ function openMoveToDialog(data: any) {
404404}
405405
406406function refreshKnowledgeList(row : any ) {
407- const list = cloneDeep (knowledge .knowledgeList )
408- const index = list .findIndex ((v ) => v .id === row .id )
409- list .splice (index , 1 )
410- knowledge .setKnowledgeList (list )
407+ // 不是根目录才会移除
408+ if (folder .currentFolder ?.parent_id ) {
409+ const list = cloneDeep (knowledge .knowledgeList )
410+ const index = list .findIndex ((v ) => v .id === row .id )
411+ list .splice (index , 1 )
412+ knowledge .setKnowledgeList (list )
413+ }
411414}
412415
413416const CreateKnowledgeDialogRef = ref ()
@@ -477,6 +480,7 @@ function deleteKnowledge(row: any) {
477480 const index = list .findIndex ((v ) => v .id === row .id )
478481 list .splice (index , 1 )
479482 knowledge .setKnowledgeList (list )
483+
480484 MsgSuccess (t (' common.deleteSuccess' ))
481485 })
482486 })
Original file line number Diff line number Diff line change 171171 :disabled =" permissionPrecise.edit(item.id)"
172172 >
173173 <template #icon >
174- <el-avatar
175- v-if =" item?.icon"
176- shape =" square"
177- :size =" 32"
178- style =" background : none "
179- >
174+ <el-avatar v-if =" item?.icon" shape =" square" :size =" 32" style =" background : none " >
180175 <img :src =" resetUrl(item?.icon)" alt =" " />
181176 </el-avatar >
182177 <ToolIcon v-else :size =" 32" :type =" item?.tool_type" />
@@ -473,10 +468,13 @@ function openMoveToDialog(data: any) {
473468}
474469
475470function refreshToolList(row : any ) {
476- const list = cloneDeep (tool .toolList )
477- const index = list .findIndex ((v ) => v .id === row .id )
478- list .splice (index , 1 )
479- tool .setToolList (list )
471+ // 不是根目录才会移除
472+ if (folder .currentFolder ?.parent_id ) {
473+ const list = cloneDeep (tool .toolList )
474+ const index = list .findIndex ((v ) => v .id === row .id )
475+ list .splice (index , 1 )
476+ tool .setToolList (list )
477+ }
480478}
481479
482480const AuthorizedWorkspaceDialogRef = ref ()
You can’t perform that action at this time.
0 commit comments