import NotFound from '@/views/NotFound.vue'; import HomeView from '@/views/tabs/HomeView.vue'; import TabView from '@/views/TabView.vue'; const routes = [ { path: '/:pathMatch(.*)*', name: 'NotFound', component: NotFound }, { path: '/t/:tenant', name: 'tab', component: TabView, children: [ { path: '', name: 'tab.home', component: HomeView, meta: { title: '首页', keepAlive: true, scrollTop: 0, } }, { path: 'bought', name: 'tab.bought', component: () => import('@/views/tabs/BoughtView.vue'), meta: { title: '已购买', keepAlive: true, scrollTop: 0, } }, { path: 'user', name: 'tab.user', // route level code-splitting // this generates a separate chunk (About.[hash].js) for this route // which is lazy-loaded when the route is visited. component: () => import('@/views/tabs/UserView.vue'), meta: { title: '个人中心', keepAlive: false, } }, ] }, { path: '/t/:tenant/play/:hash', name: 'play', component: () => import('@/views/PlayView.vue'), meta: { title: '播放', keepAlive: false, } }, ] export default routes;