Toggle navigation
Toggle navigation
This project
Loading...
Sign in
fe
/
xianyu-ufo-app-web
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
zhangwenxue
5 years ago
Commit
eb1e9e2683e1ab612132f3edcfbae36814cadb25
1 parent
de621fe8
商品列表: 组件添加价格自定义属性值key
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
3 deletions
apps/pages/list/components/productList.vue
apps/pages/product/brand-product-list.vue
apps/pages/product/product-detail.vue
apps/pages/list/components/productList.vue
View file @
eb1e9e2
...
...
@@ -4,7 +4,7 @@
:key="index" :class="(index) % 2 === 0 && 'magrin-right'">
<div class="item-top">
<div class="item-price">
<span class="price-flag">{{product
.available_now_price && '¥'}}</span><span>{{product.available_now_price
|| ' '}}</span>
<span class="price-flag">{{product
[priceKey] && '¥'}}</span><span>{{product[priceKey]
|| ' '}}</span>
</div>
<div class="item-sales">{{product.sales && product.sales + '人付款'}}</div>
</div>
...
...
@@ -22,6 +22,10 @@ export default {
props: {
list: Array,
yasParams: Object,
priceKey: {
type: String,
default: 'available_now_price',
},
},
data: function() {
return {
...
...
apps/pages/product/brand-product-list.vue
View file @
eb1e9e2
...
...
@@ -6,7 +6,7 @@
:options="scrollOption"
@pulling-down="onPullingDown">
<div class="list-wrapper" v-if="brandProductList != null">
<product-list :list="brandProductList" />
<product-list :list="brandProductList"
priceKey="price"
/>
</div>
</scroll-view>
</layout-app>
...
...
apps/pages/product/product-detail.vue
View file @
eb1e9e2
...
...
@@ -48,7 +48,7 @@
<img class="ref-img" v-lazy="prdDetailImage" />
<div class="recommend" v-if="recommend"><h2>相关推荐</h2>
<product-list :list="recommend" />
<product-list :list="recommend"
priceKey="price"
/>
</div>
</cube-scroll>
</div>
...
...
Please
register
or
login
to post a comment