File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change 1- import { onBeforeUpdate , Ref , ref } from 'vue' ;
1+ import { onMounted , Ref , ref } from 'vue' ;
22
33/**
44 * Similar with `useLock`, but this hook will always execute last value.
@@ -14,12 +14,11 @@ export default function useDelayReset(
1414 window . clearTimeout ( delay ) ;
1515 } ;
1616
17- onBeforeUpdate ( ( ) => {
17+ onMounted ( ( ) => {
1818 cancelLatest ( ) ;
1919 } ) ;
2020 const delaySetBool = ( value : boolean , callback : ( ) => void ) => {
2121 cancelLatest ( ) ;
22-
2322 delay = window . setTimeout ( ( ) => {
2423 bool . value = value ;
2524 if ( callback ) {
Original file line number Diff line number Diff line change 11import { warning } from '../../vc-util/warning' ;
2- import { VNodeChild } from 'vue' ;
2+ import { isVNode , VNodeChild } from 'vue' ;
33import {
44 OptionsType as SelectOptionsType ,
55 OptionData ,
@@ -163,7 +163,15 @@ export const getLabeledValue: GetLabeledValue<FlattenOptionData[]> = (
163163} ;
164164
165165function toRawString ( content : VNodeChild ) : string {
166- return toArray ( content ) . join ( '' ) ;
166+ return toArray ( content )
167+ . map ( item => {
168+ if ( isVNode ( item ) ) {
169+ return item ?. el ?. innerText || item ?. el ?. wholeText ;
170+ } else {
171+ return '' ;
172+ }
173+ } )
174+ . join ( '' ) ;
167175}
168176
169177/** Filter single option if match the search text */
@@ -177,7 +185,6 @@ function getFilterFunction(optionFilterProp: string) {
177185 . toLowerCase ( )
178186 . includes ( lowerSearchText ) ;
179187 }
180-
181188 // Option value search
182189 const rawValue = option [ optionFilterProp ] ;
183190 const value = toRawString ( rawValue ) . toLowerCase ( ) ;
You can’t perform that action at this time.
0 commit comments