// Hooks import { mapsBeforeEnter, externalMapsBeforeEnter } from 'new-dashboard/router/hooks/check-navigation'; // Lazy Pages const Maps = () => import('new-dashboard/pages/Maps/Maps'); const Carto = () => import('new-dashboard/pages/Maps/Carto'); const External = () => import('new-dashboard/pages/Maps/External'); const routes = [ { path: '/maps/:filter?', component: Maps, meta: { title: () => '地图 | 快点' }, children: [ { path: '', name: 'maps', component: Carto, meta: { title: () => '地图 | 快点' }, beforeEnter: mapsBeforeEnter }, { path: 'external', name: 'external', component: External, meta: { title: () => 'gl地图 | 快点' }, beforeEnter: externalMapsBeforeEnter } ] }, { path: '/maps/external/:filter', component: Maps, meta: { title: () => 'gl地图 | 快点' }, children: [ { path: '', name: 'external_filtered', component: External, meta: { title: () => 'gl地图 | 快点' }, beforeEnter: externalMapsBeforeEnter } ] } ]; export default routes;