欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

Vue 中 a標(biāo)簽上href無法跳轉(zhuǎn)的解決方式

 更新時(shí)間:2019年11月12日 09:18:09   作者:lllo3o  
今天小編大家分享一篇Vue 中 a標(biāo)簽上href無法跳轉(zhuǎn)的解決方式,具有很好的參考價(jià)值,希望對大家有所幫助。一起跟隨小編過來看看吧

問題:

使用vue-router 在IE下 a標(biāo)簽里的路由不跳轉(zhuǎn),火狐,chrome工作正常。

解決:

在App.vue 里增加判斷IE瀏覽器手動(dòng)修復(fù)……

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', () => {
    var currentPath = window.location.hash.slice(1);
    if (this.$route.path !== currentPath) {
    this.$router.push(currentPath)
   }
  }, false)
  }
 }
}

以上這篇Vue 中 a標(biāo)簽上href無法跳轉(zhuǎn)的解決方式就是小編分享給大家的全部內(nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。

相關(guān)文章

最新評論