From bfc4f7016099e7bbd9c5a5540fc5d8af14fc9543 Mon Sep 17 00:00:00 2001
From: unanmed <1319491857@qq.com>
Date: Mon, 20 Nov 2023 19:33:14 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E8=87=AA=E5=AE=9A=E4=B9=89=E6=8C=89?=
=?UTF-8?q?=E9=94=AE=E5=B8=83=E5=B1=80?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/scroll.vue | 3 +-
src/core/main/init/settings.tsx | 18 ++++++++----
src/ui/hotkey.vue | 4 +--
src/ui/settings.vue | 50 ++++++++++++++++-----------------
4 files changed, 41 insertions(+), 34 deletions(-)
diff --git a/src/components/scroll.vue b/src/components/scroll.vue
index 10fbfb7..3ad37e5 100644
--- a/src/components/scroll.vue
+++ b/src/components/scroll.vue
@@ -87,7 +87,7 @@ function draw() {
/**
* 计算元素总长度
*/
-async function calHeight(first: boolean) {
+async function calHeight(first: boolean = false) {
if (!first) {
await sleep(20);
}
@@ -207,6 +207,7 @@ onMounted(async () => {
window.addEventListener('resize', resize);
await calHeight(true);
+ await calHeight();
draw();
});
diff --git a/src/core/main/init/settings.tsx b/src/core/main/init/settings.tsx
index 9bf462c..8e62a64 100644
--- a/src/core/main/init/settings.tsx
+++ b/src/core/main/init/settings.tsx
@@ -38,9 +38,14 @@ function BooleanSetting(props: SettingComponentProps) {
};
return (
-
+
当前 {item.value ? '开启' : '关闭'}
-
@@ -55,7 +60,7 @@ function NumberSetting(props: SettingComponentProps) {
};
return (
-
+
修改设置:
+
@@ -102,8 +107,9 @@ function HotkeySetting(props: SettingComponentProps) {
function ToolbarSetting(props: SettingComponentProps) {
// todo: toolSetting.vue
return (
-
+
showSpecialSetting('toolSetting')}
diff --git a/src/ui/hotkey.vue b/src/ui/hotkey.vue
index 54926e1..f46d87e 100644
--- a/src/ui/hotkey.vue
+++ b/src/ui/hotkey.vue
@@ -193,14 +193,14 @@ onUnmounted(() => {
}
.hotkey-group-one {
- margin: 2px 0;
+ margin: 0 0 4px 0;
}
.hotkey-one {
display: flex;
flex-direction: row;
justify-content: space-between;
- margin: 2% 3%;
+ margin: 0 3% 2% 3%;
white-space: nowrap;
}
diff --git a/src/ui/settings.vue b/src/ui/settings.vue
index 25bc671..3582b1a 100644
--- a/src/ui/settings.vue
+++ b/src/ui/settings.vue
@@ -261,6 +261,31 @@ onUnmounted(() => {
height: 100%;
}
+.setting-info::v-deep(.editor-boolean) {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-around;
+ align-items: center;
+ padding: 0 10% 0 5%;
+
+ .boolean-button {
+ font-size: 75%;
+ }
+}
+
+.setting-info::v-deep(.editor-number) {
+ display: flex;
+ flex-direction: row;
+ justify-content: space-around;
+ align-items: center;
+ padding: 0 10% 0 5%;
+
+ .number-input {
+ font-size: 80%;
+ width: 40%;
+ }
+}
+
.setting-info {
width: 25vw;
@@ -269,35 +294,10 @@ onUnmounted(() => {
margin: 2% 0;
}
- .editor-boolean {
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- align-items: center;
- padding: 0 10% 0 5%;
-
- .boolean-button {
- font-size: 75%;
- }
- }
-
.info-text {
font-size: 85%;
min-height: 30%;
}
-
- .editor-number {
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- align-items: center;
- padding: 0 10% 0 5%;
-
- .number-input {
- font-size: 80%;
- width: 40%;
- }
- }
}
@media screen and (max-width: 600px) {