//1.如果传递给dayjs()中传递的参数是不确定的值 就会出现重载的错误,解决办法是使用typeof进行类型限制
//2.dayjs(date?: string | number | dayjs.Dayjs | Date | null | undefined) 允许传递的参数类型
if (typeof route.query.reportDate === 'string') {
statMonth.value = dayjs(route.query.reportDate).format('YYYY-MM-DD');
}
08-02
989
08-14
129
01-19
555
05-09
771
11-03
1124
“相关推荐”对你有帮助么?
-
非常没帮助
-
没帮助
-
一般
-
有帮助
-
非常有帮助
提交