// 不做爲Main組件的子頁面展現的頁面單獨寫,以下 export const loginRouter = { path: '/login', name: 'login', meta: { title: 'Login - 登陸' }, component: () => import('@/views/login.vue') }; export const page404 = { path: '/*', name: 'error-404', meta: { title: '404-頁面不存在' }, component: () => import('@/views/error-page/404.vue') }; export const page403 = { path: '/403', meta: { title: '403-權限不足' }, name: 'error-403', component: () => import('@//views/error-page/403.vue') }; export const page500 = { path: '/500', meta: { title: '500-服務端錯誤' }, name: 'error-500', component: () => import('@/views/error-page/500.vue') }; export const preview = { path: '/preview', name: 'preview', component: () => import('@/views/form/article-publish/preview.vue') }; export const locking = { path: '/locking', name: 'locking', component: () => import('@/views/main-components/lockscreen/components/locking-page.vue') }; // 做爲Main組件的子頁面展現可是不在左側菜單顯示的路由寫在otherRouter裏 export const otherRouter = { path: '/', name: 'otherRouter', redirect: '/home', component: Main, children: [ { path: 'home', title: {i18n: 'home'}, name: 'home_index', component: () => import('@/views/home/home.vue') }, { path: 'ownspace', title: '我的中心', name: 'ownspace_index', component: () => import('@/views/own-space/own-space.vue') }, { path: 'order/:order_id', title: '訂單詳情', name: 'order-info', component: () => import('@/views/advanced-router/component/order-info.vue') }, // 用於展現動態路由 { path: 'shopping', title: '購物詳情', name: 'shopping', component: () => import('@/views/advanced-router/component/shopping-info.vue') }, // 用於展現帶參路由 { path: 'message', title: '消息中心', name: 'message_index', component: () => import('@/views/message/message.vue') } ] }; // 做爲Main組件的子頁面展現而且在左側菜單顯示的路由寫在appRouter裏 export const appRouter = [ { path: '/access', icon: 'key', name: 'access', title: '權限管理', component: Main, children: [ { path: 'index', title: '權限管理', name: 'access_index', component: () => import('@/views/access/access.vue') } ] }, { path: '/access-test', icon: 'lock-combination', title: '權限測試頁', name: 'accesstest', access: 0, component: Main, children: [ { path: 'index', title: '權限測試頁', name: 'accesstest_index', access: 0, component: () => import('@/views/access/access-test.vue') } ] }, { path: '/international', icon: 'earth', title: {i18n: 'international'}, name: 'international', component: Main, children: [ { path: 'index', title: {i18n: 'international'}, name: 'international_index', component: () => import('@/views/international/international.vue') } ] }, { path: '/component', icon: 'social-buffer', name: 'component', title: '組件', component: Main, children: [ { path: 'text-editor', icon: 'compose', name: 'text-editor', title: '富文本編輯器', component: () => import('@/views/my-components/text-editor/text-editor.vue') }, { path: 'md-editor', icon: 'pound', name: 'md-editor', title: 'Markdown編輯器', component: () => import('@/views/my-components/markdown-editor/markdown-editor.vue') }, { path: 'image-editor', icon: 'crop', name: 'image-editor', title: '圖片預覽編輯', component: () => import('@/views/my-components/image-editor/image-editor.vue') }, { path: 'draggable-list', icon: 'arrow-move', name: 'draggable-list', title: '可拖拽列表', component: () => import('@/views/my-components/draggable-list/draggable-list.vue') }, { path: 'area-linkage', icon: 'ios-more', name: 'area-linkage', title: '城市級聯', component: () => import('@/views/my-components/area-linkage/area-linkage.vue') }, { path: 'file-upload', icon: 'android-upload', name: 'file-upload', title: '文件上傳', component: () => import('@/views/my-components/file-upload/file-upload.vue') }, { path: 'scroll-bar', icon: 'android-upload', name: 'scroll-bar', title: '滾動條', component: () => import('@/views/my-components/scroll-bar/scroll-bar-page.vue') }, { path: 'count-to', icon: 'arrow-graph-up-right', name: 'count-to', title: '數字漸變', // component: () => import('@/views/my-components/count-to/count-to.vue') component: () => import('@/views/my-components/count-to/count-to.vue') }, { path: 'split-pane-page', icon: 'ios-pause', name: 'split-pane-page', title: 'split-pane', component: () => import('@/views/my-components/split-pane/split-pane-page.vue') } ] }, { path: '/form', icon: 'android-checkbox', name: 'form', title: '表單編輯', component: Main, children: [ { path: 'artical-publish', title: '文章發佈', name: 'artical-publish', icon: 'compose', component: () => import('@/views/form/article-publish/article-publish.vue') }, { path: 'workflow', title: '工做流', name: 'workflow', icon: 'arrow-swap', component: () => import('@/views/form/work-flow/work-flow.vue') } ] }, // { // path: '/charts', // icon: 'ios-analytics', // name: 'charts', // title: '圖表', // component: Main, // children: [ // { path: 'pie', title: '餅狀圖', name: 'pie', icon: 'ios-pie', component: resolve => { require('@/views/access/access.vue') }, // { path: 'histogram', title: '柱狀圖', name: 'histogram', icon: 'stats-bars', component: resolve => { require('@/views/access/access.vue') } // ] // }, { path: '/tables', icon: 'ios-grid-view', name: 'tables', title: '表格', component: Main, children: [ { path: 'dragableTable', title: '可拖拽排序', name: 'dragable-table', icon: 'arrow-move', component: () => import('@/views/tables/dragable-table.vue') }, { path: 'editableTable', title: '可編輯表格', name: 'editable-table', icon: 'edit', component: () => import('@/views/tables/editable-table.vue') }, { path: 'searchableTable', title: '可搜索表格', name: 'searchable-table', icon: 'search', component: () => import('@/views/tables/searchable-table.vue') }, { path: 'exportableTable', title: '表格導出數據', name: 'exportable-table', icon: 'code-download', component: () => import('@/views/tables/exportable-table.vue') }, { path: 'table2image', title: '表格轉圖片', name: 'table-to-image', icon: 'images', component: () => import('@/views/tables/table-to-image.vue') } ] }, { path: '/advanced-router', icon: 'ios-infinite', name: 'advanced-router', title: '高級路由', component: Main, children: [ { path: 'mutative-router', title: '動態路由', name: 'mutative-router', icon: 'link', component: () => import('@/views/advanced-router/mutative-router.vue') }, { path: 'argument-page', title: '帶參頁面', name: 'argument-page', icon: 'android-send', component: () => import('@/views/advanced-router/argument-page.vue') } ] }, { path: '/error-page', icon: 'android-sad', title: '錯誤頁面', name: 'errorpage', component: Main, children: [ { path: 'index', title: '錯誤頁面', name: 'errorpage_index', component: () => import('@/views/error-page/error-page.vue') } ] } ]; // 全部上面定義的路由都要寫在下面的routers裏 export const routers = [ loginRouter, otherRouter, preview, locking, ...appRouter, page500, page403, page404 ];