zhangjinxing 3 years ago
parent
commit
f372112291
2 changed files with 5 additions and 2 deletions
  1. 2 1
      src/components/inputNumber.vue
  2. 3 1
      src/views/product/index.vue

+ 2 - 1
src/components/inputNumber.vue

@@ -66,8 +66,9 @@ export default {
       this.num++;
 
       this.num = parseInt(this.num);
+      console.log(this.num);
       if (this.num < this.max) {
-        this.num++;
+        console.log(this.num);
         this.$emit("backNum", this.num);
       }
     },

+ 3 - 1
src/views/product/index.vue

@@ -230,7 +230,9 @@ export default {
       }
     },
     backNum(e) {
-      this.num = e - 1;
+      console.log(e, "eeee");
+
+      this.num = e;
       console.log(this.num);
     },
     async placeOrder() {