Commit 1f068a35 authored by 张伯涛's avatar 张伯涛

修改

parent c65b95e6
......@@ -27,11 +27,14 @@
:default-expanded-keys="[1, 3]"
:default-checked-keys="[5]"
:props="defaultProps"
:expand-on-click-node="false"
>
<template slot-scope="{ node, data }">
<span>
<span style="width: 100%" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
<img :src="data.icon" class="treeIcon">
<label>{{ node.label }}</label>
<img v-show="data.show" :src="deleteIcon" class="treeIcon2" @click="deleteRow">
<img v-show="data.show" :src="updateIcon" class="treeIcon2" @click="leftAdd">
</span>
</template>
</el-tree>
......@@ -174,6 +177,8 @@ export default {
{ name: 'ORACLE(备)', code: 'test1-0406104437-0112', flag: '在用' },
{ name: 'ORACLE(主)', code: 'test1-0406104534-0114', flag: '在用' }
],
deleteIcon: require('@/assets/image/delete.png'),
updateIcon: require('@/assets/image/edit.png'),
data: [{
id: 1,
icon: require('@/assets/image/shebei9-guzhang.png'),
......@@ -227,6 +232,13 @@ export default {
this.handleExpand() // 全屏
},
methods: {
mouseenter(data) {
this.$set(data, 'show', true)
},
mouseleave(data) {
this.$set(data, 'show', false)
},
handleShowAdd() {
this.$router.push({
path: '/assetManagement/addAsset'
......@@ -335,6 +347,12 @@ export default {
width: 17px;
height: 17px;
}
.treeIcon2{
margin-left: 10px;
float: right;
width: 17px;
height: 17px;
}
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment