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

修改

parent c65b95e6
...@@ -27,11 +27,14 @@ ...@@ -27,11 +27,14 @@
:default-expanded-keys="[1, 3]" :default-expanded-keys="[1, 3]"
:default-checked-keys="[5]" :default-checked-keys="[5]"
:props="defaultProps" :props="defaultProps"
:expand-on-click-node="false"
> >
<template slot-scope="{ node, data }"> <template slot-scope="{ node, data }">
<span> <span style="width: 100%" @mouseenter="mouseenter(data)" @mouseleave="mouseleave(data)">
<img :src="data.icon" class="treeIcon"> <img :src="data.icon" class="treeIcon">
<label>{{ node.label }}</label> <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> </span>
</template> </template>
</el-tree> </el-tree>
...@@ -174,6 +177,8 @@ export default { ...@@ -174,6 +177,8 @@ export default {
{ name: 'ORACLE(备)', code: 'test1-0406104437-0112', flag: '在用' }, { name: 'ORACLE(备)', code: 'test1-0406104437-0112', flag: '在用' },
{ name: 'ORACLE(主)', code: 'test1-0406104534-0114', flag: '在用' } { name: 'ORACLE(主)', code: 'test1-0406104534-0114', flag: '在用' }
], ],
deleteIcon: require('@/assets/image/delete.png'),
updateIcon: require('@/assets/image/edit.png'),
data: [{ data: [{
id: 1, id: 1,
icon: require('@/assets/image/shebei9-guzhang.png'), icon: require('@/assets/image/shebei9-guzhang.png'),
...@@ -227,6 +232,13 @@ export default { ...@@ -227,6 +232,13 @@ export default {
this.handleExpand() // 全屏 this.handleExpand() // 全屏
}, },
methods: { methods: {
mouseenter(data) {
this.$set(data, 'show', true)
},
mouseleave(data) {
this.$set(data, 'show', false)
},
handleShowAdd() { handleShowAdd() {
this.$router.push({ this.$router.push({
path: '/assetManagement/addAsset' path: '/assetManagement/addAsset'
...@@ -335,6 +347,12 @@ export default { ...@@ -335,6 +347,12 @@ export default {
width: 17px; width: 17px;
height: 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