File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 145
145
import debounce from ' throttle-debounce/debounce' ;
146
146
import Clickoutside from ' element-ui/src/utils/clickoutside' ;
147
147
import { addResizeListener , removeResizeListener } from ' element-ui/src/utils/resize-event' ;
148
- import { t } from ' element-ui/src/locale' ;
149
148
import scrollIntoView from ' element-ui/src/utils/scroll-into-view' ;
150
149
import { getValueByPath , valueEquals , isIE , isEdge } from ' element-ui/src/utils/util' ;
151
150
import NavigationMixin from ' ./navigation-mixin' ;
235
234
return [' small' , ' mini' ].indexOf (this .selectSize ) > - 1
236
235
? ' mini'
237
236
: ' small' ;
237
+ },
238
+ propPlaceholder () {
239
+ return typeof this .placeholder !== ' undefined' ? this .placeholder : this .t (' el.select.placeholder' );
238
240
}
239
241
},
240
242
288
290
},
289
291
placeholder: {
290
292
type: String ,
291
- default () {
292
- return t (' el.select.placeholder' );
293
- }
293
+ required: false
294
294
},
295
295
defaultFirstOption: Boolean ,
296
296
reserveKeyword: Boolean ,
339
339
});
340
340
},
341
341
342
- placeholder (val ) {
342
+ propPlaceholder (val ) {
343
343
this .cachedPlaceHolder = this .currentPlaceholder = val;
344
344
},
345
345
838
838
},
839
839
840
840
created () {
841
- this .cachedPlaceHolder = this .currentPlaceholder = this .placeholder ;
841
+ this .cachedPlaceHolder = this .currentPlaceholder = this .propPlaceholder ;
842
842
if (this .multiple && ! Array .isArray (this .value )) {
843
843
this .$emit (' input' , []);
844
844
}
You can’t perform that action at this time.
0 commit comments