index.wxml 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <!--pages/goods/list/index.wxml-->
  2. <view class="px-3 pb-3">
  3. <view class="page-header">
  4. <view class="mb-3" bindtap="gosearch">
  5. <t-search t-class-input="t-search__input" t-class-input-container="t-search__input-container" value="{{albumInput.filterText}}" placeholder="搜索关键字" leftIcon="" disabled center>
  6. <t-icon slot="left-icon" prefix="wr" name="search" size="40rpx" color="#bbb" />
  7. </t-search>
  8. </view>
  9. <n-horbar items="{{borderlist}}" bindchange="onBorderChange" />
  10. </view>
  11. <t-tabs t-class="t-tabs" defaultValue="{{tabList[0].value}}" bind:change="tabChangeHandle">
  12. <t-tab-panel wx:for="{{tabList}}" wx:for-index="index" wx:key="index" label="{{item.label}}" value="{{item.value}}" />
  13. </t-tabs>
  14. <n-dropmenu id="filterMenu" n-class="mb20">
  15. <n-dropmenu-item options="{{searchOptions.option1}}" defaultValue="{{searchOptions.value1}}" bindchange="onGoodChange" style="flex: 1;" />
  16. <n-dropmenu-item options="{{searchOptions.option2}}" defaultValue="{{searchOptions.value2}}" bindchange="onSellChange" style="flex: 1;" />
  17. <n-dropmenu-btn bindtap="onChangeView">
  18. <view class="d-flex align-items-center" style="padding: 0 20rpx;">
  19. <t-icon prefix="hn" name="{{view === 'list' ? 'listview' : 'largeview'}}" size="34rpx" />
  20. </view>
  21. </n-dropmenu-btn>
  22. <n-dropmenu-btn bindtap="onFilterClick">
  23. <view class="d-flex align-items-center" style="padding: 0 60rpx 0 0;">
  24. <view style="border-left: 1px solid #f3f3f3; height: 70rpx;" />
  25. <view class="pl-2">筛选</view>
  26. <t-icon prefix="hn" name="shezhi" size="34rpx" />
  27. </view>
  28. </n-dropmenu-btn>
  29. </n-dropmenu>
  30. <view style="margin: 0;">
  31. <n-goods-list wx:if="{{albums && albums.length > 0}}" view="{{view}}" items="{{albums}}" bind:click="gotoGoodsDetail" borderId="{{albumInput.borderId}}"/>
  32. <t-empty wx:else icon="chart-bubble" description="暂无相关内容" t-class="mt-7" />
  33. </view>
  34. <n-load-more wx:if="{{albums && albums.length > 0}}" status="{{loadMoreStatus}}" no-more-text="没有更多了" />
  35. <t-back-top theme="round" bind:to-top="onToTop"></t-back-top>
  36. <t-popup visible="{{filterVisible}}" placement="right" bind:visible-change="onFilterClose">
  37. <n-taglist-wrap value="{{tagvalues}}" bindvaluechanged="onFilterValueChanged">
  38. <view class="filter-content" catchtouchmove="onMove">
  39. <scroll-view scroll-y class="filter-wrap">
  40. <t-collapse class="optionheader">
  41. <block wx:for="{{filterOptions}}" wx:key="index">
  42. <template is="moreOptions" data="{{item: item, idx: index}}" />
  43. </block>
  44. </t-collapse>
  45. </scroll-view>
  46. <view class="filter-btns-wrap px-3 pt-3 mb-3">
  47. <t-button theme="outline" bindtap="onSearchReset" class="flex-1 mr-3" block>重置</t-button>
  48. <t-button theme="primary" bindtap="onSearchConfirm" class="flex-1" block>
  49. 确定
  50. </t-button>
  51. </view>
  52. </view>
  53. </n-taglist-wrap>
  54. </t-popup>
  55. </view>
  56. <template name="moreOptions">
  57. <t-collapse-panel wx:key="more{{idx}}" header="{{item.label}}" value="{{idx}}" expandIcon>
  58. <n-taglist isImage="{{item.isImage}}" tag="{{'group_'+item.value}}" options="{{item.children}}" multiple />
  59. </t-collapse-panel>
  60. </template>