From 129ece6bc0d4bfa98fb4b6799f5dd06d712c83ec Mon Sep 17 00:00:00 2001 From: fangxiang Date: Thu, 10 Feb 2022 10:22:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BD=BB=E5=BA=95=E4=BF=AE=E5=A4=8D=E7=99=BB?= =?UTF-8?q?=E9=99=86=E9=A1=B5=E9=9D=A2=E6=97=A0=E6=B3=95=E7=82=B9=E5=87=BB?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E6=A1=86=E7=9A=84BUG?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/App.vue | 15 +++++--- src/pages/Login.vue | 8 ----- src/pages/WallPage.vue | 81 +++++++++++++++++++++--------------------- 3 files changed, 51 insertions(+), 53 deletions(-) diff --git a/src/App.vue b/src/App.vue index 36592b8..b384e7e 100644 --- a/src/App.vue +++ b/src/App.vue @@ -22,17 +22,22 @@ export default defineComponent({ window.onresize = (evt: any) => EventBus.getInstance().emit(EventNamesDefine.WindowResize, evt); - window.onmousedown = (evt: any) => + window.onmousedown = (evt: MouseEvent) => { EventBus.getInstance().emit(EventNamesDefine.WindowMouseDown, evt); - window.onmousemove = (evt: any) => + }; + window.onmousemove = (evt: any) => { EventBus.getInstance().emit(EventNamesDefine.WindowMouseMove, evt); - window.onmouseup = (evt: any) => + }; + window.onmouseup = (evt: any) => { EventBus.getInstance().emit(EventNamesDefine.WindowMouseUp, evt); - window.onmouseout = (evt: any) => + }; + window.onmouseout = (evt: any) => { EventBus.getInstance().emit(EventNamesDefine.WindowMouseOut, evt); + }; - window.document.body.onclick = (evt: any) => + window.document.body.onclick = (evt: any) => { EventBus.getInstance().emit(EventNamesDefine.DocumentBodyClick, evt); + }; document.body.classList.add("overflow-hidden"); diff --git a/src/pages/Login.vue b/src/pages/Login.vue index 9c9983b..ef179b3 100644 --- a/src/pages/Login.vue +++ b/src/pages/Login.vue @@ -31,7 +31,6 @@ ) || $t('Please input vaild ip address'), ]" - @mousedown="(evt) => focusElement(evt)" @keydown=" (evt) => { if (evt.keyCode == 13) { @@ -62,7 +61,6 @@ (val) => (val && val.length > 0) || $t('Please type something'), ]" - @mousedown="(evt) => focusElement(evt)" @keydown=" (evt) => { if (evt.keyCode == 13) { @@ -93,7 +91,6 @@ (val) => (val && val.length > 0) || $t('Please type something'), ]" - @mousedown="(evt) => focusElement(evt)" @keydown=" (evt) => { if (evt.keyCode == 13) { @@ -272,11 +269,6 @@ export default defineComponent({ data.user_name = null; data.password = null; }, - focusElement(evt: any) { - try { - evt.toElement.focus(); - } catch {} - }, }; }, }); diff --git a/src/pages/WallPage.vue b/src/pages/WallPage.vue index b2feef5..1f64af8 100644 --- a/src/pages/WallPage.vue +++ b/src/pages/WallPage.vue @@ -9,46 +9,47 @@ style="background-color: #bce0f0" >
- +
+ +