@@ -14,10 +14,10 @@ function isSelectOptionOrSelectOptGroup(child: any): boolean {
14
14
}
15
15
16
16
const autoCompleteProps = {
17
- ...selectProps ( ) ,
17
+ ...omit ( selectProps ( ) , [ 'loading' , 'mode' , 'optionLabelProp' , 'labelInValue' ] ) ,
18
18
dataSource : PropTypes . array ,
19
19
dropdownMenuStyle : PropTypes . style ,
20
- optionLabelProp : PropTypes . string ,
20
+ // optionLabelProp: PropTypes.string,
21
21
dropdownMatchSelectWidth : { type : [ Number , Boolean ] , default : true } ,
22
22
} ;
23
23
@@ -38,7 +38,7 @@ const AutoComplete = defineComponent({
38
38
choiceTransitionName : PropTypes . string . def ( 'zoom' ) ,
39
39
autofocus : PropTypes . looseBool ,
40
40
backfill : PropTypes . looseBool ,
41
- optionLabelProp : PropTypes . string . def ( 'children' ) ,
41
+ // optionLabelProp: PropTypes.string.def('children'),
42
42
filterOption : PropTypes . oneOfType ( [ PropTypes . looseBool , PropTypes . func ] ) . def ( false ) ,
43
43
defaultActiveFirstOption : PropTypes . looseBool . def ( true ) ,
44
44
} ,
@@ -121,19 +121,22 @@ const AutoComplete = defineComponent({
121
121
}
122
122
}
123
123
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
+ ) ;
135
138
return (
136
- < Select { ...selectProps } v-slots = { { option : slots . option } } >
139
+ < Select { ...selectProps } v-slots = { omit ( slots , [ 'default' , 'dataSource' , 'options' ] ) } >
137
140
{ optionChildren }
138
141
</ Select >
139
142
) ;
0 commit comments