在页面的watch中,监听$router的变化

watch: {
    $route (to, from) {
      this.$router.go(0)
    }
  }

其中this.$router.go(0)为刷新页面,但此方法可能在Safari中无法实现,还可以用js原生的方法:window.location.reload()

相关文章:

  • 2021-12-05
  • 2021-12-20
  • 2021-08-15
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-05
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 1970-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
相关资源
相似解决方案