1234567891011121314151617181920212223242526272829303132333435363738 |
- import Home from '@/pages/Home'
- export default [
- {
- name: 'home',
- path: '/',
- component: Home
- },
- {
- name: 'biblio',
- path: '/biblio',
- components: {
- default: () => import(/* webpackChunkName: "texts" */ '@/pages/Biblio'),
- options: () => import(/* webpackChunkName: "texts" */ '@/pages/_partials/TextOptions')
- },
- props: {
- default: ({ query }) => ({
- mode: query.mode || 'tree-map',
- // In case of a reload or direct link, vue-router doesn't turn the query string into an array.
- texts: query.texts && query.texts.length && typeof query.texts[0] === 'string'
- ? query.texts.map(text => text.split(',').map(id => parseInt(id)))
- : query.texts
- }),
- options: ({ query }) => ({
- show: !('texts' in query)
- })
- }
- },
- {
- name: 'notfound',
- path: '/404',
- alias: '*',
- component: () => import(/* webpackChunkName: "404" */ '@/pages/NotFound.vue')
- }
- ]
|