...
|
...
|
@@ -7,7 +7,7 @@ |
|
|
</div>
|
|
|
<div class="filter-params">
|
|
|
<ul class="filter-cates">
|
|
|
<li class="filter-cate" v-for="classify in config" v-if="typeof classify === 'object'" @click="entrySub($key)">
|
|
|
<li class="filter-cate" v-for="classify in config" v-if="showCate($key, classify)" @click="entrySub($key)">
|
|
|
<i class="icon icon-right right"></i>
|
|
|
<span class="filter-cate-label">{{$key | filter-en-cn }}</span>
|
|
|
<span class="filter-cate-val">{{showLabel($key)}}</span>
|
...
|
...
|
@@ -55,6 +55,19 @@ |
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
// 只显示 可选值 大于 1的 筛选项
|
|
|
// groupSort 特殊处理
|
|
|
showCate: function(cateName, cateVals) {
|
|
|
if (toString.call(cateVals) === '[object Array]') {
|
|
|
if (cateName === 'groupSort') {
|
|
|
// TODO
|
|
|
} else if (cateVals.length > 1) {
|
|
|
return true;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
return false;
|
|
|
},
|
|
|
clearVals: function() {
|
|
|
// remove all value
|
|
|
this.$set('selected', {});
|
...
|
...
|
@@ -127,6 +140,10 @@ |
|
|
<style>
|
|
|
@import "../../../scss/common/color";
|
|
|
|
|
|
.app.ios .filter {
|
|
|
padding-top: 40px;
|
|
|
}
|
|
|
|
|
|
.filter {
|
|
|
position: fixed;
|
|
|
z-index: 1001;
|
...
|
...
|
@@ -185,6 +202,10 @@ |
|
|
.filter-cate-val {
|
|
|
float: right;
|
|
|
font-size: 28px;
|
|
|
max-width: 50%;
|
|
|
white-space: nowrap;
|
|
|
text-overflow: ellipsis;
|
|
|
overflow: hidden;
|
|
|
}
|
|
|
|
|
|
.filter-cate-val,
|
...
|
...
|
|