下单功能
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
.icon_a_sousuo1_self{
|
||||
font-size: 37px;
|
||||
color: $color_font_two;
|
||||
@@ -59,5 +60,8 @@
|
||||
.icon_out{
|
||||
margin-right: 10px;
|
||||
}
|
||||
.input_out{
|
||||
padding-left: 20px !important;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,7 +13,8 @@ type Params = {
|
||||
placeIcon?: 'out'|'inner',
|
||||
style?: Object,
|
||||
showBtn?: false|true,
|
||||
btnStyle?: Object
|
||||
btnStyle?: Object,
|
||||
btnTitle?: string
|
||||
}
|
||||
|
||||
export default memo(({
|
||||
@@ -25,7 +26,8 @@ export default memo(({
|
||||
showBtn = false,
|
||||
style = {},
|
||||
btnStyle = {},
|
||||
placeIcon = 'inner'
|
||||
placeIcon = 'inner',
|
||||
btnTitle = '搜索'
|
||||
}:Params) => {
|
||||
const [inputCon , setInputCon] = useState('')
|
||||
|
||||
@@ -49,12 +51,12 @@ export default memo(({
|
||||
<View className={styles.search_main} onClick={() => onSearch()} style={style}>
|
||||
<View className={styles.search_con}>
|
||||
{showIcon&&<View className={classnames('iconfont', 'icon-sousuo', styles.icon_a_sousuo1_self, placeIcon=='inner'?styles.icon_inner:styles.icon_out)}></View>}
|
||||
<Input placeholderStyle='color:#ABABAB; font-size:26rpx' disabled={disabled} value={inputCon} placeholder={placeholder} onInput={(e) => onInputEven(e)}></Input>
|
||||
<Input placeholderStyle='color:#ABABAB; font-size:26rpx' className={classnames(placeIcon=='out'&&styles.input_out)} disabled={disabled} value={inputCon} placeholder={placeholder} onInput={(e) => onInputEven(e)}></Input>
|
||||
{!!inputCon&&<View className={styles.search_closeBtn}>
|
||||
<CloseBtn onClose={() => clearInput()} styleObj={{width: '20rpx', height:'20rpx', backgroundColor:'#fff', border:'0'}}/>
|
||||
</View>}
|
||||
</View>
|
||||
{showBtn&&<View style={btnStyle} className={styles.btn} onClick = {() => onSearch()}>搜索</View>}
|
||||
{showBtn&&<View style={btnStyle} className={styles.btn} onClick = {() => onSearch()}>{btnTitle}</View>}
|
||||
</View>
|
||||
</>
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user