mip-filter 篩選
mip-filter 篩選
篩選元件,自適應pc和wise寬度。 mipengine.org有引用
範例
篩選功能,支援從hash定位篩選項目.
<mip-filter mip-filter-filterWrap=".filter" mip-filter-itemWrap=".filter-item-wrap" mip-filter-enableHash="true"> <sidebar class="filter"> <div class="filter-result"></div> <ul class="filter-list"> <li class="filter-title"> <div class="filter-link" data-filtertype="all">(all)查看全部<span class="filter-num">3</span></div> </li> <li class="filter-title"> <div class="filter-link" data-filtertype="widget">(widget)组件<span class="filter-num">2</span></div> </li> <li class="filter-title"> <div class="filter-link" data-filtertype="layout">(layout)组件布局<span class="filter-num">1</span></div> </li> </ul> </sidebar> <div class="filter-item-wrap"> <div class="filter-item" data-filtertype="widget"> <span>(widget) 组件新增</span> </div> <div class="filter-item" data-filtertype="layout"> <span>(layout)广告组件 layout 升级</span> </div> <div class="filter-item" data-filtertype="widget"> <span>(widget)测试版发布</span> </div> </div> </mip-filter>
屬性
#mip-filter-filterWrap
說明:篩選按鈕DOM
必選項:是
類型:字串
取值:document.querySelector()可填內容,如「.box 」
mip-filter-itemWrap
說明:篩選項目DOM
必選項:是
類型:字串
取值:document.querySelector()可填內容,如「.box」
mip-filter-enableHash
說明:是否支援hash控制
必選項: 否,
類型:字串
取值:true, false
預設值:true