Commit 73282844 authored by 张娇(东信)'s avatar 张娇(东信)

乡村旅居搜索

parent 4e2c1512
...@@ -11,10 +11,11 @@ ...@@ -11,10 +11,11 @@
/> />
<input <input
type="text" type="text"
:value="test"
class="text" class="text"
:placeholder="placeholderText" :placeholder="placeholderText"
placeholder-style="font-size:16rpx;" placeholder-style="font-size:16rpx;"
:value="modelValue"
@input="updateModelValue"
@blur="toSearch" @blur="toSearch"
@keyup.enter="toSearch" @keyup.enter="toSearch"
@focus="toSearch" @focus="toSearch"
...@@ -35,7 +36,11 @@ const props = defineProps({ ...@@ -35,7 +36,11 @@ const props = defineProps({
type: String, type: String,
default: '', default: '',
}, },
modelValue: String,
}); });
const updateModelValue = (event) => {
emit('update:modelValue', event.target.value);
};
const toSearch = (test) => { const toSearch = (test) => {
emit('search', test); emit('search', test);
}; };
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
iconSrc="/static/assistingAgriculture/assets/left.png" iconSrc="/static/assistingAgriculture/assets/left.png"
placeholderText="请输入要搜索的关键词" placeholderText="请输入要搜索的关键词"
@search="toSearch" @search="toSearch"
v-model="keyword"
></Search> ></Search>
</view> </view>
<view class="bac-img"> <view class="bac-img">
...@@ -229,8 +230,8 @@ const locationFiltering = (index) => { ...@@ -229,8 +230,8 @@ const locationFiltering = (index) => {
} }
}; };
onPullDownRefresh(() => { onPullDownRefresh(() => {
keyword.value = '';
getProd(); getProd();
getPopular();
setTimeout(() => { setTimeout(() => {
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}, 1000); }, 1000);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment