赞
踩
vue脚手架项目根据不同的条件动态设置路由title
```javascript const layout = [ { path: '/Detail', component: () => import('@/index.vue'), name: 'Detail', meta: { title: '', keepAlive: false, }, beforeEnter: (to, from, next) => { if (to.query.mode === 'edit') { to.meta.title = '编辑'; } else if (to.query.mode === 'browse') { to.meta.title = '详情'; } else { to.meta.title = '新增'; } next(); }, },
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。