Skip to content

Commit 881a796

Browse files
committed
perf: statistic countdown
1 parent 7665cbe commit 881a796

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

components/statistic/Countdown.tsx

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import { defineComponent, onBeforeUnmount, onMounted, onUpdated, ref } from 'vue';
2-
import moment from 'moment';
3-
import interopDefault from '../_util/interopDefault';
42
import initDefaultProps from '../_util/props-util/initDefaultProps';
53
import Statistic, { statisticProps } from './Statistic';
64
import type { countdownValueType, FormatConfig } from './utils';
@@ -9,7 +7,7 @@ import { formatCountdown as formatCD } from './utils';
97
const REFRESH_INTERVAL = 1000 / 30;
108

119
function getTime(value?: countdownValueType) {
12-
return interopDefault(moment)(value).valueOf();
10+
return new Date(value as any).getTime();
1311
}
1412

1513
export default defineComponent({

0 commit comments

Comments
 (0)