Commit 91af2c97d9826469bc69a90dff40f3b22f48d4a3
1 parent
4f09ccf9
购好物,倒计时组件,sty = 6时,倒计时前缀设置为动态参数:prefix
Showing
2 changed files
with
4 additions
and
3 deletions
src/components/countDownCom/countDownCom.vue
| @@ -6,7 +6,7 @@ | @@ -6,7 +6,7 @@ | ||
| 6 | <span class="block transparent">{{ timeData.days }}</span> | 6 | <span class="block transparent">{{ timeData.days }}</span> |
| 7 | <span class="colon">天</span> | 7 | <span class="colon">天</span> |
| 8 | </div> | 8 | </div> |
| 9 | - <div class="tips" v-if="sty == '6'">限时</div> | 9 | + <div class="tips" v-if="sty == '6' && prefix">{{prefix}}</div> |
| 10 | <div class="container"> | 10 | <div class="container"> |
| 11 | <span class="block" :class="{'big-block': ((timeData.days * 24) + timeData.hours) >= 100}" v-if="type == 'h'">{{ (timeData.days * 24) + timeData.hours }}</span> | 11 | <span class="block" :class="{'big-block': ((timeData.days * 24) + timeData.hours) >= 100}" v-if="type == 'h'">{{ (timeData.days * 24) + timeData.hours }}</span> |
| 12 | <span class="block" v-else>{{ timeData.hours }}</span> | 12 | <span class="block" v-else>{{ timeData.hours }}</span> |
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | 38 | ||
| 39 | } | 39 | } |
| 40 | }, | 40 | }, |
| 41 | - props: ["time", "sty", 'type'], | 41 | + props: ["time", "sty", 'type', 'prefix'], |
| 42 | methods: { | 42 | methods: { |
| 43 | 43 | ||
| 44 | /** | 44 | /** |
src/pages/optimization2/optimization2.vue
| @@ -57,7 +57,8 @@ | @@ -57,7 +57,8 @@ | ||
| 57 | <count-down-com slot="extend" v-if="discountTime && discountTime > 0 && discountType == '1'" | 57 | <count-down-com slot="extend" v-if="discountTime && discountTime > 0 && discountType == '1'" |
| 58 | :time="parseInt(discountTime) * 1000" | 58 | :time="parseInt(discountTime) * 1000" |
| 59 | sty="6" | 59 | sty="6" |
| 60 | - type='h'> | 60 | + type='h' |
| 61 | + prefix='限时'> | ||
| 61 | </count-down-com> | 62 | </count-down-com> |
| 62 | </text-bg-title-com> | 63 | </text-bg-title-com> |
| 63 | 64 |