doway-coms 2.2.18 → 2.2.20
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/dist/css/chunk-vendors.7f83d8f9.css +8 -0
- package/dist/css/index.7946d50b.css +1 -0
- package/dist/favicon.ico +0 -0
- package/dist/js/chunk-vendors.28fda91d.js +340 -0
- package/dist/js/index.49bc6add.js +2 -0
- package/lib/doway-coms.common.js +120397 -0
- package/lib/doway-coms.css +1 -0
- package/lib/doway-coms.umd.js +120407 -0
- package/lib/doway-coms.umd.min.js +328 -0
- package/package.json +1 -1
- package/packages/BaseTreeSelect/src/index.vue +21 -0
package/package.json
CHANGED
|
@@ -29,6 +29,7 @@
|
|
|
29
29
|
:dropdownMatchSelectWidth="dropdownMatchSelectWidth"
|
|
30
30
|
:treeDefaultExpandAll="treeDefaultExpandAll"
|
|
31
31
|
:treeDefaultExpandedKeys="treeDefaultExpandedKeys"
|
|
32
|
+
:filterTreeNode="filterTreeNode"
|
|
32
33
|
@change="changeData"
|
|
33
34
|
size="small"
|
|
34
35
|
:allowClear="allowClear"
|
|
@@ -366,6 +367,26 @@ export default {
|
|
|
366
367
|
this.$set(this.row, this.field, node.title)
|
|
367
368
|
this.$emit('selectChanged', this.row)
|
|
368
369
|
},
|
|
370
|
+
filterTreeNode(inputValue,treeNode){
|
|
371
|
+
if(treeNode.data.props.dataRef.name.indexOf(inputValue)>-1){
|
|
372
|
+
//存在inputValue则返回true,显示该节点
|
|
373
|
+
return true;
|
|
374
|
+
}
|
|
375
|
+
//不存在inputValue则检查父节点是否包含inputValue
|
|
376
|
+
let parentId = treeNode.data.props.dataRef.parentId;
|
|
377
|
+
while(parentId){
|
|
378
|
+
let parentNode = XEUtils.findTree(this.treeData, p=>p.id===parentId)
|
|
379
|
+
if(parentNode){
|
|
380
|
+
if(parentNode.item.name.indexOf(inputValue)>-1){
|
|
381
|
+
return true
|
|
382
|
+
}
|
|
383
|
+
parentId = parentNode.item.parentId
|
|
384
|
+
}else{
|
|
385
|
+
break
|
|
386
|
+
}
|
|
387
|
+
}
|
|
388
|
+
return false
|
|
389
|
+
},
|
|
369
390
|
changeData(value) {
|
|
370
391
|
if (!value) {
|
|
371
392
|
this.$set(this.row, this.linkedField, '')
|