|
@@ -19,7 +19,9 @@
|
|
|
v-model="filterText"
|
|
|
class="mb-20 searchInput"
|
|
|
>
|
|
|
- <i class="el-icon-search el-input__icon"></i>
|
|
|
+ <template #suffix>
|
|
|
+ <i class="el-icon-search el-input__icon"></i>
|
|
|
+ </template>
|
|
|
</el-input>
|
|
|
|
|
|
<el-tree
|
|
@@ -41,14 +43,11 @@
|
|
|
@mouseleave="mouseleave(data)"
|
|
|
>
|
|
|
<span>{{ node.label }}</span>
|
|
|
- <el-link
|
|
|
- class="deleteLink"
|
|
|
- v-show="data.show"
|
|
|
- size="mini"
|
|
|
- type="primary"
|
|
|
- icon="el-icon-delete"
|
|
|
- @click="remove(node, data)"
|
|
|
- ></el-link>
|
|
|
+ <span>
|
|
|
+ <a class="deleteLink" v-show="data.show" @click="remove(node, data)">
|
|
|
+ <i size="mini" class="el-icon-delete"></i>
|
|
|
+ </a>
|
|
|
+ </span>
|
|
|
</span>
|
|
|
</template>
|
|
|
</el-tree>
|
|
@@ -231,15 +230,15 @@ export default {
|
|
|
|
|
|
methods: {
|
|
|
mouseenter(data) {
|
|
|
- console.log("移入");
|
|
|
- console.log(data);
|
|
|
+ // console.log("移入");
|
|
|
+ // console.log(data);
|
|
|
data.show = true;
|
|
|
- console.log(data.show);
|
|
|
+ // console.log(data.show);
|
|
|
},
|
|
|
|
|
|
mouseleave(data) {
|
|
|
- console.log("移出");
|
|
|
- console.log(data);
|
|
|
+ // console.log("移出");
|
|
|
+ // console.log(data);
|
|
|
data.show = false;
|
|
|
},
|
|
|
|
|
@@ -315,26 +314,7 @@ export default {
|
|
|
const children = parent.data.children || parent.data;
|
|
|
const index = children.findIndex((d) => d.id === data.id);
|
|
|
children.splice(index, 1);
|
|
|
- },
|
|
|
-
|
|
|
- renderContent(h, { node, data, store }) {
|
|
|
- // console.log(h)
|
|
|
- console.log(node.level);
|
|
|
-
|
|
|
- return (
|
|
|
- <span class="custom-tree-node">
|
|
|
- <span>{node.label}</span>
|
|
|
- <span>
|
|
|
- <el-button
|
|
|
- size="mini"
|
|
|
- type="text"
|
|
|
- on-click={() => this.remove(node, data)}
|
|
|
- >
|
|
|
- <i class="el-icon-delete"></i>
|
|
|
- </el-button>
|
|
|
- </span>
|
|
|
- </span>
|
|
|
- );
|
|
|
+ this.dataSource = [...this.dataSource];
|
|
|
},
|
|
|
},
|
|
|
};
|