[improvement] optimize watch options (#4075)

This commit is contained in:
neverland
2019-08-09 11:54:42 +08:00
committed by GitHub
parent 854a91c384
commit 19cd2ed38e
12 changed files with 19 additions and 57 deletions
+2 -9
View File
@@ -35,7 +35,7 @@
<van-count-down
ref="countDown"
millisecond
:time="manualTime"
:time="3000"
:auto-start="false"
format="ss:SSS"
@finish="$toast($t('finished'))"
@@ -73,7 +73,6 @@ export default {
customFormat: '自定义格式',
manualControl: '手动控制',
formatWithDay: 'DD 天 HH 时 mm 分 ss 秒',
add: '延长',
reset: '重置',
pause: '暂停',
start: '开始',
@@ -85,7 +84,6 @@ export default {
customFormat: 'Custom Format',
manualControl: 'Manual Control',
formatWithDay: 'DD Day, HH:mm:ss',
add: 'Add',
reset: 'Reset',
pause: 'Pause',
start: 'Start',
@@ -95,8 +93,7 @@ export default {
data() {
return {
time: 30 * 60 * 60 * 1000,
manualTime: 3000
time: 30 * 60 * 60 * 1000
};
},
@@ -111,10 +108,6 @@ export default {
reset() {
this.$refs.countDown.reset();
},
add() {
this.manualTime += 3000;
}
}
};
+1 -3
View File
@@ -40,9 +40,7 @@ export default createComponent({
watch: {
time: {
immediate: true,
handler() {
this.reset();
}
handler: 'reset'
}
},