Commit 1cd2920523f8cc5ebaf74fac1d63ab652d37af0d
1 parent
e374177e
fix(products): 修复产品价格显示逻辑
- 优化价格显示逻辑,当价格和最高价格相同时,只显示一个价格 - 提高用户体验,避免重复显示相同的价格
Showing
1 changed file
with
1 additions
and
1 deletions
pages/products/index.vue
... | ... | @@ -85,7 +85,7 @@ |
85 | 85 | style="height: auto" |
86 | 86 | > |
87 | 87 | <h3 style="color: red" v-if="item.price"> |
88 | - ${{ item.price }} - ${{ item.maxPrice }} | |
88 | + {{ item.price === item.maxPrice ? `$${item.price}` : `$${item.price} - $${item.maxPrice}` }} | |
89 | 89 | </h3> |
90 | 90 | <h4 class="item-name">{{ item.name }}</h4> |
91 | 91 | </v-card-text> | ... | ... |