admin管理员组文章数量:1516870
小程序, 多选项
小程序, 多选项
<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()}
版权声明:本文标题:小程序, 多选项 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.betaflare.com/biancheng/1701676273a461616.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。


发表评论