参考:
https://www.cnblogs.com/ainyi/p/9340311.html
https://blog.csdn.net/weixin_41888813/article/details/86735664
created() { this.fetchLink() }, watch: { // 监听相同路由下参数变化的时候,从而实现异步刷新 '$route'(to,from) { // 做一些路由变化的响应 this.loading = true; this.fetchLink() } }, methods: { fetchLink(){ resourcemgApi.zypriceSearch(this.$route.params.name).then(resp => [ this.list = resp.data, console.log(this.list) ]) } },