3.台站下拉框增加搜索功能

This commit is contained in:
renpy 2023-08-02 11:14:34 +08:00
parent 393c6ecfa0
commit 05cde65304
2 changed files with 16 additions and 4 deletions

View File

@ -234,7 +234,12 @@ export default {
} else { } else {
this.queryParam.stationIds =[] this.queryParam.stationIds =[]
} }
} },
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
}, },
computed: { computed: {
formItems() { formItems() {
@ -259,6 +264,7 @@ export default {
name: 'stationIds', name: 'stationIds',
props: { props: {
allChecked: this.allChecked, allChecked: this.allChecked,
filterOption:this.filterOption,
placeholder: 'select stations', placeholder: 'select stations',
mode: 'multiple', mode: 'multiple',
maxTagCount: 1, maxTagCount: 1,

View File

@ -178,7 +178,12 @@ export default {
} else { } else {
this.queryParam.stationIds =[] this.queryParam.stationIds =[]
} }
} },
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
);
},
}, },
computed: { computed: {
formItems() { formItems() {
@ -203,6 +208,7 @@ export default {
name: 'stationIds', name: 'stationIds',
props: { props: {
allChecked: this.allChecked, allChecked: this.allChecked,
filterOption:this.filterOption,
placeholder: 'select stations', placeholder: 'select stations',
mode: 'multiple', mode: 'multiple',
maxTagCount: 1, maxTagCount: 1,