From 1fbcc6fed3d09010b1ca3a292cd380cf2736e498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9B=B6=E9=9B=B6=E9=9B=B6?= <1165844401@qq.com> Date: Mon, 10 Feb 2025 11:00:21 +0800 Subject: [PATCH] =?UTF-8?q?fix=F0=9F=90=9B:=20=E4=BF=AE=E5=A4=8D=E6=97=A0?= =?UTF-8?q?=E6=95=88=E5=BC=95=E5=85=A5=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/hooks/web/useNow.ts | 4 ++-- types/global.d.ts | 5 ++++- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/hooks/web/useNow.ts b/src/hooks/web/useNow.ts index 09d3176..a4635d8 100644 --- a/src/hooks/web/useNow.ts +++ b/src/hooks/web/useNow.ts @@ -1,4 +1,4 @@ -import { dateUtil } from '@/utils/dateUtil' +import dayjs from 'dayjs' import { reactive, toRefs } from 'vue' import { tryOnMounted, tryOnUnmounted } from '@vueuse/core' @@ -17,7 +17,7 @@ export const useNow = (immediate = true) => { }) const update = () => { - const now = dateUtil() + const now = dayjs() const h = now.format('HH') const m = now.format('mm') diff --git a/types/global.d.ts b/types/global.d.ts index 5e29268..0f66633 100644 --- a/types/global.d.ts +++ b/types/global.d.ts @@ -1,4 +1,4 @@ -export {} +export { } declare global { interface Fn { (...arg: T[]): T @@ -14,6 +14,9 @@ declare global { type LocaleType = 'zh-CN' | 'en' + declare type TimeoutHandle = ReturnType + declare type IntervalHandle = ReturnType + type AxiosHeaders = | 'application/json' | 'application/x-www-form-urlencoded'