fix(harmony): 双列模式,点击图片等不能进入商品详情页面

This commit is contained in:
2026-06-05 17:39:50 +08:00
parent dcc261b0d0
commit 4f44b4f574
3 changed files with 19 additions and 19 deletions

View File

@@ -144,6 +144,14 @@ export default {
},
listenRefresh() {
this.$emit('listenRefresh', true);
},
/**
* 主动重建 slot DOM。
* 鸿蒙下通过 :key 变化重建的 .goods-item 元素 @click 事件绑定会丢失,
* 通过自增 listSlotKey 走 slot 重建路径可恢复事件绑定。
*/
forceSlotRebuild() {
this.listSlotKey = (this.listSlotKey || 0) + 1;
}
}
};