1.前言:把一些细节记录下来,毕竟只有一个人和整个世界呢~
参考文档:https://www.cnblogs.com/GainLoss/p/6795225.html
2.实现细节:在子组件中实现跳转链接,在js事件中使用
this.$router.push("/test");
或者使用模板标签写法:
<router-link to="/" slot="left">
<mt-button icon="back">返回</mt-button>
</router-link>
相当于<a>标签的href
3.带参数跳转写法:
发送:this.$router.push({name:"test",params:{workcode:this.workcode}});
接受:this.$route.params.workcode