refactor: 首页统计

This commit is contained in:
caiyuchao
2025-08-15 16:54:31 +08:00
parent 74e9b23f71
commit 71970cd5ad
2 changed files with 7 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ interface Props {
startVal?: number;
suffix?: string;
transition?: keyof typeof TransitionPresets;
unit?: string;
useEasing?: boolean;
}
@@ -29,6 +30,7 @@ const props = withDefaults(defineProps<Props>(), {
decimals: 0,
duration: 1500,
endVal: 2021,
unit: '',
prefix: '',
separator: ',',
startVal: 0,
@@ -122,7 +124,5 @@ function formatNumber(num: number | string) {
defineExpose({ reset });
</script>
<template>
<span :style="{ color }">
{{ value }}
</span>
<span :style="{ color }"> {{ value }}{{ unit }} </span>
</template>