From 5edca6be5a4e1aee9cde46724b14900f6c86bfb2 Mon Sep 17 00:00:00 2001 From: tangjinzhou <415800467@qq.com> Date: Sat, 21 May 2022 10:57:08 +0800 Subject: [PATCH] fix: countdown support dayjs value --- components/statistic/Countdown.tsx | 2 +- components/statistic/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/components/statistic/Countdown.tsx b/components/statistic/Countdown.tsx index 5b67a9e34..724f4ec07 100644 --- a/components/statistic/Countdown.tsx +++ b/components/statistic/Countdown.tsx @@ -14,7 +14,7 @@ function getTime(value?: countdownValueType) { export const countdownProps = () => { return { ...statisticProps(), - value: [Number, String], + value: [Number, String, Object] as PropType, format: String, onFinish: Function as PropType<() => void>, onChange: Function as PropType<(value?: countdownValueType) => void>, diff --git a/components/statistic/utils.ts b/components/statistic/utils.ts index efd9a4900..ee4466d97 100644 --- a/components/statistic/utils.ts +++ b/components/statistic/utils.ts @@ -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