There is not DOM in server side, you should skip it
export default {
data(){
return {
msgShadeHeight: null, // 娑堟伅閬僵锛岀偣鍑绘秷鎭梺杈圭敓鎴愮殑閬僵
//...
}
},
beforeMount() {
this.msgShadeHeight = window.innerHeight
}
}
i want to use 'echart.js' but when i render the page, ReferenceError : "window is not defined" , how to fixed it?
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Most helpful comment
There is not
DOMin server side, you should skip it