window view

window.onresize = () => {
        return (() => {
          let currentWidth = (document.documentElement.clientWidth || window.innerWidth)
          this.$store.commit('SETSCREENWIDTH', currentWidth)
        })()
      }

  

Guess you like

Origin www.cnblogs.com/alantao/p/12464542.html