From a101b794868e0760a31884e0ae9a1637c7af65ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=89=E5=92=B2=E6=99=BA=E5=AD=90?= Date: Sun, 27 Nov 2022 16:54:00 +0800 Subject: [PATCH] fix: type errors --- components/common/CommonPaginator.vue | 8 ++++++++ components/nav/NavFooter.vue | 4 +--- nuxt.config.ts | 2 +- pages/status/[status].vue | 2 +- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/components/common/CommonPaginator.vue b/components/common/CommonPaginator.vue index 2001e1c1..4ae846d6 100644 --- a/components/common/CommonPaginator.vue +++ b/components/common/CommonPaginator.vue @@ -10,6 +10,14 @@ const { paginator, keyProp = 'id', virtualScroller = false } = defineProps<{ virtualScroller: boolean }>() +defineSlots<{ + default: { + item: any + active?: boolean + } + loading: {} +}>() + const { items, state, endAnchor, error } = usePaginator(paginator) diff --git a/components/nav/NavFooter.vue b/components/nav/NavFooter.vue index 2d2ff3fd..152f51ab 100644 --- a/components/nav/NavFooter.vue +++ b/components/nav/NavFooter.vue @@ -1,7 +1,5 @@ diff --git a/nuxt.config.ts b/nuxt.config.ts index d77b8b85..27701dd2 100644 --- a/nuxt.config.ts +++ b/nuxt.config.ts @@ -27,7 +27,7 @@ export default defineNuxtConfig({ }, vite: { define: { - '__BUILD_TIME__': JSON.stringify(new Date().toISOString()), + 'import.meta.env.__BUILD_TIME__': JSON.stringify(new Date().toISOString()), 'process.env.VSCODE_TEXTMATE_DEBUG': 'false', }, build: { diff --git a/pages/status/[status].vue b/pages/status/[status].vue index fdcabd60..e5a16c38 100644 --- a/pages/status/[status].vue +++ b/pages/status/[status].vue @@ -7,7 +7,7 @@ definePageMeta({ return { path: getStatusPath(status), state: { - status, + status: status as any, }, } },