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
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ updates:
ignore:
# 锁版跟随 react-pdf 内置版本(repo-hygiene 门禁强制一致),随 react-pdf 升级手动同步
- dependency-name: pdfjs-dist
# icons 6 面向 antd 6 / React 19;antd 5 内部锁 ^5,单升会产生双副本,待 antd 6 一并评估
# icons 主版本跟随 antd 大版本一起评估(现 antd 6 / icons 6),icons 7+ 单独评估无意义
- dependency-name: '@ant-design/icons'
update-types: ['version-update:semver-major']
groups:
Expand Down
4 changes: 3 additions & 1 deletion config/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,9 @@ export default defineConfig({
model: {},
initialState: {},
request: {},
layout: {},
// ProLayout v3(pro-components 3)的菜单国际化默认关闭(getMenuData 取 menu.locale || false),
// umi 模板把 layout.locale 透传为 menu.locale,这里显式开启
layout: { locale: true },
// 路由配置
routes,
npmClient: 'pnpm',
Expand Down
7 changes: 3 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,18 +46,17 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"@ant-design/icons": "^5.6.1",
"@ant-design/icons": "^6.3.4",
"@ant-design/plots": "^2.6.8",
"@ant-design/pro-components": "^2.8.10",
"@ant-design/v5-patch-for-react-19": "^1.0.3",
"@ant-design/pro-components": "^3.1.14-7",
"@dnd-kit/core": "^6.3.1",
"@fullcalendar/react": "^7.1.0",
"@pansy/amap-api-loader": "^0.4.10",
"@tinymce/tinymce-react": "^6.3.0",
"@turf/helpers": "^7.2.0",
"@turf/union": "^7.2.0",
"@umijs/max": "^4.7.22",
"antd": "^5.29.3",
"antd": "^6.6.5",
"cesium": "^1.146.0",
"cesium-navigation-es6": "^3.0.9",
"classnames": "^2.5.1",
Expand Down
1,777 changes: 967 additions & 810 deletions pnpm-lock.yaml

Large diffs are not rendered by default.

13 changes: 7 additions & 6 deletions src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// antd 5 的静态方法(message/Modal.confirm 等)内部用 ReactDOM.render 挂载,React 19 已删除该 API,
// 官方补丁改走 createRoot;必须先于任何 antd 静态调用加载(升级 antd 6 后可移除)
import '@ant-design/v5-patch-for-react-19';
// umi 的 antd 插件对 antd 6 不再自动注入 reset.css(插件源码 `if (!isV6)`),而本项目关闭了
// Tailwind preflight、基础 reset 由 antd 独占(见 tailwind.css),这里手动补回
import 'antd/dist/reset.css';

import BuildFooter from '@/components/BuildFooter';
import ErrorBoundary from '@/components/ErrorBoundary';
Expand Down Expand Up @@ -130,7 +130,9 @@ export const layout: RunTimeLayoutConfig = (initialState) => {
title: 'React Admin',
// 经 PUBLIC_PATH 拼接:GitHub Pages 部署在 /umi-react-admin/ 子路径下
logo: `${PUBLIC_PATH}logo.svg`,
rightContentRender: () => <RightContent />,
// ProLayout v3 移除了 rightContentRender(umi 布局模板仍按 v2 传它,v3 直接忽略),顶栏右侧改走 actionsRender
rightContentRender: false,
actionsRender: () => [<RightContent key="right-content" />],
menuHeaderRender: undefined,
appList: appList(),
layout: 'mix',
Expand Down Expand Up @@ -158,9 +160,8 @@ export const antd: RuntimeAntdConfig = (memo) => {
memo.theme ??= {};
// 启动初始算法与 layout 的 navTheme 同源(读同一 localStorage 键)
memo.theme.algorithm = readTheme() === 'realDark' ? antdTheme.darkAlgorithm : antdTheme.defaultAlgorithm;
// 开启 CSS 变量注入:--ant-* 变量挂在 antd 组件根的 .css-var-* 作用域(不在 :root),
// antd 6 默认注入 CSS 变量:--ant-* 变量挂在 antd 组件根的 .css-var-* 作用域(不在 :root),
// tailwind 侧 token 类经 var() 桥接随算法联动,只在 antd 组件树内生效(见 tailwind.css 的 @theme inline)
memo.theme.cssVar = true;
// 暗色主题下 ProLayout 用 dark 菜单,选中项默认整块主色填充,比浅色主题(浅灰底)重得多、抢视线;
// 改成与浅色一致的「浅底 + 高亮文字」(这两个 token 只作用于 dark 菜单,浅色主题不受影响)
memo.theme.components = {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Document/Excel/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ export default function Excel() {
className="mb-4"
showIcon
type={valid.length === rows.length ? 'success' : 'warning'}
message={t('excel.summary', {
title={t('excel.summary', {
total: rows.length,
valid: valid.length,
invalid: rows.length - valid.length,
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Document/Pdf/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -101,11 +101,11 @@ export default function Pdf() {
>
<Card styles={{ body: { background: 'var(--ant-color-fill-tertiary)' } }}>
{loadError && (
<Alert showIcon type="warning" className="mb-4" message={t('pdf.loadFailed')} description={loadError} />
<Alert showIcon type="warning" className="mb-4" title={t('pdf.loadFailed')} description={loadError} />
)}
{!file && !loadError ? (
<div className="flex min-h-[480px] items-center justify-center">
<Spin tip={t('pdf.generating')}>
<Spin description={t('pdf.generating')}>
<div className="h-24 w-64" />
</Spin>
</div>
Expand Down
4 changes: 1 addition & 3 deletions src/pages/Map/Amap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ export default function Amap() {
</>
}
>
{loadError && (
<Alert type="error" showIcon className="mb-4" message={t('map.loadFailed', { reason: loadError })} />
)}
{loadError && <Alert type="error" showIcon className="mb-4" title={t('map.loadFailed', { reason: loadError })} />}
<Card styles={{ body: { padding: 0 } }}>
<div className="relative h-[calc(100vh-280px)] min-h-[480px] overflow-hidden rounded-lg">
<div ref={containerRef} className="absolute inset-0" />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Map/Cesium/BoxSelect.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ export default function BoxSelect() {
</>
}
>
<Alert type={tool ? 'warning' : 'info'} showIcon className="mb-4" message={hint} />
<Alert type={tool ? 'warning' : 'info'} showIcon className="mb-4" title={hint} />
<div className="flex flex-col gap-4 xl:flex-row">
<Card className="min-w-0 flex-1" styles={{ body: { padding: 0 } }}>
<CesiumStage containerRef={containerRef} viewer={viewer} error={error} overlay={legend} />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Map/Cesium/Direction.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ export default function Direction() {
</>
}
>
<Alert type="info" showIcon className="mb-4" message={t('cesium.direction.hint')} />
<Alert type="info" showIcon className="mb-4" title={t('cesium.direction.hint')} />
<Card styles={{ body: { padding: 0 } }}>
<CesiumStage containerRef={containerRef} viewer={viewer} error={error} overlay={data && legend} />
</Card>
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Map/Cesium/GeoHash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default function GeoHashPage() {
</>
}
>
<Alert type="info" showIcon className="mb-4" message={t('cesium.geohash.hint')} />
<Alert type="info" showIcon className="mb-4" title={t('cesium.geohash.hint')} />
<div className="flex flex-col gap-4 xl:flex-row">
<Card className="min-w-0 flex-1" styles={{ body: { padding: 0 } }}>
<CesiumStage containerRef={containerRef} viewer={viewer} error={error} />
Expand Down
4 changes: 2 additions & 2 deletions src/pages/Map/Cesium/Heatmap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ export default function Heatmap() {
</>
}
>
<Alert type="info" showIcon className="mb-4" message={t('cesium.heatmap.hint')} />
<Alert type="info" showIcon className="mb-4" title={t('cesium.heatmap.hint')} />
<Card styles={{ body: { padding: 0 } }}>
<Spin spinning={loading} tip={t('cesium.heatmap.loading')}>
<Spin spinning={loading} description={t('cesium.heatmap.loading')}>
<div className="relative">
<CesiumStage containerRef={containerRef} viewer={viewer} error={error} overlay={legend} />
{tooltip && (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Map/Cesium/Situation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ export default function Situation() {
type={picked ? 'success' : 'info'}
showIcon
className="mb-4"
message={
title={
picked
? t('cesium.situation.target', { name: picked.id, kind: kindLabel(picked.kind), speed: picked.knots })
: t('cesium.situation.hint')
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Map/Cesium/Trajectory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ export default function Trajectory() {
type={drawing ? 'warning' : 'info'}
showIcon
className="mb-4"
message={drawing ? t('cesium.route.drawing') : (result ?? t('cesium.route.hint'))}
title={drawing ? t('cesium.route.drawing') : (result ?? t('cesium.route.hint'))}
/>
<Card styles={{ body: { padding: 0 } }}>
<CesiumStage containerRef={containerRef} viewer={viewer} error={error} />
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Ops/Tickets/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default function Tickets() {
/>
}
>
<Alert type="info" showIcon className="mb-4" message={t('tickets.dragHint')} />
<Alert type="info" showIcon className="mb-4" title={t('tickets.dragHint')} />
<Skeleton active loading={loading && !data} paragraph={{ rows: 10 }}>
<DndContext
sensors={sensors}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/System/Access/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ export default function AccessDemo() {
</Card>
</Col>
</Row>
<Alert type="info" showIcon message={t('access.note')} />
<Alert type="info" showIcon title={t('access.note')} />
</Space>
</DemoPage>
);
Expand Down
2 changes: 1 addition & 1 deletion src/pages/System/Roles/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ export default function Roles() {
]
}
>
{locked && <Alert type="info" showIcon className="mb-4" message={t('roles.adminLocked')} />}
{locked && <Alert type="info" showIcon className="mb-4" title={t('roles.adminLocked')} />}
<Skeleton active loading={!active}>
<Typography.Paragraph type="secondary">
{t('roles.selectedCount', {
Expand Down
Loading