From f09f204b8c800b593db7a4d5d7eb7fd8f4e326c0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=93=B6=E4=B8=AD=E6=B2=99?= <464652163@qq.com> Date: Sat, 29 Jun 2024 11:32:19 +0800 Subject: [PATCH 1/2] 123 --- src/css/index.scss | 5 +++++ src/views/Data.vue | 10 +++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/css/index.scss b/src/css/index.scss index 531e035..d53435e 100644 --- a/src/css/index.scss +++ b/src/css/index.scss @@ -290,3 +290,8 @@ s { .el-form-item__label { width: 100px !important; } +/* 点击树结构项的选中颜色 */ +.el-tree--highlight-current .is-current.el-tree-node > .el-tree-node__content { + background-color: #74dad1 !important; + color: #fff; +} \ No newline at end of file diff --git a/src/views/Data.vue b/src/views/Data.vue index 684fe26..c54d2d1 100644 --- a/src/views/Data.vue +++ b/src/views/Data.vue @@ -15,6 +15,8 @@ :props="defaultProps" :highlight-current="true" accordion + node-key="id" + :current-node-key="currentNodekey" @node-click="handleNodeClick"> @@ -57,6 +59,7 @@ export default { const ruleFormRef = ref(null); const state = reactive({ indexi: 0, + qdDatas: [{ id: 1, name: '驱动一', @@ -78,14 +81,15 @@ export default { label: '设备一', }, { id: 12, - label: '设备二', - + label: '设备二', }, { id: 13, label: '设备三', }], - tableData: [] + currentNodekey: 11, + tableData: [], + }); onMounted(() => { From 762ce0c7d1759cffcf8597916447114c0d8c80c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=93=B6=E4=B8=AD=E6=B2=99?= <464652163@qq.com> Date: Sat, 29 Jun 2024 15:41:18 +0800 Subject: [PATCH 2/2] 123 --- src/css/index.scss | 19 ++++++++++++++++++- src/views/Data.vue | 2 ++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/src/css/index.scss b/src/css/index.scss index d53435e..cd29760 100644 --- a/src/css/index.scss +++ b/src/css/index.scss @@ -294,4 +294,21 @@ s { .el-tree--highlight-current .is-current.el-tree-node > .el-tree-node__content { background-color: #74dad1 !important; color: #fff; -} \ No newline at end of file +} +/* 滚动条样式 */ +::-webkit-scrollbar { + width: 4px; /* 设置纵轴(y轴)轴滚动条 */ + height: 4px; /* 设置横轴(x轴)轴滚动条 */ +} +/* 滚动条滑块(里面小方块) */ +::-webkit-scrollbar-thumb { + border-radius: 10px; + box-shadow: inset 0 0 5px #539f9a; + background: #539f9a; +} +/* 滚动条轨道 */ +::-webkit-scrollbar-track { + border-radius: 0; + box-shadow: inset #fff; + background: #2B5451; +} diff --git a/src/views/Data.vue b/src/views/Data.vue index c54d2d1..df32f5e 100644 --- a/src/views/Data.vue +++ b/src/views/Data.vue @@ -116,6 +116,7 @@ export default { width: 15%; border: 1px solid #006b3b; font-size: 16px; + overflow:auto; img { width: 24px; } @@ -139,6 +140,7 @@ export default { .right-set { width: 10%; padding: 20px; + overflow: auto; } .right-table { width: 88%;