🐞 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%' }}
|
customStyle={{ width: '100%' }}
|
||||||
/>
|
/>
|
||||||
<View className={styles.search_closeBtn}>
|
<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>
|
</View>
|
||||||
{showScan && (
|
{showScan && (
|
||||||
<View
|
<View
|
||||||
|
|||||||
@ -10,7 +10,6 @@ page {
|
|||||||
font-size: 28px;
|
font-size: 28px;
|
||||||
color: #000000;
|
color: #000000;
|
||||||
margin-left: 32px;
|
margin-left: 32px;
|
||||||
margin-right: 32px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.line {
|
.line {
|
||||||
|
|||||||
@ -302,21 +302,19 @@ const SearchPage = () => {
|
|||||||
|
|
||||||
// 输入了搜索关键字
|
// 输入了搜索关键字
|
||||||
const getSearchData = useCallback((e) => {
|
const getSearchData = useCallback((e) => {
|
||||||
if (e) {
|
if (!e) {
|
||||||
setHasFonts(true)
|
|
||||||
getProduct(e)
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
setHasFonts(false)
|
setHasFonts(false)
|
||||||
setSearchList([])
|
setSearchList([])
|
||||||
}
|
}
|
||||||
|
setdefaultvalue(e)
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
// 返回
|
// 搜索
|
||||||
const back = () => {
|
const onSearch = () => {
|
||||||
Taro.navigateBack({
|
if (defaultvalue) {
|
||||||
delta: 1,
|
setHasFonts(true)
|
||||||
})
|
getProduct(defaultvalue)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// 判断是否整数类型
|
// 判断是否整数类型
|
||||||
function isInteger(obj) {
|
function isInteger(obj) {
|
||||||
@ -420,7 +418,7 @@ const SearchPage = () => {
|
|||||||
<View className={styles.main}>
|
<View className={styles.main}>
|
||||||
<View className={styles.topBox}>
|
<View className={styles.topBox}>
|
||||||
<Search placeholder="请输入搜索布料" defaultValue={defaultvalue} showBtn={false} changeOnSearch={getSearchData} >
|
<Search placeholder="请输入搜索布料" defaultValue={defaultvalue} showBtn={false} changeOnSearch={getSearchData} >
|
||||||
<View className={styles.cancelFont} onClick={() => back()}>取消</View>
|
<View className={styles.cancelFont} onClick={onSearch}>搜索</View>
|
||||||
</Search>
|
</Search>
|
||||||
</View>
|
</View>
|
||||||
<View className={styles.line}></View>
|
<View className={styles.line}></View>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user