From 178b165f5d5c95c3220477cadff4dfd467d9cc07 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=9D=92=E8=8B=97?= <243194995@qq.com> Date: Sun, 2 Jan 2022 11:38:57 +0000 Subject: [PATCH] =?UTF-8?q?update=20src/layout/index.vue.=20=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/index.vue | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/layout/index.vue b/src/layout/index.vue index 7d5fc47d..9db5c2bf 100644 --- a/src/layout/index.vue +++ b/src/layout/index.vue @@ -254,12 +254,7 @@ this.settingDialog = true; }, onLayoutResize(){ - const clientWidth = document.body.clientWidth; - if(clientWidth < 992){ - this.$store.commit("SET_ismobile", true) - }else{ - this.$store.commit("SET_ismobile", false) - } + this.$store.commit("SET_ismobile", document.body.clientWidth < 992) }, //路由监听高亮 showThis(){