Authored by 郭成尧

Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop

@@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
7 </div> 7 </div>
8 <div class="filter-params"> 8 <div class="filter-params">
9 <ul class="filter-cates"> 9 <ul class="filter-cates">
10 - <li class="filter-cate" v-for="classify in config" v-if="typeof classify === 'object'" @click="entrySub($key)"> 10 + <li class="filter-cate" v-for="classify in config" v-if="showCate($key, classify)" @click="entrySub($key)">
11 <i class="icon icon-right right"></i> 11 <i class="icon icon-right right"></i>
12 <span class="filter-cate-label">{{$key | filter-en-cn }}</span> 12 <span class="filter-cate-label">{{$key | filter-en-cn }}</span>
13 <span class="filter-cate-val">{{showLabel($key)}}</span> 13 <span class="filter-cate-val">{{showLabel($key)}}</span>
@@ -55,6 +55,19 @@ @@ -55,6 +55,19 @@
55 } 55 }
56 }, 56 },
57 methods: { 57 methods: {
  58 + // 只显示 可选值 大于 1的 筛选项
  59 + // groupSort 特殊处理
  60 + showCate: function(cateName, cateVals) {
  61 + if (toString.call(cateVals) === '[object Array]') {
  62 + if (cateName === 'groupSort') {
  63 + // TODO
  64 + } else if (cateVals.length > 1) {
  65 + return true;
  66 + }
  67 + }
  68 +
  69 + return false;
  70 + },
58 clearVals: function() { 71 clearVals: function() {
59 // remove all value 72 // remove all value
60 this.$set('selected', {}); 73 this.$set('selected', {});
@@ -127,6 +140,10 @@ @@ -127,6 +140,10 @@
127 <style> 140 <style>
128 @import "../../../scss/common/color"; 141 @import "../../../scss/common/color";
129 142
  143 + .app.ios .filter {
  144 + padding-top: 40px;
  145 + }
  146 +
130 .filter { 147 .filter {
131 position: fixed; 148 position: fixed;
132 z-index: 1001; 149 z-index: 1001;
@@ -185,6 +202,10 @@ @@ -185,6 +202,10 @@
185 .filter-cate-val { 202 .filter-cate-val {
186 float: right; 203 float: right;
187 font-size: 28px; 204 font-size: 28px;
  205 + max-width: 50%;
  206 + white-space: nowrap;
  207 + text-overflow: ellipsis;
  208 + overflow: hidden;
188 } 209 }
189 210
190 .filter-cate-val, 211 .filter-cate-val,