|
|
<template>
|
|
|
<resource class="no-padding-right" v-if="showFloor">
|
|
|
<ul class="resource-blk-new-products" v-if="value.showType == 1">
|
|
|
<li class="product-item" v-for="(item, index) in value.list" :key="index">
|
|
|
<product-link :value="item" class="link"></product-link>
|
|
|
<ul class="resource-blk-new-products" v-if="value.data.showType == 1">
|
|
|
<li class="product-item" v-for="(item, pi) in value.data.list" :key="pi">
|
|
|
<product-link :value="item" class="link" :yas="value" :yas-f="index" :yas-i="pi"></product-link>
|
|
|
<img-format :lazy="lazy" :src="item.default_images" :w="188" :h="250"></img-format>
|
|
|
<div class="ellipsis">
|
|
|
<p class="title" v-if="item.brand_name">{{item.brand_name}}</p>
|
...
|
...
|
@@ -11,10 +11,10 @@ |
|
|
</div>
|
|
|
</li>
|
|
|
</ul>
|
|
|
<ul class="resource-blk-new-products" v-if="value.showType == 2">
|
|
|
<ul class="resource-blk-new-products" v-if="value.data.showType == 2">
|
|
|
<div class="one">
|
|
|
<li class="product-item" v-for="(item, index) in value.list" :key="index" v-if="index % 2 == 0">
|
|
|
<product-link :value="item" class="link"></product-link>
|
|
|
<li class="product-item" v-for="(item, pi) in value.data.list" :key="pi" v-if="pi % 2 == 0">
|
|
|
<product-link :value="item" class="link" :yas="value" :yas-f="index" :yas-i="pi"></product-link>
|
|
|
<img-format :lazy="lazy" :src="item.default_images" :w="188" :h="250"></img-format>
|
|
|
<div class="ellipsis">
|
|
|
<p class="title" v-if="item.brand_name">{{item.brand_name}}</p>
|
...
|
...
|
@@ -24,8 +24,8 @@ |
|
|
</li>
|
|
|
</div>
|
|
|
<div class="two">
|
|
|
<li class="product-item" v-for="(item, index) in value.list" :key="index" v-if="index % 2 == 1">
|
|
|
<product-link :value="item" class="link"></product-link>
|
|
|
<li class="product-item" v-for="(item, pi) in value.data.list" :key="pi" v-if="pi % 2 == 1">
|
|
|
<product-link :value="item" class="link" :yas="value" :yas-f="index" :yas-i="pi"></product-link>
|
|
|
<img-format :lazy="lazy" :src="item.default_images" :w="188" :h="250"></img-format>
|
|
|
<div class="ellipsis">
|
|
|
<p class="title" v-if="item.brand_name">{{item.brand_name}}</p>
|
...
|
...
|
@@ -45,12 +45,13 @@ export default { |
|
|
name: 'ResourceBlkNewProductList',
|
|
|
props: {
|
|
|
value: Object,
|
|
|
lazy: Boolean
|
|
|
lazy: Boolean,
|
|
|
index: Number
|
|
|
},
|
|
|
computed: {
|
|
|
showFloor() {
|
|
|
return this.value.showType == 1 && this.value.list && this.value.list.length > 3 ||
|
|
|
this.value.showType == 2 && this.value.list && this.value.list.length > 7;
|
|
|
return this.value.data.showType === 1 && this.value.data.list && this.value.data.list.length > 3 ||
|
|
|
this.value.data.showType === 2 && this.value.data.list && this.value.data.list.length > 7;
|
|
|
}
|
|
|
},
|
|
|
components: {Resource}
|
...
|
...
|
|