|
|
@@ -1,4 +1,4 @@ |
|
|
|
import { createRouter, createWebHashHistory, RouteRecordRaw } from "vue-router"; |
|
|
|
import { createRouter, createWebHashHistory, RouteRecordRaw, useRoute } from "vue-router"; |
|
|
|
import { getCurrentInstance } from "vue"; |
|
|
|
|
|
|
|
export const Layout = () => import("@/layout/index.vue"); |
|
|
@@ -219,7 +219,9 @@ const router = createRouter({ |
|
|
|
// 2023-5-23 添加平滑滚动 YWQ |
|
|
|
scrollBehavior: () => ({ behavior: "smooth", left: 0, top: 0 }), |
|
|
|
}); |
|
|
|
|
|
|
|
router.beforeEach((to, from) => { |
|
|
|
document.title = 'Metavatar-' + (to.query.p || from.query.p || localStorage.getItem("title") || '') |
|
|
|
}) |
|
|
|
/** |
|
|
|
* 重置路由 |
|
|
|
*/ |
|
|
|