diff --git a/src/components/search/index.tsx b/src/components/search/index.tsx
index b007322..3e0be65 100644
--- a/src/components/search/index.tsx
+++ b/src/components/search/index.tsx
@@ -95,7 +95,7 @@ const Search = (
customStyle={{ width: '100%' }}
/>
- {!!inputCon && clearInput()} styleObj={{ width: '20rpx', height: '20rpx', backgroundColor: '#fff', border: '0' }} />}
+ {!!inputCon && }
{showScan && (
{
// 输入了搜索关键字
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 = () => {
- back()}>取消
+ 搜索