Authored by 李奇

tfgoodslist 楼层资源位添加

... ... @@ -5,6 +5,7 @@ import ResourceFocusImage from './resource-focus-image';
import ResourceSingleImage from './resource-single-image';
import ResourceProductList from './resource-product-list';
import ResourceBlkNewProductList from './resource-new-product-list';
import ResourceTfGoodsList from './resource-tfgoods-list';
export {
ResourceGoods,
... ... @@ -13,5 +14,6 @@ export {
ResourceSingleImage,
ResourceProductList,
ResourceFocusImage,
ResourceTfGoodsList,
ResourceBlkNewProductList
};
... ...
<template>
<resource>
<ul class="resource-tf-goods">
<li class="product-item" v-for="(item, index) in value.list" :key="index">
<product-link :value="item" class="link"></product-link>
<img-format :src="item.default_images" :w="94" :h="125"></img-format>
<div class="ellipsis">
<p class="title">{{item.product_name}}</p>
<p class="price">¥{{item.sales_price}}</p>
</div>
</li>
</ul>
</resource>
</template>
<script>
import Resource from './resource';
export default {
name: 'ResourceTfGoodsList',
props: {
value: Object
},
computed: {
},
components: {Resource}
};
</script>
<style lang="scss">
.resource-tf-goods {
width: 100%;
overflow-x: scroll;
-webkit-overflow-scrolling: touch;
white-space: nowrap;
li.product-item {
position: relative;
display: inline-block;
padding-right: 20px;
text-align: center;
line-height: 40px;
.link {
position: absolute;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
img {
width: 188px;
height: 250px;
}
.ellipsis > p {
text-overflow: ellipsis;
white-space: nowrap;
overflow: hidden;
font-size: 28px;
max-width: 188px;
font-family: HelveticaNeue , Tahoma, Arial, HiraginoSansGB-W3, "PingFang SC", "Heiti SC";
}
}
}
</style>
... ...
... ... @@ -13,7 +13,7 @@
<scroller ref="scroller" @loading="loading">
<component
:is="component.template_name"
v-for="(component, index) in floors.filter(c => ['twoPicture', 'goods', 'focus', 'category', 'newSingleImage', 'BlkNewProductFloorResource'].some(k => k === c.template_name) )"
v-for="(component, index) in floors.filter(c => ['twoPicture', 'goods', 'tfGoodsList', 'focus', 'category', 'newSingleImage', 'BlkNewProductFloorResource'].some(k => k === c.template_name) )"
:value="component.data"
:key="index"></component>
</scroller>
... ... @@ -33,7 +33,8 @@
ResourceFocusImage,
ResourceSingleImage,
ResourceProductList,
ResourceBlkNewProductList
ResourceBlkNewProductList,
ResourceTfGoodsList
} from 'components/resources';
import {SearchSlider} from 'components/search';
... ... @@ -77,6 +78,7 @@
newSingleImage: ResourceSingleImage,
category: ResourceCategory,
BlkNewProductFloorResource: ResourceBlkNewProductList,
tfGoodsList: ResourceTfGoodsList,
ResourceProductList,
SearchSlider
}
... ...
... ... @@ -18,7 +18,7 @@
<div class="resources">
<component
:is="component.template_name"
v-for="(component, index) in channel.home.filter(c => ['twoPicture', 'newSingleImage', 'BlkNewProductFloorResource'].some(k => k === c.template_name) )"
v-for="(component, index) in channel.home.filter(c => ['twoPicture', 'tfGoodsList', 'newSingleImage', 'BlkNewProductFloorResource'].some(k => k === c.template_name) )"
:value="component.data"
:key="index"></component>
</div>
... ... @@ -34,6 +34,7 @@ import {
import ResourceTwoImage from 'components/resources/resource-two-image';
import ResourceSingleImage from 'components/resources/resource-single-image';
import ResourceNewProductList from 'components/resources/resource-new-product-list';
import ResourceTfGoodsList from 'components/resources/resource-tfgoods-list';
import {SearchSlider} from 'components/search';
import {mapState} from 'vuex';
import {HomeSlider} from './components';
... ... @@ -66,6 +67,7 @@ export default {
},
components: {
twoPicture: ResourceTwoImage,
tfGoodsList: ResourceTfGoodsList,
newSingleImage: ResourceSingleImage,
BlkNewProductFloorResource: ResourceNewProductList,
SearchSlider,
... ...