子组件 this.$route.params.pageIndex =0this.$router.back() 父组件 beforeRouteEnter(to,from, next) {if(Object.prototype.hasOwnProperty.call(from.params,'pageIndex')) { pageIndex=from.params.pageIndex } next() } 参考:https://blog.csdn.net/Guoyu1_/article/details/132405942...
1、声明一个 空的Vue模块 goBackEntity import Vue from 'vue' /** * 定义空的vue实例,作为 goBackEntity实现非父子组件之间的通信(vue2.x中去掉了broadcast) */ var goBackEntity = new Vue({}); export default goBackEntity; 1. 2. 3. 4. 5. 6. 7. 2、在需要传参数的页面 i...