VUE 返回页面刷新数据

VUE 返回页面刷新数据

监听路由

watch: {
	//不推荐 用户体验不好
	'$route' (to, from) {
   		 // 路由发生变化页面刷新
		this.$router.go(0);
	}
},
watch: {
	'$route' (to, from) {
   		this.方法名();//返回页面直接调取方法
	}
},

有什么问题欢迎评论留言,我会及时回复你的

原创文章 75 获赞 87 访问量 1万+

猜你喜欢

转载自blog.csdn.net/qq_43764578/article/details/104002137