forked from github/dataease
fix(嵌入式): 优化首次加载时长
This commit is contained in:
parent
918da1e1ef
commit
fe27adf73a
@ -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,
|
||||
|
16
core/core-frontend/src/router/embedded.ts
Normal file
16
core/core-frontend/src/router/embedded.ts
Normal 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
|
Loading…
Reference in New Issue
Block a user