- 当 bundleItems 可能为 null 时默认值为空数组 - 防止 TypeError: Cannot read properties of null (reading 'bundleItems')
@@ -460,6 +460,7 @@ export default {
}
},
addBundleItem() {
+ this.bundleItems = this.bundleItems || []
this.bundleItems.push({
childProductId: null,
childSkuId: null,