1.Vue Router的路由独享守卫 beforeEnter实现
this.$router.push({
query: {
equipId: this.isSelect[0].id,
type: 1,
},
path: "/inspectionMgr/sbqfbf/create",
})
//注:to.query中的query与前面的query对应,也可以是其他
{
name: 'equipCommonApply',
path: 'sbqfbf/create',
beforeEnter: (to, from, next) => {
if (to.query.type==1) {
to.meta.title = '启封申请'
}{
to.meta.title = '流程申请'
}
next()
},
component: () =>
import ('@/views/ly/equipCommonApply/create.vue'),
},