@@ -12,24 +12,19 @@ Description:
12
12
:config =" treeConfig"
13
13
ref =" tree"
14
14
@wheel =" zoom" >
15
- <template v-slot :node =" { node , collapsed } " >
15
+ <template v-slot :node =" { node } " >
16
16
<span v-if =" this.activeComponent === node.value"
17
17
class =" tree-node-active"
18
- :style =" { border: collapsed ? '2px solid grey' : '' }"
19
-
20
18
>
21
19
{{ node.value }}
22
20
</span >
23
21
<span v-else-if =" this.activeRoute === node.value"
24
22
class =" tree-node-activeRoute"
25
- :style =" { border: collapsed ? '2px solid grey' : '' }"
26
-
27
23
>
28
24
{{ node.value }}
29
25
</span >
30
26
<span v-else
31
27
class =" tree-node"
32
- :style =" { border: collapsed ? '2px solid grey' : '' }"
33
28
@click =" activateNode(node.value)"
34
29
>
35
30
{{ node.value }}
@@ -152,7 +147,6 @@ export default {
152
147
watch: {
153
148
componentMap: {
154
149
handler (){
155
- console .log (this .componentMap )
156
150
this .treeData = this .buildTree (this .componentMap );
157
151
},
158
152
deep: true ,
@@ -161,7 +155,7 @@ export default {
161
155
data () {
162
156
return {
163
157
treeData: this .buildTree (this .$store .state .componentMap ),
164
- treeConfig: { nodeWidth: 120 , nodeHeight: 80 , levelHeight: 200 },
158
+ treeConfig: { nodeWidth: 175 , nodeHeight: 100 , levelHeight: 200 },
165
159
componentData: this .$store .state .componentMap ,
166
160
}
167
161
}
@@ -181,14 +175,16 @@ export default {
181
175
182
176
.tree-node , .tree-node-active , .tree-node-activeRoute {
183
177
display : inline-block ;
184
- width : 90% ;
185
178
padding : 8px ;
179
+ min-width : 80% ;
186
180
margin : 6px ;
187
181
min-height : 28px ;
188
182
color : #FFFFFF ;
189
183
background-color : $secondary ;
190
184
text-align : center ;
191
185
line-height : 28px ;
186
+ border-radius : 3px ;
187
+ word-wrap : break-word ;
192
188
}
193
189
194
190
.tree-node-active {
@@ -198,7 +194,8 @@ export default {
198
194
}
199
195
200
196
.tree-node-activeRoute {
201
- background-color : #155158 ;
197
+ background-color : $accent ;
198
+ color : #155158 ;
202
199
border : 2px solid rgb (196 , 154 , 19 );
203
200
}
204
201
0 commit comments