Vueの中のaラベルにhrefジャンプできない解決方法
問題:
vue-routerを使ってIEの下でaタグの中のルートは跳びません。
解決:
アプリ.vueにIEブラウザの手動修復を追加します。
vue-routerを使ってIEの下でaタグの中のルートは跳びません。
解決:
アプリ.vueにIEブラウザの手動修復を追加します。
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タグのhrefがジャンプできない解決方法は小編集が皆さんに提供した内容の全部です。参考にしてほしいです。皆さんも応援してください。