mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
16 lines
448 B
JavaScript
16 lines
448 B
JavaScript
import { createWebHashHistory, createRouter } from "vue-router";
|
|
import { bookRoutes } from "./bookRouter";
|
|
import { sourceRoutes } from "./sourceRouter";
|
|
|
|
const router = createRouter({
|
|
// history: createWebHistory(process.env.BASE_URL),
|
|
history: createWebHashHistory(),
|
|
// @ts-ignore
|
|
routes: bookRoutes.concat(sourceRoutes),
|
|
});
|
|
|
|
router.afterEach((to) => {
|
|
if (to.name == "shelf") document.title = "书架";
|
|
});
|
|
export default router;
|