refactor: ♻️ 统一注册vue插件
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 重置路由
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user