小程序, 多选项
<view class="my-filter-btnwrap"><block wx:for="{{archiveList}}" wx:key="index"><view class="my-filter-btnitem text-ellipsis {{item.checked ? 'active' : ''}}" data-index="{{index}}" wx:if="{{filterIsSlideUp || (index < 12)}}" catchtap="archiveChoose">{{item.name}}</view></block></view>//init listgetCategoryAll() {fetch.apply.getCategoryAll({}, ({ object }) => {this.setData({archiveList: (object[0].childs || []).map(item => {item.checked = falsereturn item})})})},//切换archiveChoose(e) {const { archiveList } = this.dataconst { index } = e.currentTarget.datasetconst row = archiveList[index]row.checked = !row.checkedthis.setData({ archiveList })},//确认filterSure() {const { archiveList } = this.datathis.setData({filterShow: false,categoryId: archiveList.filter(row => row.checked).map(row => row.id).join(',')})// const { monitorPointName, qrIsbind, categoryId } = this.dataconst { projectName, qrIsbind, categoryId } = this.datathis.setData({// filterHighlight: monitorPointName || !(qrIsbind === -1) || !categoryIdfilterHighlight: projectName || !(qrIsbind === -1) || !categoryId})this.refresh()}