From e49dc42e449ee7fd616dfede5f093887b31ecef2 Mon Sep 17 00:00:00 2001 From: otomad Date: Tue, 9 Jan 2024 11:31:06 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=20keyup=20=E5=8D=A0=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 目前有个缺陷,如果在输入框上按 F11,则不会触发视频全屏。 同时优化 avatar-cropper-side-length 的样式声明。 --- components/Player/PlayerVideo/PlayerVideoController.vue | 2 +- components/TextBox.vue | 1 + components/TextEditor/TextEditorRtf.vue | 3 ++- pages/settings/profile.vue | 7 +++---- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/components/Player/PlayerVideo/PlayerVideoController.vue b/components/Player/PlayerVideo/PlayerVideoController.vue index a9f29683..f74fb7af 100755 --- a/components/Player/PlayerVideo/PlayerVideoController.vue +++ b/components/Player/PlayerVideo/PlayerVideoController.vue @@ -367,7 +367,7 @@ --wrapper-size: #{$thickness}; &:active:deep(.icon) { - scale: 0.8; + scale: 0.9; } &[aria-label="fullscreen"]:active:deep(.icon) { diff --git a/components/TextBox.vue b/components/TextBox.vue index c351cbb8..0fea29b3 100755 --- a/components/TextBox.vue +++ b/components/TextBox.vue @@ -289,6 +289,7 @@ :inputmode="inputMode" @input="onInput" @keydown.stop + @keyup.stop /> {{ suffix }} diff --git a/components/TextEditor/TextEditorRtf.vue b/components/TextEditor/TextEditorRtf.vue index a62b80cc..d40fed80 100755 --- a/components/TextEditor/TextEditorRtf.vue +++ b/components/TextEditor/TextEditorRtf.vue @@ -34,7 +34,8 @@ textLength.value = props.editor.getText().length; }, onCreate({ editor }) { - editor.view.dom.addEventListener("keydown", e => e.stopPropagation()); + const proseMirror = editor.view.dom; + addEventListeners(proseMirror, "keydown", "keyup", e => e.stopPropagation()); }, }); diff --git a/pages/settings/profile.vue b/pages/settings/profile.vue index 5295ddc5..430f1e67 100755 --- a/pages/settings/profile.vue +++ b/pages/settings/profile.vue @@ -241,12 +241,11 @@ } .avatar-cropper { - --avatar-cropper-side-length: 350px; - width: var(--avatar-cropper-side-length); - height: var(--avatar-cropper-side-length); + @include square(350px, true); @media (width <= 450px) { - --avatar-cropper-side-length: 80dvw; /// 对于图片切割器,不建议使用响应式,因为切割器内部被切割的图片不会随之改变尺寸,但考虑到极端小尺寸的适配问题,且只有极少数场景会改变浏览器宽度 + --size: 80dvw; + // 对于图片切割器,不建议使用响应式,因为切割器内部被切割的图片不会随之改变尺寸,但考虑到极端小尺寸的适配问题,且只有极少数场景会改变浏览器宽度。 } }