From 1d8522499d6052e3d389667db1aae46a23208831 Mon Sep 17 00:00:00 2001
From: cy <1664593601@qq.com>
Date: 星期四, 14 十二月 2023 13:05:01 +0800
Subject: [PATCH] feat: 去掉按钮权限
---
admin-web/src/components/myTree/index.vue | 31 ++++++++++++++++---------------
1 files changed, 16 insertions(+), 15 deletions(-)
diff --git a/admin-web/src/components/myTree/index.vue b/admin-web/src/components/myTree/index.vue
index 81ac3e2..bdd1b93 100644
--- a/admin-web/src/components/myTree/index.vue
+++ b/admin-web/src/components/myTree/index.vue
@@ -1,16 +1,20 @@
<template>
<div>
- <el-input
- style='margin-bottom: 8px;width:100%'
- placeholder='鎼滅储'
- prefix-icon='el-icon-search'
- v-model='searchValue'
- clearable>
- </el-input>
- <div class='tree-box'>
+ <div style="display: flex;margin-bottom: 8px;">
+ <el-input
+ style='flex: 1'
+ placeholder='鎼滅储'
+ prefix-icon='el-icon-search'
+ v-model='searchValue'
+ clearable>
+ </el-input>
<div class='refresh-btn' v-if='treeList.length>0' @click='refshData'>
閲嶇疆<i class='el-icon-refresh'></i>
</div>
+ </div>
+
+ <div class='tree-box'>
+
<el-tree
ref='tree'
:data='treeList'
@@ -19,6 +23,7 @@
@node-click='onSelect'
:expand-on-click-node='false'
:default-expand-all='autoExpandParent'
+ :default-expanded-keys="expandedKeys"
:filter-node-method='filterNode'
:highlight-current='true'
>
@@ -76,7 +81,7 @@
},
methods: {
onExpand(expandedKeys) {
- this.expandedKeys = expandedKeys;
+ this.expandedKeys.push(expandedKeys.id);
this.autoExpandParent = false;
},
filterNode(value, data) {
@@ -161,14 +166,10 @@
.refresh-btn {
cursor: pointer;
- position: absolute;
- top: 0;
- right: 0;
font-size: 14px;
- z-index: 101;
- line-height: 40px;
+ line-height: 32px;
color: #999;
- text-align: right;
+ margin-left: 10px;
}
.refresh-btn:hover {
--
Gitblit v1.9.1