fix: select placeholder support slot #4995
parent
3bb093cb23
commit
5ed8f8686d
|
@ -59,6 +59,7 @@ const Select = defineComponent({
|
||||||
'clearIcon',
|
'clearIcon',
|
||||||
'dropdownRender',
|
'dropdownRender',
|
||||||
'option',
|
'option',
|
||||||
|
'placeholder',
|
||||||
],
|
],
|
||||||
setup(props, { attrs, emit, slots, expose }) {
|
setup(props, { attrs, emit, slots, expose }) {
|
||||||
const selectRef = ref();
|
const selectRef = ref();
|
||||||
|
@ -120,6 +121,7 @@ const Select = defineComponent({
|
||||||
virtual,
|
virtual,
|
||||||
dropdownMatchSelectWidth,
|
dropdownMatchSelectWidth,
|
||||||
id = formItemContext.id.value,
|
id = formItemContext.id.value,
|
||||||
|
placeholder = slots.placeholder?.(),
|
||||||
} = props;
|
} = props;
|
||||||
|
|
||||||
const { renderEmpty, getPopupContainer: getContextPopupContainer } = configProvider;
|
const { renderEmpty, getPopupContainer: getContextPopupContainer } = configProvider;
|
||||||
|
@ -168,6 +170,7 @@ const Select = defineComponent({
|
||||||
dropdownMatchSelectWidth={dropdownMatchSelectWidth}
|
dropdownMatchSelectWidth={dropdownMatchSelectWidth}
|
||||||
{...selectProps}
|
{...selectProps}
|
||||||
{...attrs}
|
{...attrs}
|
||||||
|
placeholder={placeholder}
|
||||||
listHeight={listHeight}
|
listHeight={listHeight}
|
||||||
listItemHeight={listItemHeight}
|
listItemHeight={listItemHeight}
|
||||||
mode={mode.value}
|
mode={mode.value}
|
||||||
|
|
Loading…
Reference in New Issue