Explorar el Código

购物车数量

skyblued hace 3 años
padre
commit
bd1865437f
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      src/views/cart/index.tsx

+ 5 - 1
src/views/cart/index.tsx

@@ -168,7 +168,11 @@ export default defineComponent({
                                 onClick={e => {
                                   e.stopPropagation()
                                 }}
-                                onChange={() => this.setCartItem(item)}
+                                onChange={() => {
+                                  if (item.quantity){
+                                    this.setCartItem(item)
+                                  }
+                                }}
                                 inputWidth="50px"
                                 buttonSize="24px"
                                 min={1}