zs 1 سال پیش
والد
کامیت
bab02cf7a6
1فایلهای تغییر یافته به همراه2 افزوده شده و 1 حذف شده
  1. 2 1
      pages/home/index.vue

+ 2 - 1
pages/home/index.vue

@@ -2,7 +2,7 @@
 	<view class="content">
 		<view class="one">
 			<view class="one_1" v-if="!focus">
-				<input type='text' placeholder='搜索商品' @focus="focusHandler"></input>
+				<input type='text' v-model="searchInfo.name" @focus="focusHandler" placeholder='搜索商品'></input>
 			</view>
 			<view class="one_2" v-if="focus">
 				<view class="left">
@@ -78,6 +78,7 @@
 		},
 		async onShow() {
 			const that = this;
+			that.$set(that, `searchInfo`, {})
 			that.clearPage();
 			await that.search();
 		},