fix: select placeholder support slot #4995

pull/4996/head
tangjinzhou 2021-12-07 22:23:36 +08:00
parent 3bb093cb23
commit 5ed8f8686d
1 changed files with 3 additions and 0 deletions

View File

@ -59,6 +59,7 @@ const Select = defineComponent({
'clearIcon',
'dropdownRender',
'option',
'placeholder',
],
setup(props, { attrs, emit, slots, expose }) {
const selectRef = ref();
@ -120,6 +121,7 @@ const Select = defineComponent({
virtual,
dropdownMatchSelectWidth,
id = formItemContext.id.value,
placeholder = slots.placeholder?.(),
} = props;
const { renderEmpty, getPopupContainer: getContextPopupContainer } = configProvider;
@ -168,6 +170,7 @@ const Select = defineComponent({
dropdownMatchSelectWidth={dropdownMatchSelectWidth}
{...selectProps}
{...attrs}
placeholder={placeholder}
listHeight={listHeight}
listItemHeight={listItemHeight}
mode={mode.value}