瓶中沙 2024-06-29 11:32:19 +08:00
parent 2390dd9eb7
commit f09f204b8c
2 changed files with 12 additions and 3 deletions

View File

@ -290,3 +290,8 @@ s {
.el-form-item__label { .el-form-item__label {
width: 100px !important; width: 100px !important;
} }
/* 点击树结构项的选中颜色 */
.el-tree--highlight-current .is-current.el-tree-node > .el-tree-node__content {
background-color: #74dad1 !important;
color: #fff;
}

View File

@ -15,6 +15,8 @@
:props="defaultProps" :props="defaultProps"
:highlight-current="true" :highlight-current="true"
accordion accordion
node-key="id"
:current-node-key="currentNodekey"
@node-click="handleNodeClick"> @node-click="handleNodeClick">
</el-tree> </el-tree>
</div> </div>
@ -57,6 +59,7 @@ export default {
const ruleFormRef = ref(null); const ruleFormRef = ref(null);
const state = reactive({ const state = reactive({
indexi: 0, indexi: 0,
qdDatas: [{ qdDatas: [{
id: 1, id: 1,
name: '驱动一', name: '驱动一',
@ -78,14 +81,15 @@ export default {
label: '设备一', label: '设备一',
}, { }, {
id: 12, id: 12,
label: '设备二', label: '设备二',
}, { }, {
id: 13, id: 13,
label: '设备三', label: '设备三',
}], }],
tableData: [] currentNodekey: 11,
tableData: [],
}); });
onMounted(() => { onMounted(() => {