123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- import Home from '@/pages/Home'
- export default [
- {
- name: 'home',
- path: '/',
- component: Home
- },
- {
- name: 'introduction',
- path: '/intro',
- component: () => import(/* webpackChunkName: "intro" */ '@/pages/Introduction')
- },
- {
- name: 'contact',
- path: '/contact',
- component: () => import(/* webpackChunkName: "contact" */ '@/pages/Contact')
- },
- {
- name: 'library',
- path: '/library',
- components: {
- default: () => import(/* webpackChunkName: "library" */ '@/pages/Library'),
- options: () => import(/* webpackChunkName: "library" */ '@/pages/library/LibraryOptions')
- },
- props: {
- default: ({ query }) => {
- let { mode = 'tree-map', texts = [] } = query
- if (typeof texts === 'string') texts = [texts]
- // In case of a reload or direct link, vue-router doesn't turn the query string into an array.
- if (texts && texts.length && typeof texts[0] === 'string') {
- texts = texts.map(text => text.split(',').map(id => parseInt(id)))
- }
- return { mode, texts }
- },
- options: ({ query }) => ({
- show: !('texts' in query && query.texts.length),
- mode: query.mode || 'tree-map'
- })
- }
- },
- {
- name: 'kit',
- path: '/kit',
- component: () => import(/* webpackChunkName: "kit" */ '@/pages/Kit')
- },
- {
- name: 'gallery',
- path: '/gallery',
- component: () => import(/* webpackChunkName: "gallery" */ '@/pages/Gallery')
- },
- {
- name: 'blog',
- path: '/blog',
- component: () => import(/* webpackChunkName: "blog" */ '@/pages/Blog')
- },
- // TEMP
- {
- name: 'map',
- path: '/map',
- component: () => import(/* webpackChunkName: "test" */ '@/pages/Map')
- },
- {
- name: 'notfound',
- path: '/404',
- alias: '*',
- component: () => import(/* webpackChunkName: "404" */ '@/pages/NotFound.vue')
- }
- ]
|