feat: web based SPA
This commit is contained in:
+3
-3
@@ -1,13 +1,13 @@
|
||||
import ArticleView from '@views/ArticleView.vue'
|
||||
import HomeView from '@views/HomeView.vue'
|
||||
import NotFoundView from '@views/NotFoundView.vue'
|
||||
import { createRouter, createWebHashHistory } from 'vue-router'
|
||||
import { createRouter, createWebHistory } from 'vue-router'
|
||||
|
||||
const router = createRouter({
|
||||
history: createWebHashHistory(),
|
||||
history: createWebHistory(),
|
||||
routes: [
|
||||
{ path: '/', component: HomeView },
|
||||
{ path: '/articles/:year(\\d{4})/:month(\\d{2})/:day(\\d{2})', component: ArticleView },
|
||||
{ path: '/articles/:year(\\d{4})/:month(\\d{2})/:day(\\d{2})/', component: ArticleView },
|
||||
{ path: '/:pathMatch(.*)', component: NotFoundView },
|
||||
],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user