diff --git a/src/components/ProductList.vue b/src/components/ProductList.vue index 1615235..366145e 100644 --- a/src/components/ProductList.vue +++ b/src/components/ProductList.vue @@ -42,7 +42,7 @@ export default { if (this.numbers[product.id] === undefined) { // this.$set(this.numbers, product.id, 1); // Vue 3 已不再需要动态设置数据属性绑定了 - this.numbers[product.id] = product.inventory ? 1 : 0; + this.numbers[product.id] = 1; } }); },