子组件的暂时的内容都是一样,所以就请求了同一个组件,但是发现只有第一次发送了请求,后来再点击就不发送了,子组件中的事件请求在created中执行,请问有什么解决方法吗?//点击按钮进入子页面 panel(index, row) { this.index = index; if (this.selected == 'saved') { this.$router.push( { name:'inspectionPop', query:{ name: 'name', title:'编辑', id:row.id, }, } ); }else if(this.selected == 'reject'){ this.$router.push( { name:'inspectionPop', query:{ name: 'name', title:'被退回', id:row.id, }, } ); }//子路由:接收id参数,并发送请求created(){ console.log(this.$route.query.id); if(this.$route.query.id !=''){ this.getPanel(this.id) } this.getPersonList()},
添加回答
举报
0/150
提交
取消