修复页面bug

This commit is contained in:
2025-09-26 18:42:41 +08:00
parent 3c604be299
commit 4c154ec746
19 changed files with 584 additions and 405 deletions
@@ -1,4 +1,4 @@
import React from 'react';
import React from 'react';
import { Button, Tooltip } from 'antd';
import { MoonOutlined, SunOutlined } from '@ant-design/icons';
import type { ThemeMode } from '@/theme';
@@ -8,20 +8,17 @@ export interface ThemeSwitchProps {
onToggle: () => void;
}
const ThemeSwitch: React.FC<ThemeSwitchProps> = ({ mode, onToggle }) => {
return (
<Tooltip title={mode === 'dark' ? '切换为亮色' : '切换为暗色'}>
<Button
type="text"
onClick={onToggle}
icon={mode === 'dark' ? <SunOutlined /> : <MoonOutlined />}
style={{ color: 'var(--text-primary)' }}
>
{mode === 'dark' ? '亮色' : '暗色'}
</Button>
</Tooltip>
);
};
export default ThemeSwitch;
const ThemeSwitch: React.FC<ThemeSwitchProps> = ({ mode, onToggle }) => (
<Tooltip title={mode === 'dark' ? '切换为亮色' : '切换为暗色'}>
<Button
type="text"
onClick={onToggle}
icon={mode === 'dark' ? <SunOutlined /> : <MoonOutlined />}
style={{ color: 'var(--text-primary)' }}
>
{mode === 'dark' ? '亮色' : '暗色'}
</Button>
</Tooltip>
);
export default ThemeSwitch;