Skip to content

Commit

Permalink
修改 keyup 占用
Browse files Browse the repository at this point in the history
目前有个缺陷,如果在输入框上按 F11,则不会触发视频全屏。

同时优化 avatar-cropper-side-length 的样式声明。
  • Loading branch information
otomad committed Jan 9, 2024
1 parent ac99357 commit e49dc42
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion components/Player/PlayerVideo/PlayerVideoController.vue
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@
--wrapper-size: #{$thickness};
&:active:deep(.icon) {
scale: 0.8;
scale: 0.9;
}
&[aria-label="fullscreen"]:active:deep(.icon) {
Expand Down
1 change: 1 addition & 0 deletions components/TextBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@
:inputmode="inputMode"
@input="onInput"
@keydown.stop
@keyup.stop
/>
<span class="suffix">{{ suffix }}</span>
<label>{{ placeholder }}</label>
Expand Down
3 changes: 2 additions & 1 deletion components/TextEditor/TextEditorRtf.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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());
},
});
Expand Down
7 changes: 3 additions & 4 deletions pages/settings/profile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -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;
// 对于图片切割器,不建议使用响应式,因为切割器内部被切割的图片不会随之改变尺寸,但考虑到极端小尺寸的适配问题,且只有极少数场景会改变浏览器宽度。
}
}
</style>

0 comments on commit e49dc42

Please sign in to comment.