联动删除
This commit is contained in:
@@ -159,14 +159,13 @@ export default {
|
||||
},
|
||||
nodeDelete(node) {
|
||||
this.$refs.tree.setCurrentKey(this.groupId);
|
||||
if (node.data.children && node.data.children.length > 0) {
|
||||
this.$message.error("包含子节点,无法删除")
|
||||
return
|
||||
}
|
||||
this.$modal.confirm('是否确认删除?').then(function () {
|
||||
return delGroup(node.data.id);
|
||||
this.$modal.confirm('是否确认删除?会连带删除文件夹下所有内容').then(() => {
|
||||
return delGroup(node.data.id, this.type);
|
||||
}).then(() => {
|
||||
this.$modal.msgSuccess("删除成功");
|
||||
if (this.groupId === node.data.id) {
|
||||
this.$emit("click", null);
|
||||
}
|
||||
this.$refs.tree.remove(node)
|
||||
})
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user