对接确认订单

This commit is contained in:
2022-05-16 19:14:09 +08:00
parent 91934d0905
commit 754b3330a9
17 changed files with 761 additions and 142 deletions
+16 -10
View File
@@ -17,23 +17,29 @@ type Params = {
btnStyle?: Object,
btnTitle?: string,
debounceTime?: number //防抖时间,不设默认为零
defaultValue?: string
}
export default forwardRef(({
clickOnSearch,
changeOnSearch,
disabled = false,
clickOnSearch, //点击筛选按钮触发
changeOnSearch, //输入文字触发
disabled = false, //是否禁用
placeholder = '输入搜索内容',
showIcon = true,
showBtn = false,
btnStyle = {},
placeIcon = 'inner',
btnTitle = '搜索',
debounceTime = 0,
showIcon = true, //是否显示关闭图标
showBtn = false, //是否显示搜索按钮
btnStyle = {},
placeIcon = 'inner',
btnTitle = '搜索', //搜索文字
debounceTime = 0, //防抖时间,不设默认为零
defaultValue = '' //默认值
}:Params, ref) => {
const [inputCon , setInputCon] = useState('')
const debounceTimeRef = useRef(0)
useEffect(() => {
setInputCon(defaultValue)
}, [defaultValue])
useEffect(() => {
debounceTimeRef.current = debounceTime
}, [debounceTime])
@@ -63,7 +69,7 @@ export default forwardRef(({
return (
<>
<View className={styles.search_main} onClick={() => clickOnSearch?.(inputCon)}>
<View className={styles.search_main} >
<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' className={classnames(placeIcon=='out'&&styles.input_out)} disabled={disabled} value={inputCon} placeholder={placeholder} onInput={(e) => onInputEven(e)}></Input>