fix(嵌入式): 优化首次加载时长

This commit is contained in:
dataeaseShu 2024-02-18 14:24:48 +08:00
parent 918da1e1ef
commit fe27adf73a
2 changed files with 17 additions and 1 deletions

View File

@ -60,7 +60,7 @@ import { setupStore } from '@/store'
import { useEmbedded } from '@/store/modules/embedded'
import { useUserStoreWithOut } from '@/store/modules/user'
import { setupElementPlus, setupElementPlusIcons } from '@/plugins/element-plus'
import { setupRouter } from '@/router'
import { setupRouter } from '@/router/embedded'
const setupAll = async (
dom: string,

View File

@ -0,0 +1,16 @@
import { createRouter, createWebHashHistory } from 'vue-router'
import type { RouteRecordRaw } from 'vue-router'
import type { App } from 'vue'
export const routes: AppRouteRecordRaw[] = []
const router = createRouter({
history: createWebHashHistory(),
routes: routes as RouteRecordRaw[]
})
export const setupRouter = (app: App<Element>) => {
app.use(router)
}
export default router