Browse Source

倒计时显示隐藏

master
Enzo 4 years ago
parent
commit
616817571b
  1. 8
      components/uni-countdown/uni-countdown.vue

8
components/uni-countdown/uni-countdown.vue

@ -3,9 +3,9 @@
<text v-if="showDay" :style="{ borderColor: borderColor, color: color }" <text v-if="showDay" :style="{ borderColor: borderColor, color: color }"
class="uni-countdown__number">{{ d }}</text> class="uni-countdown__number">{{ d }}</text>
<text v-if="showDay" :style="{ color: splitorColor }" class="uni-countdown__splitor">{{dayText}}</text> <text v-if="showDay" :style="{ color: splitorColor }" class="uni-countdown__splitor">{{dayText}}</text>
<text :style="{ borderColor: borderColor, color: color }"
<text v-if="showHour" :style="{ borderColor: borderColor, color: color }"
class="uni-countdown__number">{{ h }}</text> class="uni-countdown__number">{{ h }}</text>
<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? '时' : hourText }}</text>
<text v-if="showHour" :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? '' : hourText }}</text>
<text :style="{ borderColor: borderColor, color: color }" <text :style="{ borderColor: borderColor, color: color }"
class="uni-countdown__number">{{ i }}</text> class="uni-countdown__number">{{ i }}</text>
<text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? '分' : minuteText }}</text> <text :style="{ color: splitorColor }" class="uni-countdown__splitor">{{ showColon ? '分' : minuteText }}</text>
@ -45,6 +45,10 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
showHour: {
type: Boolean,
default: true
},
showColon: { showColon: {
type: Boolean, type: Boolean,
default: true default: true

Loading…
Cancel
Save