// 判断浏览器是否为IE
const isIE = (
  /MSIE (\d+\.\d+);/.test(navigator.userAgent) || ~navigator.userAgent.indexOf('Trident/')
)



mounted() {
    // 兼容ie iframe切换路由不生效
    if (isIE) {
      window.addEventListener(
        'hashchange',
        () => {
          var currentPath = window.location.hash.slice(1)
          if (this.$route.path !== currentPath) {
            this.$router.push(currentPath)
          }
        },
        false
      )
    }
  }

在main.js中添加

相关文章:

  • 2022-02-19
  • 2022-01-29
  • 2022-12-23
  • 2021-07-09
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-08-21
  • 2021-05-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2023-01-11
  • 2022-12-23
相关资源
相似解决方案