🐞 fix: 部分位置需要判空
This commit is contained in:
@@ -62,9 +62,9 @@ export default {
|
||||
watch: {
|
||||
productId: {
|
||||
handler(newVal) {
|
||||
this.product = this.productMap && this.productMap[this.productId]
|
||||
? { ...this.productMap[this.productId] }
|
||||
: {};
|
||||
const res = this.productMap[this.productId] ? this.productMap[this.productId] : {};
|
||||
console.log(res)
|
||||
this.product = res;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user