From 6d483a8da583926b1f1438552657cd0daefff31e Mon Sep 17 00:00:00 2001 From: chenjiahan Date: Tue, 6 Oct 2020 10:59:25 +0800 Subject: [PATCH] fix(@vant/use): reset method param should be optional --- packages/vant-use/src/useCountDown/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/vant-use/src/useCountDown/index.ts b/packages/vant-use/src/useCountDown/index.ts index 344953fdf..25f5176e6 100644 --- a/packages/vant-use/src/useCountDown/index.ts +++ b/packages/vant-use/src/useCountDown/index.ts @@ -121,7 +121,7 @@ export function useCountDown(options: UseCountDownOptions) { } }; - const reset = (totalTime: number) => { + const reset = (totalTime: number = options.time) => { pause(); remain.value = totalTime; };