Skip to content

Commit f97262f

Browse files
committed
releases 4.11.14
1 parent 165f2ba commit f97262f

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vxe-pc-ui",
3-
"version": "4.11.13",
3+
"version": "4.11.14",
44
"description": "A vue based PC component library",
55
"scripts": {
66
"update": "npm install --legacy-peer-deps",

packages/select/src/select.ts

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -481,19 +481,23 @@ export default defineVxeComponent({
481481
* 处理选项,当选项被动态显示/隐藏时可能会用到
482482
*/
483483
const handleOption = () => {
484-
const { modelValue, filterable, filterMethod } = props
484+
const { remote, modelValue, filterable, filterMethod } = props
485485
const { searchValue } = reactData
486486
const { fullData, optFullValMaps } = internalData
487487
const labelField = computeLabelField.value
488488
const valueField = computeValueField.value
489489
const searchStr = `${searchValue || ''}`.toLowerCase()
490490
let avList: any[] = []
491-
if (filterable && filterMethod) {
492-
avList = fullData.filter(option => isOptionVisible(option) && filterMethod({ $select: $xeSelect, group: null, option, searchValue, value: modelValue }))
493-
} else if (filterable) {
494-
avList = fullData.filter(option => isOptionVisible(option) && (!searchStr || `${option[labelField] || option[valueField]}`.toLowerCase().indexOf(searchStr) > -1))
495-
} else {
491+
if (remote) {
496492
avList = fullData.filter(isOptionVisible)
493+
} else {
494+
if (filterable && filterMethod) {
495+
avList = fullData.filter(option => isOptionVisible(option) && filterMethod({ $select: $xeSelect, group: null, option, searchValue, value: modelValue }))
496+
} else if (filterable) {
497+
avList = fullData.filter(option => isOptionVisible(option) && (!searchStr || `${option[labelField] || option[valueField]}`.toLowerCase().indexOf(searchStr) > -1))
498+
} else {
499+
avList = fullData.filter(isOptionVisible)
500+
}
497501
}
498502
avList.forEach((item, index) => {
499503
const cacheItem = optFullValMaps[item[valueField]]

0 commit comments

Comments
 (0)