vue跳转同一个页面数据不更新问题

路由更新就重新请求数据

watch: {
	// 监听相同路由下参数变化的时候,从而实现异步刷新
	'$route'(to,from) {
		this._initData();
		this.nickname = this.$route.query.nickname;//修改页面标题
	}
},

猜你喜欢

转载自blog.csdn.net/qq_40745143/article/details/106812483