From c1db1d8f26bad04aa9a61a1be85a673a01ef55fb Mon Sep 17 00:00:00 2001 From: Innei Date: Wed, 1 Nov 2023 00:29:15 +0800 Subject: [PATCH] fix: number format type error Signed-off-by: Innei --- src/views/dashboard/statistic.tsx | 43 +++++++++++++++++++------------ 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/src/views/dashboard/statistic.tsx b/src/views/dashboard/statistic.tsx index f7274d701..901884a0a 100644 --- a/src/views/dashboard/statistic.tsx +++ b/src/views/dashboard/statistic.tsx @@ -4,21 +4,32 @@ import { defineComponent } from 'vue' export const Statistic = defineComponent({ props: { label: String, value: [String, Number] }, setup(props) { - return () => ( - - {props.value === 'N/A' ? ( - - - - - ) : ( - - )} - - ) + return () => { + const value = props.value + return ( + + {props.value === 'N/A' ? ( + + + + + ) : ( + + )} + + ) + } }, })