优化目录移除时默认目录的选择

This commit is contained in:
648540858
2022-01-25 17:14:10 +08:00
parent 08468edd45
commit abc65c6317
5 changed files with 30 additions and 14 deletions

View File

@@ -132,6 +132,7 @@ export default {
url:`/api/platform/catalog/del`,
params: {
id: id,
platformId: this.platformId,
}
})
.then((res) => {
@@ -139,8 +140,8 @@ export default {
console.log("移除成功")
node.parent.loaded = false
node.parent.expand();
if(this.defaultCatalogId === id) {
this.defaultCatalogId = this.platformId;
if (res.data.data) {
this.defaultCatalogId = res.data.data;
}
}
})