fix(Search): icon slot not work

This commit is contained in:
chenjiahan 2020-08-17 10:22:18 +08:00
parent f978642277
commit b4e02668cf

View File

@ -93,6 +93,10 @@ export default createComponent({
<div class={bem('content', props.shape)}> <div class={bem('content', props.shape)}>
{Label()} {Label()}
<Field <Field
v-slots={{
'left-icon': slots['left-icon'],
'right-icon': slots['right-icon'],
}}
type="search" type="search"
border={false} border={false}
leftIcon={props.leftIcon} leftIcon={props.leftIcon}
@ -100,10 +104,6 @@ export default createComponent({
clearable={props.clearable} clearable={props.clearable}
modelValue={props.modelValue} modelValue={props.modelValue}
clearTrigger={props.clearTrigger} clearTrigger={props.clearTrigger}
scopedSlots={{
'left-icon': slots['left-icon'],
'right-icon': slots['right-icon'],
}}
{...fieldData} {...fieldData}
/> />
</div> </div>