feat(category): 主分类(按器械/按部位)改为多选; filter-bar 内联默认展示几个分类其余收进"全部类型"面板
This commit is contained in:
@@ -3,32 +3,24 @@
|
||||
|
||||
<view class="section" style="padding-top: 8rpx;">
|
||||
<view wx:if="{{values.length}}" class="filterbar" style="top: calc({{statusBarHeight}}px + 88rpx);">
|
||||
<scroll-view scroll-x class="filterbar__row">
|
||||
<chip
|
||||
wx:for="{{values}}"
|
||||
wx:key="value"
|
||||
label="{{item.label}}"
|
||||
value="{{item.value}}"
|
||||
active="{{activeValue === item.value}}"
|
||||
bind:select="onValue" />
|
||||
<view class="filterbar__spacer"></view>
|
||||
</scroll-view>
|
||||
<filter-bar
|
||||
items="{{values}}"
|
||||
multiple="{{true}}"
|
||||
title="{{dimTitle}}"
|
||||
placeholder="全部类型"
|
||||
bind:change="onPrimaryChange" />
|
||||
|
||||
<view wx:if="{{secondaryList.length}}" class="filterbar__sub">
|
||||
<view class="filterbar__subhead">
|
||||
<text class="filterbar__sublabel">{{secondaryLabel}}</text>
|
||||
<text wx:if="{{secondarySelected.length}}" class="filterbar__clear" bindtap="onSecondaryClear">清除 ({{secondarySelected.length}})</text>
|
||||
</view>
|
||||
<scroll-view scroll-x class="filterbar__row">
|
||||
<chip
|
||||
wx:for="{{secondaryList}}"
|
||||
wx:key="value"
|
||||
label="{{item.label}}"
|
||||
value="{{item.value}}"
|
||||
active="{{item.active}}"
|
||||
bind:select="onSecondary" />
|
||||
<view class="filterbar__spacer"></view>
|
||||
</scroll-view>
|
||||
<filter-bar
|
||||
items="{{secondaryList}}"
|
||||
multiple="{{true}}"
|
||||
title="{{secondaryLabel}}"
|
||||
placeholder="筛选{{secondaryLabel}}"
|
||||
bind:change="onSecondaryChange" />
|
||||
</view>
|
||||
</view>
|
||||
<view wx:else class="filterbar__loading muted">{{ loading ? '加载分类中…' : '暂无分类' }}</view>
|
||||
|
||||
Reference in New Issue
Block a user