|
参考:https://segmentfault.com/q/1010000010844655/a-1020000010845248
watch: { //监听路由,只要路由有变化(路径,参数等变化)都有执行下面的函数,你可以 $route: { handler: function (val, oldVal) { let _urlParams = this.$route.params; //created事件触发的函数可以在这里写... //都是componentA组件,声明周期还在,改变不了 }, deep: true } }, |
|
最新喜欢: |