Commit af084b83 by 李伟康

refactor(boutique): 优化商品组件数据结构和标签切换逻辑

- 移除 GoodsBox 组件中未使用的 secondList 和 secondName 数据属性
- 调整 Reception 组件中 tab 切换时的异步操作顺序
- 修复标签切换时车辆变更逻辑的执行时机
- 简化条件判断语句的代码结构
1 parent bb5040ce
......@@ -49,9 +49,7 @@ export default {
flagObject: {
goodsFlag: false,
scrollTop: 0
},
secondList: [],
secondName: ''
}
}
},
watch: {
......
......@@ -359,9 +359,9 @@ export default {
let goods = this.$refs.goodsBox
this.tabIndex = index
this.currentItem = null
this.tabListId = this.tabs[index].id
setTimeout(() => {
this.tabListId = this.tabs[index].id
if (changeCar && goods && [0, 1].includes(this.tabListId)) goods.changeCar(this.currentCarId)
if (changeCar && goods && [0, 1].includes(this.tabListId)) goods.changeCar(this.currentCarId)
if (this.tabListId == 2) this.$refs.sku.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!