checkpoint: pre-refactor state before fixing P0/P1 issues

This commit is contained in:
2026-06-11 18:40:59 +08:00
parent 2c3c2653fa
commit d55ed60907
41 changed files with 1129 additions and 1051 deletions

View File

@@ -12,7 +12,8 @@ Component({
methods: {
onTab(e: WechatMiniprogram.CustomEvent) {
const index = e.currentTarget.dataset.index as number
// dataset 取出的是字符串,必须转数字,否则 WXML 中 selected === n 严格比较失败
const index = Number(e.currentTarget.dataset.index)
const path = e.currentTarget.dataset.path as string
if (index === this.data.selected) return
this.setData({ selected: index })