0.0.20 • Published 4 years ago

@retailwe/ui-filter v0.0.20

Weekly downloads
-
License
-
Repository
-
Last release
4 years ago

商品筛选

引入

"usingComponents": {
  "wr-filter": "@retailwe/wr-filter/index",
  "wr-filter-popup": "@retailwe/wr-filter/index"
}

代码演示

// 开启筛选后可插入slot
<wr-filter wr-class="filter-container" bind:change="handleFilterChange" layout="{{layout}}" sorts="{{sorts}}" overall="{{overall}}" bind:showFilterPopup="showFilterPopup">
<view slot="filterPopup">
    <wr-filter-popup  show="{{show}}"  bind:showFilterPopupClose="showFilterPopupClose" bind:reset="reset" bind:confirm="confirm">
        <view slot="filterSlot">
            <view class="price-container">
            <view class="price-between">价格区间</view>
            <view class="price-ipts-wrap">
                <input type="number" class="price-ipt {{minSalePriceFocus ? 'focus' : ''}} {{minActive ? 'active' : ''}}" bindfocus="handleMinPriceFocus" bindblur="handleMinPriceBlur" placeholder="最低价" value="{{minVal}}" bindinput="onMinValAction" />
                <text class="price-divided"></text>
                <input type="number" class="price-ipt {{maxSalePriceFocus ? 'focus' : ''}} {{maxActive ? 'active' : ''}}" bindfocus="handleMaxPriceFocus" bindblur="handleMaxPriceBlur" placeholder="最高价" value="{{maxVal}}" bindinput="onMaxValAction" />
            </view>
            </view>
        </view>
    </wr-filter-popup>
</view>
</wr-filter>

入参

参数说明类型默认值是否必要
overall1为综合默认 高亮 0为其它模式,不高亮Number''
layout1为水平排序 0为垂直排序Number1
sorts有三种模式 desc降序,asc升序, 默认为空String''
color主颜色String#FA550F

Events

事件是否必要说明
change返回配置参数
showFilterPopup开启筛选

外部样式类

类名说明
wr-class根节点样式类

slot

name说明
filterPopup筛选弹窗slot
0.0.20

4 years ago

0.0.19

4 years ago

0.0.18

4 years ago

0.0.17

4 years ago

0.0.16

4 years ago

0.0.15

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.12-alpha.0

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7-beta.1

4 years ago