Skip to content

Commit 9dfb412

Browse files
committed
opti: countdown demo
1 parent e17331a commit 9dfb412

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

pages/nvue/countdown/countdown.nvue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<view class="example-body">
1010
<uni-countdown :start="start" :day="1" :hour="1" :minute="12" :second="40" />
1111
</view>
12-
<!--<uni-section title="不显示天数" type="line"></uni-section>
12+
<uni-section title="不显示天数" type="line"></uni-section>
1313
<view class="example-body">
1414
<uni-countdown :show-day="false" :hour="12" :minute="12" :second="12" />
1515
</view>
@@ -28,7 +28,7 @@
2828
<uni-section title="动态赋值" type="line"></uni-section>
2929
<view class="example-body">
3030
<uni-countdown :show-day="false" :hour="testHour" :minute="testMinute" :second="testSecond" />
31-
</view> -->
31+
</view>
3232
</view>
3333
</template>
3434
<script>
@@ -42,8 +42,9 @@
4242
start: false
4343
}
4444
},
45-
created() {
46-
setTimeout(() => {
45+
mounted() {
46+
setTimeout(() => {
47+
console.log(1111);
4748
this.testHour = 1
4849
this.testMinute = 1
4950
this.testSecond = 0

pages/vue/countdown/countdown.vue

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<view class="example-body">
1010
<uni-countdown :start="start" :day="1" :hour="1" :minute="12" :second="40" />
1111
</view>
12-
<!--<uni-section title="不显示天数" type="line"></uni-section>
12+
<uni-section title="不显示天数" type="line"></uni-section>
1313
<view class="example-body">
1414
<uni-countdown :show-day="false" :hour="12" :minute="12" :second="12" />
1515
</view>
@@ -28,7 +28,7 @@
2828
<uni-section title="动态赋值" type="line"></uni-section>
2929
<view class="example-body">
3030
<uni-countdown :show-day="false" :hour="testHour" :minute="testMinute" :second="testSecond" />
31-
</view> -->
31+
</view>
3232
</view>
3333
</template>
3434
<script>
@@ -42,8 +42,9 @@
4242
start: false
4343
}
4444
},
45-
created() {
46-
setTimeout(() => {
45+
mounted() {
46+
setTimeout(() => {
47+
console.log(1111);
4748
this.testHour = 1
4849
this.testMinute = 1
4950
this.testSecond = 0

0 commit comments

Comments
 (0)