const router = new VueRouter({ mode: 'history', routes: [ { path: '/first', component: firstView, meta: { navShow: true, cname: '一级页面' }, name: 'first' }, { path: '/sub', component: subView, meta: { navShow: false, cname: '子页面' }, name: 'sub' }, ], }…