Skip to content

Commit 88e4e32

Browse files
committed
fix: 选择器和输入框适配暗黑模式
1 parent 6d105e0 commit 88e4e32

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed

feature/src/assets/ant-reset.less

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
--color-input-hover: #fff;
1616
// 边框
1717
--color-border-light: #f0f0f0;
18+
// 输入框附带icon
19+
--color-action-color: rgba(0, 0, 0, 0.25);;
1820
}
1921

2022
.dark {
@@ -29,4 +31,6 @@
2931
--color-input-hover: #444d;
3032
// 边框
3133
--color-border-light: #444d;
34+
// 输入框附带icon
35+
--color-action-color: #ffffff4d;
3236
}

feature/src/views/settings/database.vue

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -304,8 +304,17 @@ const downloadPlugin = async (plugin) => {
304304
.ant-form-item-label>label {
305305
color: var(--color-text-content);
306306
}
307-
.ant-modal-body{
308-
background-color: var(--color-body-bg)
307+
.ant-modal-body {
308+
background-color: var(--color-body-bg);
309+
.ant-input,
310+
.ant-input-password,
311+
.ant-select-selector {
312+
background: var(--color-input-hover) !important;
313+
color: var(--color-text-content);
314+
}
315+
.ant-input-password-icon, .ant-select-arrow {
316+
color: var(--color-action-color);
317+
}
309318
}
310319
}
311320
</style>

feature/src/views/settings/index.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -512,6 +512,13 @@ const changeLanguage = (value) => {
512512
background: var(--color-list-hover);
513513
}
514514
}
515+
.ant-select-selector {
516+
background: var(--color-input-hover) !important;
517+
color: var(--color-text-content);
518+
}
519+
.ant-input-password-icon, .ant-select-arrow {
520+
color: var(--color-action-color);
521+
}
515522
}
516523
}
517524
}

0 commit comments

Comments
 (0)