[new feature] Search: add left-icon prop

This commit is contained in:
陈嘉涵
2019-05-27 10:39:27 +08:00
parent 73f34be3a8
commit ac431276f9
5 changed files with 33 additions and 2 deletions

View File

@@ -13,6 +13,7 @@ export type SearchProps = {
shape: string;
value?: string;
label?: string;
leftIcon: string;
background: string;
showAction?: boolean;
};
@@ -91,9 +92,9 @@ function Search(
<Field
clearable
type="search"
value={props.value}
border={false}
leftIcon="search"
value={props.value}
leftIcon={props.leftIcon}
scopedSlots={{ 'left-icon': slots['left-icon'] }}
{...fieldData}
/>
@@ -114,6 +115,10 @@ Search.props = {
background: {
type: String,
default: '#fff'
},
leftIcon: {
type: String,
default: 'search'
}
};