|
@@ -76,7 +76,6 @@
|
|
|
></el-button>
|
|
|
<!-- 新增的时候可以删除临时文件 -->
|
|
|
<el-button
|
|
|
- v-if="!modalForm.id"
|
|
|
type="danger"
|
|
|
icon="el-icon-close"
|
|
|
:disabled="loading"
|
|
@@ -115,6 +114,7 @@ const initModalForm = {
|
|
|
parentId: null,
|
|
|
name: "",
|
|
|
remark: "",
|
|
|
+ level: 0,
|
|
|
};
|
|
|
|
|
|
export default {
|
|
@@ -249,6 +249,7 @@ export default {
|
|
|
const newChild = {
|
|
|
...initModalForm,
|
|
|
parentId: this.curNodeData.id,
|
|
|
+ level: this.curNodeData.level + 1,
|
|
|
};
|
|
|
if (!this.curNodeData.children) {
|
|
|
this.$set(this.curNodeData, "children", []);
|
|
@@ -289,6 +290,11 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
toRemoveFolder(node, data) {
|
|
|
+ if (this.curEditClassifyId) {
|
|
|
+ this.curEditClassifyId = null;
|
|
|
+ this.modalForm = {};
|
|
|
+ return;
|
|
|
+ }
|
|
|
const parent = node.parent;
|
|
|
const children = parent.data.children || parent.data;
|
|
|
const index = children.findIndex((d) => d.id === data.id);
|