打开ie浏览器版本默认为7

 https://blog.csdn.net/angel_degenerate/article/details/110531046

vue项目在跳转页面时,地址栏显示跳转路径却不跳转,只需要在项目里的src目录下找到App.vue文件,并添加以下代码。

export default {
    name: 'app',
    mounted() {
      function checkIE() {
        return (
          '-ms-scroll-limit' in document.documentElement.style &&
          '-ms-ime-align' in document.documentElement.style
        )
      }
      if (checkIE()) {
        window.addEventListener(
          'hashchange',
          () => {
            const currentPath = window.location.hash.slice(1)
            if (this.$route.path !== currentPath) {
              this.$router.push(currentPath)
            }
          },
          false
        )
      }
    }
  }

 https://www.cnblogs.com/cjh1111/p/9187032.html

posted @ 2020-05-21 17:54  ThisCall  阅读(331)  评论(0编辑  收藏  举报