1
0

feat: 升级 Ant Design 6 并实现主题切换功能

- 升级 antd 从 5.24.9 到 6.3.5,@ant-design/icons 从 5.6.1 到 6.1.1
- 新增 ThemeContext 和 ThemeToggle 组件,支持明暗主题切换
- 移除自定义 SCSS 样式,采用 Ant Design 主题系统
- 测试环境从 jsdom 切换到 happy-dom,提升测试性能
- 更新 AppLayout、ModelForm、ProviderForm 以适配新主题系统
This commit is contained in:
2026-04-16 13:31:30 +08:00
parent 1580b5b838
commit 47ecbadc7c
15 changed files with 374 additions and 176 deletions

View File

@@ -14,9 +14,9 @@
"test:e2e": "playwright test"
},
"dependencies": {
"@ant-design/icons": "^5.6.1",
"@ant-design/icons": "^6.1.1",
"@tanstack/react-query": "^5.80.2",
"antd": "^5.24.9",
"antd": "^6.3.5",
"react": "^19.2.4",
"react-dom": "^19.2.4",
"react-router": "^7.6.1"
@@ -38,6 +38,7 @@
"eslint-plugin-react-hooks": "^7.0.1",
"eslint-plugin-react-refresh": "^0.5.2",
"globals": "^17.4.0",
"happy-dom": "^20.9.0",
"jsdom": "^26.1.0",
"msw": "^2.8.2",
"sass": "^1.99.0",