data:{
return{
screenWidth:document.body.clientWidth;
}
},
watch:{
screenWidth(val){
this.screenWidth=val;
}
},
mounted(){
window.onresize=()=>{
this.screenWidth=window.innerWidth
}
},
data:{
return{
screenWidth:document.body.clientWidth;
}
},
watch:{
screenWidth(val){
this.screenWidth=val;
}
},
mounted(){
window.onresize=()=>{
this.screenWidth=window.innerWidth
}
},