前端技术
Vuejs使用router进行页面转跳
2021-09-03 70 0
简介 Vuejs使用router进行页面转跳,不一定要使用父子页面
Vuejs使用router进行页面转跳,不一定要使用父子页面
页面使用router传值:
view(){
this.$nextTick(() => {
alert(id)
this.$router.push({
path: '/fmtask/fmtask/FmXianTaskListForm',
query: {
method: 'view',
id: id,
selectId: selectId,
fmTaskId: this.parentId
}
})
})
}
---------------
接收参数的页面,第一次加载有效
mounted() {
this.init()
},
或者:可以反复的加载有效
actived() {
this.init()
},
-----------
init(){
this.inputForm.id = this.$route.query.id
this.method = this.$route.query.method
this.selectId = this.$route.query.selectId
this.inputForm.fmTaskId = this.$route.query.fmTaskId
}

