Skip to content

Commit 5edca6b

Browse files
committed
fix: countdown support dayjs value
1 parent 13e1db0 commit 5edca6b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

components/statistic/Countdown.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ function getTime(value?: countdownValueType) {
1414
export const countdownProps = () => {
1515
return {
1616
...statisticProps(),
17-
value: [Number, String],
17+
value: [Number, String, Object] as PropType<countdownValueType>,
1818
format: String,
1919
onFinish: Function as PropType<() => void>,
2020
onChange: Function as PropType<(value?: countdownValueType) => void>,

components/statistic/utils.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import type { VNodeTypes } from 'vue';
22
import padStart from 'lodash-es/padStart';
33

44
export type valueType = number | string;
5-
export type countdownValueType = valueType | string;
5+
export type countdownValueType = valueType | Date;
66

77
export type Formatter =
88
| false

0 commit comments

Comments
 (0)