@@ -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