Merge branch 'develop' of git.yoho.cn:fe/yohoblk-wap into develop
Showing
3 changed files
with
7 additions
and
6 deletions
1 | <template> | 1 | <template> |
2 | <div v-if="channel.length" class="channel-tab"> | 2 | <div v-if="channel.length" class="channel-tab"> |
3 | - <div class="channel" v-for="(index, item) in channel" v-bind:class="{focus: index === current}" v-on:click="changeChannel(index)"> | 3 | + <div class="channel" v-for="(index, item) in channel" v-bind:class="{focus: index === current}" v-on:click="changeChannel(index)" v-bind:style="{width: (1 / channel.length) * 100 + '%'}"> |
4 | <span class="name">{{item.name | uppercase}}</span> | 4 | <span class="name">{{item.name | uppercase}}</span> |
5 | </div> | 5 | </div> |
6 | </div> | 6 | </div> |
@@ -84,7 +84,6 @@ | @@ -84,7 +84,6 @@ | ||
84 | .channel { | 84 | .channel { |
85 | display: inline-block; | 85 | display: inline-block; |
86 | line-height: 90px; | 86 | line-height: 90px; |
87 | - width: 33%; | ||
88 | color: #999; | 87 | color: #999; |
89 | 88 | ||
90 | &.focus { | 89 | &.focus { |
@@ -183,9 +183,9 @@ | @@ -183,9 +183,9 @@ | ||
183 | 183 | ||
184 | module.exports = { | 184 | module.exports = { |
185 | components: { | 185 | components: { |
186 | - 'content-block': require('./content-block.vue'), | ||
187 | - 'product-list': require('component/product/list.vue'), | ||
188 | - 'top-nav': require('./top-nav.vue') | 186 | + contentBlock: require('./content-block.vue'), |
187 | + productList: require('component/product/list.vue'), | ||
188 | + topNav: require('./top-nav.vue') | ||
189 | }, | 189 | }, |
190 | data() { | 190 | data() { |
191 | return { | 191 | return { |
@@ -103,8 +103,10 @@ | @@ -103,8 +103,10 @@ | ||
103 | if (result.code === 200) { | 103 | if (result.code === 200) { |
104 | if (this.editorialList.length > 0 && result.data.list.length > 0) { | 104 | if (this.editorialList.length > 0 && result.data.list.length > 0) { |
105 | this.$set('editorialList', this.editorialList.concat(result.data.list)); | 105 | this.$set('editorialList', this.editorialList.concat(result.data.list)); |
106 | - } else { | 106 | + } else if (result.data.list.length > 0) { |
107 | this.editorialList = result.data.list; | 107 | this.editorialList = result.data.list; |
108 | + } else { | ||
109 | + this.scrollDisabled = true; | ||
108 | } | 110 | } |
109 | } else { | 111 | } else { |
110 | this.scrollDisabled = true; | 112 | this.scrollDisabled = true; |
-
Please register or login to post a comment