Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .claude/CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ umi-react-admin 是一个基于 Umi Max 的企业级 React 后台管理系统模

- **框架**: Umi Max 4.x + React 18 + TypeScript 5.x
- **UI**: Ant Design 5 + Ant Design Pro Components
- **样式**: Tailwind CSS 3 + Less
- **样式**: Tailwind CSS 4(CSS 优先配置,工具类不分层,见 tailwind.css 头注释)+ Less
- **状态管理**: Umi initialState(全局用户与主题)+ 组件内 state(未启用 valtio)
- **地图**: Cesium.js、OpenLayers 9、高德地图
- **图表**: Ant Design Charts (plots)、D3.js
Expand Down Expand Up @@ -83,7 +83,7 @@ config/

- [config/config.ts](config/config.ts) - Umi 构建配置
- [config/routes.ts](config/routes.ts) - 路由配置
- [tailwind.config.js](tailwind.config.js) - Tailwind CSS 配置
- [tailwind.css](tailwind.css) - Tailwind CSS 配置(v4 无 JS 配置文件)
- [.prettierrc](.prettierrc) - Prettier 配置
- [.eslintrc.js](.eslintrc.js) - ESLint 配置

Expand Down
4 changes: 4 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,7 @@ src/.umi-production/
.claude/
.kilo/
coverage/
# 根目录的 JS 配置是点文件,ESLint 默认忽略;lint-staged 显式传入时报「File ignored by default」
# 警告,在 --max-warnings=0 下直接挡住提交。取消忽略,让它们与其他 JS 一样参与检查
!.eslintrc.js
!.stylelintrc.js
4 changes: 2 additions & 2 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = {
extends: require.resolve('@umijs/max/stylelint'),
// tailwindcss 报错 https://qiita.com/mizozobu/items/9e86b86df79f9988c7b3
// Tailwind v4 的 CSS 指令(tailwind.css)
rules: {
'at-rule-no-unknown': [
true,
{
ignoreAtRules: ['tailwind', 'layer', 'apply'],
ignoreAtRules: ['theme', 'source', 'utility', 'variant', 'custom-variant', 'reference', 'layer', 'apply'],
},
],
'function-no-unknown': [
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@

## [未发布] - 2026-09 治理批次(feat/next-umi)

### 依赖升级阶段 3(2026-09-23)

- FullCalendar 6 → 7:五个插件包合并为 `@fullcalendar/react/*` 入口,新增 peer `temporal-polyfill`;v7 不再内置 CSS,改为引入 skeleton + Classic 主题(保持 v6 外观);类型改名(`DateSelectArg` → `DateSelectInfo` 等);日历随应用暗色主题切换(调色板读取祖先 `data-color-scheme`)。可见差异:v6 下日期数字被 antd 的链接色染成蓝色,v7 恢复正文色;列头默认不加粗
- Tailwind CSS 3 → 4:删除 `tailwind.config.js`,配置迁入 `tailwind.css`(`@theme inline` 桥接 antd CSS 变量、`@source` 限定扫描范围、`@source not inline()` 替代 blocklist)。工具类刻意不放进 `@layer`,保持 v3 与 antd CSS-in-JS 的层叠语义;日历侧栏的 `space-y-3` 改为等价的 v3 选择器(v4 的 space-y 实现会输给 antd 排版外边距)。17 个页面与升级前逐像素对比无差异(日历页除外)
- 浏览器基线提高到 Chrome 111+ / Firefox 128+ / Safari 16.4+(Tailwind 4 要求),README 已注明

### 依赖升级阶段 2(2026-09-23)

- 工程工具主版本:husky 9(`prepare` 改为 `husky`,hook 去掉 v8 的引导行)、lint-staged 17(需 Node ≥22.22.1;配置改名 `.lintstagedrc.json`,17 起无扩展名按 YAML 解析)、cross-env 10(`start` 脚本无环境变量,去掉无效包装)、prettier-plugin-organize-imports 4、prettier-plugin-packagejson 3
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ src/
## 功能说明

- **鉴权**:演示级登录闭环(任意用户名/密码),路由守卫与权限拦截开箱可用。开发环境走 umi mock;纯静态部署(GitHub Pages / Vercel / Docker)没有后端,演示 token 在前端本地签发与校验;接入真实后端配置 `UMI_APP_API_BASE` 即走 HTTP 接口(见 `src/services/auth.ts` 与 `src/services/demo/mode.ts`)。用户名 `dontHaveAccess` 可体验权限拦截。
- **暗色模式**:顶栏调色盘图标热切换(antd5 算法 + 布局联动,localStorage 持久化)。地图与图表等非 AntD 绘制区域暂不随算法变化。
- **暗色模式**:顶栏调色盘图标热切换(antd5 算法 + 布局联动,localStorage 持久化)。日历(FullCalendar 7 调色板)随主题切换;地图与图表等其余非 AntD 绘制区域暂不随算法变化。
- **多语言**:框架层页面(登录/错误页/全局提示)中英双语;功能演示页文案为中文示例。
- **无障碍**:`<html lang>` 随语言切换、页面允许缩放;顶栏菜单为可聚焦按钮 + 下拉菜单(键盘可操作);图标按钮具可访问名称、图片有 alt。
- **PDF**:基于 pdf.js 5,需要支持原生 `Promise.try` 的现代浏览器(Chrome 128+ / Firefox 134+ / Safari 18.2+)。
- **浏览器基线**:Tailwind CSS 4 依赖 `@property` / `color-mix()`,全站需 Chrome 111+ / Firefox 128+ / Safari 16.4+;PDF 基于 pdf.js 5,需要支持原生 `Promise.try` 的浏览器(Chrome 128+ / Firefox 134+ / Safari 18.2+)。

## 部署

Expand Down
10 changes: 3 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,7 @@
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/sortable": "^10.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@fullcalendar/core": "^6.1.21",
"@fullcalendar/daygrid": "^6.1.21",
"@fullcalendar/interaction": "^6.1.21",
"@fullcalendar/multimonth": "^6.1.21",
"@fullcalendar/react": "^6.1.21",
"@fullcalendar/timegrid": "^6.1.21",
"@fullcalendar/react": "^7.1.0",
"@pansy/react-amap": "^2.21.0",
"@tinymce/tinymce-react": "^6.3.0",
"@turf/helpers": "^7.2.0",
Expand All @@ -74,6 +69,7 @@
"pdfjs-dist": "5.4.296",
"react-pdf": "^10.5.0",
"signature_pad": "^5.1.4",
"temporal-polyfill": "^1.0.5",
"tinymce": "^8.9.2",
"wavesurfer.js": "^7.12.12",
"xgplayer": "^3.0.26",
Expand All @@ -94,7 +90,7 @@
"prettier": "^3.9.8",
"prettier-plugin-organize-imports": "^4.3.0",
"prettier-plugin-packagejson": "^3.0.2",
"tailwindcss": "^3.4.19",
"tailwindcss": "^4.3.3",
"typescript": "^5.9.3",
"vitest": "^5.0.1"
},
Expand Down
Loading
Loading