cmy před 1 rokem
rodič
revize
74348d64b1
1 změnil soubory, kde provedl 7 přidání a 2 odebrání
  1. 7 2
      pages/shoping/list.vue

+ 7 - 2
pages/shoping/list.vue

@@ -5,13 +5,13 @@
 			<view class="input-box flex">
 				<view class=" input-content flex">
 					<view class="iconfont iconsearch"></view>
-					<view class="input"><input type="text"  placeholder="输入关键字搜索" @input='search'/></view>
+					<view class="input"><input type="text" v-model='keyword'  placeholder="输入关键字搜索" @input='search'/></view>
 				</view>
 			</view>
 			<picker mode="multiSelector" :range="listActionType" range-key='cate_name' @change="changeType" @columnchange='listChange'>
 				<view class="shop-name clamp">分类</view>
 			</picker>
-			<view class="shop-name clamp">重置</view>
+			<view class="shop-name clamp" @click="initSearch">重置</view>
 		</view>
 		<view class="jg" style="height: 20rpx;"></view>
 		<block :key="ind" v-for="(lss, ind) in list">
@@ -116,6 +116,11 @@
 		// // #endif
 		methods: {
 			...mapMutations(['setLat', 'setLon', 'setStoreInfo']),
+			initSearch(){
+				this.keyword='';
+				this.typeAction.cid='';
+				this.getShoping();
+			},
 			// 确认切换
 			changeType(res){
 				console.log(res);