@@ -14,10 +14,10 @@ function isSelectOptionOrSelectOptGroup(child: any): boolean {
1414}
1515
1616const autoCompleteProps = {
17- ...selectProps ( ) ,
17+ ...omit ( selectProps ( ) , [ 'loading' , 'mode' , 'optionLabelProp' , 'labelInValue' ] ) ,
1818 dataSource : PropTypes . array ,
1919 dropdownMenuStyle : PropTypes . style ,
20- optionLabelProp : PropTypes . string ,
20+ // optionLabelProp: PropTypes.string,
2121 dropdownMatchSelectWidth : { type : [ Number , Boolean ] , default : true } ,
2222} ;
2323
@@ -38,7 +38,7 @@ const AutoComplete = defineComponent({
3838 choiceTransitionName : PropTypes . string . def ( 'zoom' ) ,
3939 autofocus : PropTypes . looseBool ,
4040 backfill : PropTypes . looseBool ,
41- optionLabelProp : PropTypes . string . def ( 'children' ) ,
41+ // optionLabelProp: PropTypes.string.def('children'),
4242 filterOption : PropTypes . oneOfType ( [ PropTypes . looseBool , PropTypes . func ] ) . def ( false ) ,
4343 defaultActiveFirstOption : PropTypes . looseBool . def ( true ) ,
4444 } ,
@@ -121,19 +121,22 @@ const AutoComplete = defineComponent({
121121 }
122122 }
123123
124- const selectProps = {
125- ...omit ( props , [ 'dataSource' , 'optionLabelProp' ] ) ,
126- ...attrs ,
127- mode : Select . SECRET_COMBOBOX_MODE_DO_NOT_USE ,
128- // optionLabelProp,
129- getInputElement,
130- notFoundContent,
131- // placeholder: '',
132- class : cls ,
133- ref : selectRef ,
134- } ;
124+ const selectProps = omit (
125+ {
126+ ...props ,
127+ ...( attrs as any ) ,
128+ mode : Select . SECRET_COMBOBOX_MODE_DO_NOT_USE ,
129+ // optionLabelProp,
130+ getInputElement,
131+ notFoundContent,
132+ // placeholder: '',
133+ class : cls ,
134+ ref : selectRef ,
135+ } ,
136+ [ 'dataSource' , 'loading' ] ,
137+ ) ;
135138 return (
136- < Select { ...selectProps } v-slots = { { option : slots . option } } >
139+ < Select { ...selectProps } v-slots = { omit ( slots , [ 'default' , 'dataSource' , 'options' ] ) } >
137140 { optionChildren }
138141 </ Select >
139142 ) ;
0 commit comments