mirror of
https://github.com/blossom-editor/blossom.git
synced 2026-03-12 17:41:26 +08:00
25 lines
797 B
TypeScript
25 lines
797 B
TypeScript
import router from '@/router'
|
|
|
|
// components
|
|
const NotFound = () => import("../components/NotFound.vue")
|
|
|
|
// blossom
|
|
const IndexBlossom = () => import('../views/Index.vue')
|
|
const BlossomHome = () => import('../views/index/Home.vue')
|
|
const Articles = () => import('../views/article/Articles.vue')
|
|
|
|
|
|
router.addRoute({ path: '/404', component: NotFound, })
|
|
router.addRoute({ path: '/:pathMatch(.*)', redirect: '/404', })
|
|
router.addRoute({
|
|
path: '/', redirect: '/home'
|
|
})
|
|
|
|
// blossom
|
|
router.addRoute({
|
|
path: '/', name: 'IndexBlossom', component: IndexBlossom, meta: { keepAlive: false },
|
|
children: [
|
|
{ path: '/home', name: 'BlossomHome', component: BlossomHome, meta: { keepAlive: false } },
|
|
{ path: '/articles', name: 'Articles', component: Articles, meta: { keepAlive: false } }
|
|
]
|
|
}) |