Skip to content

Commit d9b3d80

Browse files
committed
style: update statistic type
1 parent 4439e0f commit d9b3d80

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

components/statistic/Countdown.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { defineComponent, onBeforeUnmount, onMounted, onUpdated, ref } from 'vue
33
import omit from '../_util/omit';
44
import initDefaultProps from '../_util/props-util/initDefaultProps';
55
import Statistic, { statisticProps } from './Statistic';
6-
import type { countdownValueType, FormatConfig } from './utils';
6+
import type { countdownValueType, FormatConfig, valueType } from './utils';
77
import { formatCountdown as formatCD } from './utils';
88

99
const REFRESH_INTERVAL = 1000 / 30;
@@ -88,11 +88,13 @@ export default defineComponent({
8888
stopTimer();
8989
});
9090
return () => {
91+
const value = props.value as valueType;
9192
return (
9293
<Statistic
9394
ref={statistic}
9495
{...{
9596
...omit(props, ['onFinish', 'onChange']),
97+
value,
9698
valueRender: valueRenderHtml,
9799
formatter: formatCountdown,
98100
}}

components/statistic/Statistic.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { defineComponent } from 'vue';
33
import PropTypes from '../_util/vue-types';
44
import initDefaultProps from '../_util/props-util/initDefaultProps';
55
import StatisticNumber from './Number';
6-
import type { countdownValueType } from './utils';
6+
import type { valueType } from './utils';
77
import Skeleton from '../skeleton/Skeleton';
88
import useConfigInject from '../_util/hooks/useConfigInject';
99

@@ -13,7 +13,7 @@ export const statisticProps = () => ({
1313
groupSeparator: String,
1414
format: String,
1515
value: {
16-
type: [String, Number, Object] as PropType<countdownValueType>,
16+
type: [String, Number, Object] as PropType<valueType>,
1717
},
1818
valueStyle: { type: Object as PropType<CSSProperties>, default: undefined as CSSProperties },
1919
valueRender: PropTypes.any,

0 commit comments

Comments
 (0)