fix: 分类筛选切换无效 —— chip 自定义事件名 tap 与微信原生触摸事件冲突,改 select

- chip 组件 triggerEvent 原为 'tap'(微信原生触摸事件名),嵌在 scroll-view scroll-x 内时手势可能被当滚动消费,导致 onValue 收不到 e.detail.value -> 不筛选 -> 仍显示全部动作
- 改为非原生事件名 'select',category.wxml 绑定同步改 bind:select
- 选中态配色从旧金色(gold-soft/gold-2/gold-line)换成 Volt 绿(accent-soft/accent/accent-ring)+加粗,当前分类一眼可见
- 前端筛选逻辑与后端筛选均经沙箱+真机 API 验证正确(bodyPart=chest/back 返回不同数据)
This commit is contained in:
2026-07-22 23:34:04 +08:00
parent a0894837bd
commit d74aae02b0
3 changed files with 6 additions and 5 deletions

View File

@@ -7,7 +7,7 @@ Component({
},
methods: {
onTap() {
this.triggerEvent('tap', {
this.triggerEvent('select', {
value: this.data.value,
label: this.data.label
});

View File

@@ -12,7 +12,8 @@
white-space: nowrap;
}
.chip--active {
background: var(--gold-soft);
color: var(--gold-2);
border-color: var(--gold-line);
background: var(--accent-soft);
color: var(--accent);
border-color: var(--accent-ring);
font-weight: 600;
}