Showing
3 changed files
with
27 additions
and
5 deletions
@@ -2,11 +2,14 @@ | @@ -2,11 +2,14 @@ | ||
2 | <div class="resources"> | 2 | <div class="resources"> |
3 | <template v-for="floor in resources"> | 3 | <template v-for="floor in resources"> |
4 | <div class="focus" v-if="floor.focus" v-bind:style="{height: '182px'}"> | 4 | <div class="focus" v-if="floor.focus" v-bind:style="{height: '182px'}"> |
5 | - <focus v-bind:list="floor.data"></focus> | 5 | + <focus v-bind:floor="floor.data"></focus> |
6 | </div> | 6 | </div> |
7 | <div class="title-image" v-if="floor.titleImage"> | 7 | <div class="title-image" v-if="floor.titleImage"> |
8 | <title-image v-bind:floor="floor.data"></title-image> | 8 | <title-image v-bind:floor="floor.data"></title-image> |
9 | </div> | 9 | </div> |
10 | + <div class="goods" v-if="floor.goods"> | ||
11 | + <goods v-bind:floor="floor.data"></goods> | ||
12 | + </div> | ||
10 | </template> | 13 | </template> |
11 | </div> | 14 | </div> |
12 | </template> | 15 | </template> |
@@ -16,6 +19,7 @@ | @@ -16,6 +19,7 @@ | ||
16 | const tip = require('common/tip'); | 19 | const tip = require('common/tip'); |
17 | const focus = require('component/resources/focus.vue'); | 20 | const focus = require('component/resources/focus.vue'); |
18 | const titleImage = require('component/resources/title-image.vue'); | 21 | const titleImage = require('component/resources/title-image.vue'); |
22 | + const goods = require('component/resources/goods.vue'); | ||
19 | 23 | ||
20 | module.exports = { | 24 | module.exports = { |
21 | data() { | 25 | data() { |
@@ -25,7 +29,8 @@ | @@ -25,7 +29,8 @@ | ||
25 | }, | 29 | }, |
26 | components: { | 30 | components: { |
27 | focus: focus, | 31 | focus: focus, |
28 | - titleImage: titleImage | 32 | + titleImage: titleImage, |
33 | + goods: goods | ||
29 | }, | 34 | }, |
30 | init() { | 35 | init() { |
31 | $.ajax({ | 36 | $.ajax({ |
1 | <template> | 1 | <template> |
2 | - <swipe class="swipe swipe-{{list.length}}"> | ||
3 | - <swipe-item v-for="item in list" v-bind:style="{backgroundColor: item.bgColor}"> | 2 | + <swipe class="swipe swipe-{{floor.length}}"> |
3 | + <swipe-item v-for="item in floor" v-bind:style="{backgroundColor: item.bgColor}"> | ||
4 | <a href="{{item.url}}" title="{{item.title}}"> | 4 | <a href="{{item.url}}" title="{{item.title}}"> |
5 | <img v-bind:src="item.src | resize 750 365"> | 5 | <img v-bind:src="item.src | resize 750 365"> |
6 | </a> | 6 | </a> |
@@ -13,7 +13,7 @@ | @@ -13,7 +13,7 @@ | ||
13 | const swipe = require('vue-swipe'); | 13 | const swipe = require('vue-swipe'); |
14 | 14 | ||
15 | module.exports = { | 15 | module.exports = { |
16 | - props: ['list'], | 16 | + props: ['floor'], |
17 | components: { | 17 | components: { |
18 | swipe: swipe.Swipe, | 18 | swipe: swipe.Swipe, |
19 | swipeItem: swipe.SwipeItem | 19 | swipeItem: swipe.SwipeItem |
public/vue/component/resources/goods.vue
0 → 100644
-
Please register or login to post a comment