Skip to content

Commit

Permalink
fix: countdown support dayjs value
Browse files Browse the repository at this point in the history
  • Loading branch information
tangjinzhou committed May 21, 2022
1 parent 13e1db0 commit 5edca6b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion components/statistic/Countdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function getTime(value?: countdownValueType) {
export const countdownProps = () => {
return {
...statisticProps(),
value: [Number, String],
value: [Number, String, Object] as PropType<countdownValueType>,
format: String,
onFinish: Function as PropType<() => void>,
onChange: Function as PropType<(value?: countdownValueType) => void>,
Expand Down
2 changes: 1 addition & 1 deletion components/statistic/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { VNodeTypes } from 'vue';
import padStart from 'lodash-es/padStart';

export type valueType = number | string;
export type countdownValueType = valueType | string;
export type countdownValueType = valueType | Date;

export type Formatter =
| false
Expand Down

0 comments on commit 5edca6b

Please sign in to comment.