update src/layout/index.vue.

优化代码
This commit is contained in:
青苗 2022-01-02 11:38:57 +00:00 committed by Gitee
parent 2ec14a9f86
commit 178b165f5d
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 6 deletions

View File

@ -254,12 +254,7 @@
this.settingDialog = true; this.settingDialog = true;
}, },
onLayoutResize(){ onLayoutResize(){
const clientWidth = document.body.clientWidth; this.$store.commit("SET_ismobile", document.body.clientWidth < 992)
if(clientWidth < 992){
this.$store.commit("SET_ismobile", true)
}else{
this.$store.commit("SET_ismobile", false)
}
}, },
// //
showThis(){ showThis(){