Commit af084b83 by 李伟康

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

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