fix(settings): Radio.Group 按钮模式,help 说明,移除多余底边距

This commit is contained in:
2026-06-06 23:28:59 +08:00
parent c0384f9a07
commit 6c4d9affae
2 changed files with 15 additions and 3 deletions

View File

@@ -51,8 +51,15 @@ export function SettingsPage() {
return (
<Card title="主题" type="inner">
<Form colon={false} disabled={isUpdating} labelAlign="left" labelCol={{ flex: "120px" }} layout="horizontal">
<Form.Item colon={false} label="主题模式">
<Form
className="settings-form"
colon={false}
disabled={isUpdating}
labelAlign="left"
labelCol={{ flex: "120px" }}
layout="horizontal"
>
<Form.Item colon={false} help="选择跟随系统将自动适配操作系统的深浅色偏好" label="主题模式">
<Radio.Group
buttonStyle="solid"
onChange={(e) => handleThemeChange(parseThemePreference(e.target.value))}
@@ -61,7 +68,7 @@ export function SettingsPage() {
value={preference}
/>
</Form.Item>
<Form.Item colon={false} label="紧凑模式" tooltip="开启后控件间距和高度变小,显示更多内容">
<Form.Item colon={false} help="开启后控件间距和高度变小,显示更多内容" label="紧凑模式">
<Switch checked={compact} onChange={handleCompactChange} />
</Form.Item>
</Form>

View File

@@ -455,3 +455,8 @@ body {
.markdown-table tbody tr:hover td {
background: var(--ant-color-fill-quaternary);
}
/* 设置页表单:最后一项无底边距 */
.settings-form .ant-form-item:last-child {
margin-bottom: 0;
}