🐞 fix(ID1001277): 【电子商城小程序】-【色卡剪样】-【领取色卡】--没选择面料,确定按钮置灰显示
【【电子商城小程序】-【色卡剪样】-【领取色卡】--没选择面料,确定按钮置灰显示】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001277
This commit is contained in:
parent
9e057cb8db
commit
38b4c5ade0
@ -100,16 +100,20 @@ export default () => {
|
||||
})
|
||||
}
|
||||
}
|
||||
// 多选
|
||||
const multipleSelection = useRef<any[]>([])
|
||||
|
||||
const onSelectData = (val, status) => {
|
||||
if (status) {
|
||||
multipleSelection.current.push(val)
|
||||
setSelectList(e => [val, ...e])
|
||||
}
|
||||
else {
|
||||
const res = selectList?.filter((item) => {
|
||||
return val.id != item.id
|
||||
})
|
||||
setSelectList(e => res)
|
||||
multipleSelection.current = res
|
||||
setSelectList(res)
|
||||
}
|
||||
}
|
||||
|
||||
@ -136,7 +140,7 @@ export default () => {
|
||||
</InfiniteScroll>
|
||||
</View>
|
||||
<View className={styles.get_card_btn} onClick={onSubmit}>
|
||||
<Text className={classNames(selectList.length > 0 ? styles.selected : '')}>确认</Text>
|
||||
<Text className={classNames(multipleSelection.current.length > 0 ? styles.selected : '')}>确认</Text>
|
||||
</View>
|
||||
</View>
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user