1.vue-router
在App.vue里面的mounted
周期添加判断
mounted () {
if ('-ms-scroll-limit' in document.documentElement.style &&
'-ms-ime-align' in document.documentElement.style) {
window.addEventListener('hashchange', () => {
var currentPath = window.location.hash.slice(1)
if (this.$route.path !== currentPath) {
this.$router.push(currentPath)
}
}, false)
}
}
2.vuex
https://babeljs.io/docs/en/babel-polyfill/
好像就这两个 = =