cenfengtao
单个页面:
beforeRouteEnter(to, from, next) {
    // XXX: 修复iOS版微信HTML5 History兼容性问题
    if (to.path !== location.pathname) {
    // 此处不可使用location.replace
      location.assign(to.fullPath)
    } else {
      next()
    }
  },
 
 
全局:
router.afterEach((to, from) =>{
    // XXX: 修复iOS版微信HTML5 History兼容性问题
    if (to.path !== location.pathname) {
    // 此处不可使用location.replace
      location.assign(to.fullPath)
    }
  })

 

分类:

技术点:

相关文章:

  • 2021-11-29
  • 2021-09-29
  • 2021-12-31
  • 2021-06-14
  • 2021-08-01
  • 2021-12-15
  • 2021-12-05
猜你喜欢
  • 2021-12-15
  • 2021-12-05
  • 2021-12-05
  • 2021-12-05
  • 2021-06-23
  • 2021-12-15
  • 2021-12-05
相关资源
相似解决方案