[new feature] Search: add right-icon slot

This commit is contained in:
陈嘉涵
2019-05-27 14:59:58 +08:00
parent 613679c2aa
commit 6974367b03
6 changed files with 45 additions and 4 deletions

View File

@@ -23,6 +23,7 @@ export type SearchSlots = DefaultSlots & {
label?: ScopedSlot;
action?: ScopedSlot;
'left-icon'?: ScopedSlot;
'right-icon'?: ScopedSlot;
};
export type SearchEvents = {
@@ -97,7 +98,10 @@ function Search(
value={props.value}
leftIcon={props.leftIcon}
rightIcon={props.rightIcon}
scopedSlots={{ 'left-icon': slots['left-icon'] }}
scopedSlots={{
'left-icon': slots['left-icon'],
'right-icon': slots['right-icon']
}}
{...fieldData}
/>
</div>