refactor: ♻️ 统一注册vue插件

This commit is contained in:
cshaptx4869
2024-05-30 14:16:39 +08:00
parent c0ceb06f1e
commit af54fb26b6
5 changed files with 39 additions and 25 deletions

View File

@@ -1,3 +1,4 @@
import type { App } from "vue";
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router";
export const Layout = () => import("@/layout/index.vue");
@@ -117,6 +118,11 @@ const router = createRouter({
scrollBehavior: () => ({ left: 0, top: 0 }),
});
// 全局注册 router
export function setupRouter(app: App<Element>) {
app.use(router);
}
/**
* 重置路由
*/