Home

Issue: 2092

ReferenceError : "window is not defined"

[issue link]

code:
header.vue:

export default {
  data(){
    return {
      msgShadeHeight: window.innerHeight, // 消息遮罩,点击消息旁边生成的遮罩
      //...
    }
  },
}

could u please tell me whats the correct way to use “window” in data ?
thank u very much!

This question is available on Nuxt.js community (#c1857)