vue2-client 1.9.173 → 1.9.174
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -6,7 +6,10 @@
|
|
|
6
6
|
<span>{{ config.title }}</span>
|
|
7
7
|
</a-col>
|
|
8
8
|
<a-col span="1" :offset="2" v-if="treeDisplaySwitch">
|
|
9
|
-
<a-icon
|
|
9
|
+
<a-icon
|
|
10
|
+
:type="treeDisplayConfig.showTree? 'caret-down':'caret-left'"
|
|
11
|
+
:style="{color: treeDisplayConfig.buttonColor}"
|
|
12
|
+
@click="treeDisplayConfig.showTree=!treeDisplayConfig.showTree"/>
|
|
10
13
|
</a-col>
|
|
11
14
|
</a-row>
|
|
12
15
|
</div>
|
|
@@ -206,6 +209,7 @@ export default {
|
|
|
206
209
|
methods: {
|
|
207
210
|
// 节点展开暂存
|
|
208
211
|
nodeExpand (node) {
|
|
212
|
+
console.log('====需要展开节点', node, this.replaceFields.key)
|
|
209
213
|
if (this.expandedKeys.includes(node[this.replaceFields.key])) {
|
|
210
214
|
this.expandedKeys = this.expandedKeys.filter(item => item !== node[this.replaceFields.key])
|
|
211
215
|
} else {
|
|
@@ -252,9 +256,13 @@ export default {
|
|
|
252
256
|
onChange: debounce(function (e) {
|
|
253
257
|
this.$refs.veTree.filter(e.target.value)
|
|
254
258
|
}, 150),
|
|
255
|
-
filterNode (value, data) {
|
|
259
|
+
filterNode (value, data, node) {
|
|
256
260
|
if (!value) return true
|
|
257
|
-
|
|
261
|
+
if (data.label.indexOf(value) !== -1) {
|
|
262
|
+
this.nodeExpand(node.data)
|
|
263
|
+
return true
|
|
264
|
+
}
|
|
265
|
+
return false
|
|
258
266
|
},
|
|
259
267
|
nodeItemClick (e) {
|
|
260
268
|
this.selectedNode = e
|
|
@@ -332,6 +340,11 @@ export default {
|
|
|
332
340
|
}), this.serviceName, this.env === 'dev').then(res => {
|
|
333
341
|
this.localTreeData = res
|
|
334
342
|
this.deepestNodes = this.getDeepestNodes(this.localTreeData)
|
|
343
|
+
this.$nextTick(() => {
|
|
344
|
+
if (this.searchInput) {
|
|
345
|
+
this.$refs.veTree.filter(this.searchInput)
|
|
346
|
+
}
|
|
347
|
+
})
|
|
335
348
|
}).catch(e => {
|
|
336
349
|
this.$message.error('获取数据失败:' + e)
|
|
337
350
|
}).finally(() => {
|
|
@@ -379,12 +392,15 @@ export default {
|
|
|
379
392
|
background-color: #E0E5EB;
|
|
380
393
|
border-radius: 8px 8px 0 0;
|
|
381
394
|
}
|
|
395
|
+
|
|
382
396
|
.selected {
|
|
383
397
|
font-weight: bold; /* 加粗字体 */
|
|
384
398
|
color: #1890ff;
|
|
385
399
|
}
|
|
386
|
-
|
|
400
|
+
|
|
401
|
+
.row-search {
|
|
387
402
|
background-color: #E0E5EB;
|
|
403
|
+
|
|
388
404
|
.content-search {
|
|
389
405
|
background-color: rgb(224, 229, 235);
|
|
390
406
|
height: 2.6rem;
|
|
@@ -396,6 +412,7 @@ export default {
|
|
|
396
412
|
margin: auto 0;
|
|
397
413
|
}
|
|
398
414
|
}
|
|
415
|
+
|
|
399
416
|
.active-button {
|
|
400
417
|
border-color: @primary-color !important;
|
|
401
418
|
color: @primary-color !important;
|