Browse Source

bug 修复

lilei 4 years ago
parent
commit
d781d10b05

+ 3 - 3
components/uni-coods/uni-coods.vue

@@ -1,11 +1,11 @@
 <template>
 	<view class="goods-list">
-		<view class="goods-item" v-for="item in list" :key="item.id" @click="toDetail(item)">
-			<view class="goods-imgs">
+		<view class="goods-item" v-for="item in list" :key="item.id">
+			<view class="goods-imgs"  @click="toDetail(item)">
 				<view v-if="item.inventoryQty == 0" class="goods-staus">已售罄</view>
 				<u-lazy-load img-mode="scaleToFill" :height="imgHeight" :image="item.homeImage" :loading-img="loadingImg" :error-img="errorImg"></u-lazy-load>
 			</view>
-			<view class="name ellipsis-two">{{item.name}}</view>
+			<view class="name ellipsis-two"  @click="toDetail(item)">{{item.name}}</view>
 			<view class="price">
 				<view>
 					<text>{{item.sellGold}}</text>

+ 3 - 1
components/uni-number-box/uni-number-box.vue

@@ -45,7 +45,7 @@
 			},
 			inputValue(newVal, oldVal) {
 				if (+newVal !== +oldVal) {
-					this.$emit("change", newVal);
+					// this.$emit("change", newVal);
 				}
 			}
 		},
@@ -80,6 +80,7 @@
 
 				this.inputValue = String(value / scale);
 				this.$emit('input',this.inputValue)
+				this.$emit("change", this.inputValue);
 			},
 			_getDecimalScale() {
 				let scale = 1;
@@ -103,6 +104,7 @@
 				}
 				this.inputValue = value;
 				this.$emit('input',this.inputValue)
+				this.$emit("change", this.inputValue);
 			}
 		}
 	};