🐞 fix(ID1001592): 【内部小程序】- 搜索不出内容,需要重新退出进去才能搜索到。
【【内部小程序】- 搜索不出内容,需要重新退出进去才能搜索到。】 https://www.tapd.cn/53459131/bugtrace/bugs/view/1153459131001001592
This commit is contained in:
parent
7afb11bc74
commit
fab0652997
@ -95,7 +95,7 @@ const Search = (
|
||||
customStyle={{ width: '100%' }}
|
||||
/>
|
||||
<View className={styles.search_closeBtn}>
|
||||
{!!inputCon && <CloseBtn onClose={() => clearInput()} styleObj={{ width: '20rpx', height: '20rpx', backgroundColor: '#fff', border: '0' }} />}
|
||||
{!!inputCon && <CloseBtn onClose={clearInput} styleObj={{ width: '20rpx', height: '20rpx', backgroundColor: '#fff', border: '0' }} />}
|
||||
</View>
|
||||
{showScan && (
|
||||
<View
|
||||
|
||||
@ -10,7 +10,6 @@ page {
|
||||
font-size: 28px;
|
||||
color: #000000;
|
||||
margin-left: 32px;
|
||||
margin-right: 32px;
|
||||
}
|
||||
|
||||
.line {
|
||||
|
||||
@ -302,21 +302,19 @@ const SearchPage = () => {
|
||||
|
||||
// 输入了搜索关键字
|
||||
const getSearchData = useCallback((e) => {
|
||||
if (e) {
|
||||
setHasFonts(true)
|
||||
getProduct(e)
|
||||
}
|
||||
else {
|
||||
if (!e) {
|
||||
setHasFonts(false)
|
||||
setSearchList([])
|
||||
}
|
||||
setdefaultvalue(e)
|
||||
}, [])
|
||||
|
||||
// 返回
|
||||
const back = () => {
|
||||
Taro.navigateBack({
|
||||
delta: 1,
|
||||
})
|
||||
// 搜索
|
||||
const onSearch = () => {
|
||||
if (defaultvalue) {
|
||||
setHasFonts(true)
|
||||
getProduct(defaultvalue)
|
||||
}
|
||||
}
|
||||
// 判断是否整数类型
|
||||
function isInteger(obj) {
|
||||
@ -420,7 +418,7 @@ const SearchPage = () => {
|
||||
<View className={styles.main}>
|
||||
<View className={styles.topBox}>
|
||||
<Search placeholder="请输入搜索布料" defaultValue={defaultvalue} showBtn={false} changeOnSearch={getSearchData} >
|
||||
<View className={styles.cancelFont} onClick={() => back()}>取消</View>
|
||||
<View className={styles.cancelFont} onClick={onSearch}>搜索</View>
|
||||
</Search>
|
||||
</View>
|
||||
<View className={styles.line}></View>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user