types: fix type error

This commit is contained in:
ckl1
2022-06-06 11:15:31 +08:00
parent a4526d7cb4
commit d66f12e0e7
5 changed files with 14 additions and 14 deletions

View File

@@ -1,6 +1,6 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
// import type { App } from 'vue'
import type { AppContext, Plugin } from 'vue'
import { Layout, getParentLayout } from '@/utils/routerHelper'
import { useI18n } from '@/hooks/web/useI18n'
@@ -552,8 +552,8 @@ export const resetRouter = (): void => {
})
}
export const setupRouter = (app: any) => {
app.use(router)
export const setupRouter = (app: AppContext['app']) => {
app.use(router as Plugin)
}
export default router