fix: 模块树样式
This commit is contained in:
parent
88979c56fb
commit
cc4d07918b
|
@ -30,17 +30,17 @@
|
||||||
<i class="el-icon-folder"/>
|
<i class="el-icon-folder"/>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="!data.isEdit" class="node-title" v-text="data.name"/>
|
<span v-if="!data.isEdit" class="node-title" v-text="data.name"/>
|
||||||
<span v-if="data.caseNum" class="node-title">
|
<span class="node-title">
|
||||||
<span>({{ data.caseNum }})</span>
|
<span style="color: #6C317C">{{ data.caseNum }}</span>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="!disabled" class="node-operate child">
|
<span v-if="!disabled" class="node-operate child">
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
v-if="data.id !== 'root' && data.name !=='默认模块'"
|
v-if="data.id !== 'root' && data.name !=='默认模块'"
|
||||||
class="item"
|
class="item"
|
||||||
effect="dark"
|
effect="dark"
|
||||||
:open-delay="200"
|
:open-delay="200"
|
||||||
:content="$t('test_track.module.rename')"
|
:content="$t('test_track.module.rename')"
|
||||||
placement="top">
|
placement="top">
|
||||||
<i @click.stop="edit(node, data)" class="el-icon-edit"></i>
|
<i @click.stop="edit(node, data)" class="el-icon-edit"></i>
|
||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
<el-tooltip
|
<el-tooltip
|
||||||
|
@ -139,12 +139,17 @@ export default {
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
init() {
|
init() {
|
||||||
|
let num = 0;
|
||||||
|
this.treeNodes.forEach(t => {
|
||||||
|
num += t.caseNum;
|
||||||
|
});
|
||||||
this.extendTreeNodes = [];
|
this.extendTreeNodes = [];
|
||||||
this.extendTreeNodes.unshift({
|
this.extendTreeNodes.unshift({
|
||||||
"id": "root",
|
"id": "root",
|
||||||
"name": this.allLabel,
|
"name": this.allLabel,
|
||||||
"level": 0,
|
"level": 0,
|
||||||
"children": this.treeNodes,
|
"children": this.treeNodes,
|
||||||
|
"caseNum": num
|
||||||
});
|
});
|
||||||
if (this.expandedNode.length === 0) {
|
if (this.expandedNode.length === 0) {
|
||||||
this.expandedNode.push("root");
|
this.expandedNode.push("root");
|
||||||
|
|
Loading…
Reference in New Issue