Commit 1a4d6c96 by 李伟康

fix(boutique): 修复活动页面SKU引用和切换逻辑

- 添加对SKU组件引用的检查以避免空指针错误
- 恢复被注释掉的商品车切换功能
- 确保在标签页切换时正确清除画布状态
1 parent 7767c27c
......@@ -286,7 +286,7 @@ export default {
this.isSelect = false
this.updateViewKey = Date.now()
this.clearCanvas()
if (this.tabIndex == 0 && !this.hasBeforeActivity && !this.hasAfterActivity) this.changeTab(0, true, false)
if (this.tabIndex == 0 && !this.$refs.sku && !this.hasBeforeActivity && !this.hasAfterActivity) this.changeTab(0, true, false)
},
changePreView(e, leave = true, clearBoard = true) {
let { currentItem } = this,
......@@ -373,7 +373,7 @@ export default {
this.tabListId = this.tabs[index].id
setTimeout(() => {
if (changeCar && goods && [0, 1].includes(this.tabListId)) goods.changeCar(this.currentCarId)
// if (skuRef && skuIndex == index) skuRef.changeCar(this.currentCarId)
if (skuRef && skuIndex == index) skuRef.changeCar(this.currentCarId)
this.clearCanvas()
}, 100)
},
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!