✨ feat(发货列表): 初步完成发货列表UI界面

This commit is contained in:
xuan
2022-09-19 19:32:47 +08:00
parent b9c3076f5d
commit fb589f120f
18 changed files with 683 additions and 133 deletions
+2 -2
View File
@@ -12,7 +12,7 @@
position: relative;
display: flex;
align-items: center;
width: 100%;
flex: 1 1 auto;
input{
font-size: 27px;
background: #eee;
@@ -66,4 +66,4 @@
padding-left: 20px !important;
}
}
}
+39 -15
View File
@@ -18,7 +18,8 @@ type Params = {
btnTitle?: string,
debounceTime?: number //防抖时间,不设默认为零
defaultValue?: string,
children?: ReactNode
children?: ReactNode,
customRightSlot?: ReactNode
}
export default memo(forwardRef(({
@@ -33,7 +34,8 @@ export default memo(forwardRef(({
btnTitle = '搜索', //搜索文字
debounceTime = 0, //防抖时间,不设默认为零
defaultValue = '',//默认值
children
children,
customRightSlot
}: Params, ref) => {
const [inputCon, setInputCon] = useState('')
const debounceTimeRef = useRef(0)
@@ -69,18 +71,40 @@ export default memo(forwardRef(({
}
return (
<>
<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' onConfirm={onSearch} 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}>{btnTitle}</View>}
{children}
<>
<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'
onConfirm={onSearch}
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>
)}
{customRightSlot}
</View>
{showBtn && (
<View style={btnStyle} className={styles.btn} onClick={onSearch}>
{btnTitle}
</View>
</>
)}
{children}
</View>
</>
)
}))
}))