window.onresize = () => { return (() => { let currentWidth = (document.documentElement.clientWidth || window.innerWidth) this.$store.commit(‘SETSCREENWIDTH‘, currentWidth) })() }
vue window
原文:https://www.cnblogs.com/alantao/p/12464542.html