[feat]:[FL-220][引入更多AntDesign图标(70+),覆盖系统业务场景]

Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
chengkai3
2026-06-28 18:13:29 +08:00
parent 468c34b1f0
commit 192fc29709
5 changed files with 470 additions and 7139 deletions
+109 -203
View File
@@ -87,9 +87,9 @@
}
},
"node_modules/@ant-design/icons-svg": {
"version": "4.5.0",
"resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.5.0.tgz",
"integrity": "sha512-1BTUFyKPTBZ53MuTP8s0k5SFEXL7o3VHEOwLgzaoWKwnBeqIcqUtVshc4SKzhI6uACfqhJqBwBUE9FsWR3uULA==",
"version": "4.4.2",
"resolved": "https://registry.npmjs.org/@ant-design/icons-svg/-/icons-svg-4.4.2.tgz",
"integrity": "sha512-vHbT+zJEVzllwP+CM+ul7reTEfBR0vgxFe7+lREAsAA7YGsYpboiq2sQNeQeRvh09GfQgs/GyFEvZpJ9cLXpXA==",
"license": "MIT"
},
"node_modules/@ant-design/react-slick": {
@@ -1181,44 +1181,12 @@
}
}
},
"node_modules/github-slugger": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/github-slugger/-/github-slugger-2.0.0.tgz",
"integrity": "sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==",
"license": "ISC"
},
"node_modules/grapheme-splitter": {
"version": "1.0.4",
"resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz",
"integrity": "sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==",
"license": "MIT"
},
"node_modules/hast-util-heading-rank": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/hast-util-heading-rank/-/hast-util-heading-rank-3.0.0.tgz",
"integrity": "sha512-EJKb8oMUXVHcWZTDepnr+WNbfnXKFNf9duMesmr4S8SXTJBJ9M4Yok08pu9vxdJwdlGRhVumk9mEhkEvKGifwA==",
"license": "MIT",
"dependencies": {
"@types/hast": "^3.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-is-element": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/hast-util-is-element/-/hast-util-is-element-3.0.0.tgz",
"integrity": "sha512-Val9mnv2IWpLbNPqc/pUem+a7Ipj2aHacCwgNfTiK0vJKl0LF+4Ba4+v1oPHFpf3bLYmreq0/l3Gud9S5OH42g==",
"license": "MIT",
"dependencies": {
"@types/hast": "^3.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-to-jsx-runtime": {
"version": "2.3.6",
"resolved": "https://registry.npmjs.org/hast-util-to-jsx-runtime/-/hast-util-to-jsx-runtime-2.3.6.tgz",
@@ -1246,35 +1214,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-to-string": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/hast-util-to-string/-/hast-util-to-string-3.0.1.tgz",
"integrity": "sha512-XelQVTDWvqcl3axRfI0xSeoVKzyIFPwsAGSLIsKdJKQMXDYJS4WYrBNF/8J7RdhIcFI2BOHgAifggsvsxp/3+A==",
"license": "MIT",
"dependencies": {
"@types/hast": "^3.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-to-text": {
"version": "4.0.2",
"resolved": "https://registry.npmjs.org/hast-util-to-text/-/hast-util-to-text-4.0.2.tgz",
"integrity": "sha512-KK6y/BN8lbaq654j7JgBydev7wuNMcID54lkRav1P0CaE1e47P72AWWPiGKXTJU271ooYzcvTAn/Zt0REnvc7A==",
"license": "MIT",
"dependencies": {
"@types/hast": "^3.0.0",
"@types/unist": "^3.0.0",
"hast-util-is-element": "^3.0.0",
"unist-util-find-after": "^5.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/hast-util-whitespace": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/hast-util-whitespace/-/hast-util-whitespace-3.0.0.tgz",
@@ -1288,15 +1227,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/highlight.js": {
"version": "11.11.1",
"resolved": "https://registry.npmjs.org/highlight.js/-/highlight.js-11.11.1.tgz",
"integrity": "sha512-Xwwo44whKBVCYoliBQwaPvtd/2tYFkRQtXDWj1nackaV2JPXx3L0+Jvd8/qCJ2p+ML0/XVkJ2q+Mr+UVdpJK5w==",
"license": "BSD-3-Clause",
"engines": {
"node": ">=12.0.0"
}
},
"node_modules/html-url-attributes": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/html-url-attributes/-/html-url-attributes-3.0.1.tgz",
@@ -1388,12 +1318,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/is-mobile": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-mobile/-/is-mobile-5.0.0.tgz",
"integrity": "sha512-Tz/yndySvLAEXh+Uk8liFCxOwVH6YutuR74utvOcu7I9Di+DwM0mtdPVZNaVvvBUM2OXxne/NhOs1zAO7riusQ==",
"license": "MIT"
},
"node_modules/is-plain-obj": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-4.1.0.tgz",
@@ -1517,21 +1441,6 @@
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/lowlight": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/lowlight/-/lowlight-3.3.0.tgz",
"integrity": "sha512-0JNhgFoPvP6U6lE/UdVsSq99tn6DhjjpAj5MxG49ewd2mOBVtwWYIT8ClyABhq198aXXODMU6Ox8DrGy/CpTZQ==",
"license": "MIT",
"dependencies": {
"@types/hast": "^3.0.0",
"devlop": "^1.0.0",
"highlight.js": "~11.11.0"
},
"funding": {
"type": "github",
"url": "https://github.com/sponsors/wooorm"
}
},
"node_modules/mdast-util-from-markdown": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/mdast-util-from-markdown/-/mdast-util-from-markdown-2.0.3.tgz",
@@ -2999,40 +2908,6 @@
"redux": "^5.0.0"
}
},
"node_modules/rehype-highlight": {
"version": "7.0.2",
"resolved": "https://registry.npmjs.org/rehype-highlight/-/rehype-highlight-7.0.2.tgz",
"integrity": "sha512-k158pK7wdC2qL3M5NcZROZ2tR/l7zOzjxXd5VGdcfIyoijjQqpHd3JKtYSBDpDZ38UI2WJWuFAtkMDxmx5kstA==",
"license": "MIT",
"dependencies": {
"@types/hast": "^3.0.0",
"hast-util-to-text": "^4.0.0",
"lowlight": "^3.0.0",
"unist-util-visit": "^5.0.0",
"vfile": "^6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/rehype-slug": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/rehype-slug/-/rehype-slug-6.0.0.tgz",
"integrity": "sha512-lWyvf/jwu+oS5+hL5eClVd3hNdmwM1kAC0BUvEGD19pajQMIzcNUd/k9GsfQ+FfECvX+JE+e9/btsKH0EjJT6A==",
"license": "MIT",
"dependencies": {
"@types/hast": "^3.0.0",
"github-slugger": "^2.0.0",
"hast-util-heading-rank": "^3.0.0",
"hast-util-to-string": "^3.0.0",
"unist-util-visit": "^5.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/remark-parse": {
"version": "11.0.0",
"resolved": "https://registry.npmjs.org/remark-parse/-/remark-parse-11.0.0.tgz",
@@ -3261,20 +3136,6 @@
"url": "https://opencollective.com/unified"
}
},
"node_modules/unist-util-find-after": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/unist-util-find-after/-/unist-util-find-after-5.0.0.tgz",
"integrity": "sha512-amQa0Ep2m6hE2g72AugUItjbuM8X8cGQnFoHk0pGfrFeT9GZhzN5SW8nRsiGKK7Aif4CrACPENkA6P/Lw6fHGQ==",
"license": "MIT",
"dependencies": {
"@types/unist": "^3.0.0",
"unist-util-is": "^6.0.0"
},
"funding": {
"type": "opencollective",
"url": "https://opencollective.com/unified"
}
},
"node_modules/unist-util-is": {
"version": "6.0.1",
"resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.1.tgz",
@@ -3441,7 +3302,7 @@
"version": "0.1.0",
"hasInstallScript": true,
"dependencies": {
"@ant-design/icons": "^6.3.2",
"@ant-design/icons": "^5.6.1",
"@antv/x6": "^3.1.7",
"@tanstack/react-query": "^5.90.5",
"antd": "^5.29.3",
@@ -3449,7 +3310,6 @@
"class-variance-authority": "^0.7.1",
"clsx": "^2.1.1",
"framer-motion": "^12.38.0",
"highlight.js": "^11.11.1",
"jszip": "^3.10.1",
"next": "16.2.3",
"react": "19.2.4",
@@ -3457,8 +3317,6 @@
"react-markdown": "^10.1.0",
"react-redux": "^9.3.0",
"recharts": "^3.8.1",
"rehype-highlight": "^7.0.2",
"rehype-slug": "^6.0.0",
"reselect": "^5.2.0",
"tailwind-merge": "^3.5.0"
},
@@ -3488,63 +3346,6 @@
"url": "https://github.com/sponsors/sindresorhus"
}
},
"web/node_modules/@ant-design/colors": {
"version": "8.0.1",
"resolved": "https://registry.npmjs.org/@ant-design/colors/-/colors-8.0.1.tgz",
"integrity": "sha512-foPVl0+SWIslGUtD/xBr1p9U4AKzPhNYEseXYRRo5QSzGACYZrQbe11AYJbYfAWnWSpGBx6JjBmSeugUsD9vqQ==",
"license": "MIT",
"dependencies": {
"@ant-design/fast-color": "^3.0.0"
}
},
"web/node_modules/@ant-design/fast-color": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/@ant-design/fast-color/-/fast-color-3.0.1.tgz",
"integrity": "sha512-esKJegpW4nckh0o6kV3Tkb7NPIZYbPnnFxmQDUmL08ukXZAvV85TZBr70eGuke/CIArLaP6aw8lt9KILjnWuOw==",
"license": "MIT",
"engines": {
"node": ">=8.x"
}
},
"web/node_modules/@ant-design/icons": {
"version": "6.3.2",
"resolved": "https://registry.npmjs.org/@ant-design/icons/-/icons-6.3.2.tgz",
"integrity": "sha512-B6O5a5XJ4wjtNOfZejXYwHW5zvKV5gYkjGf11dHGLEbKn0ABDGndo41+gfIiXyTFhvESj4XTotuud33mUFid0g==",
"license": "MIT",
"dependencies": {
"@ant-design/colors": "^8.0.1",
"@ant-design/icons-svg": "^4.5.0",
"@rc-component/util": "^1.11.0",
"clsx": "^2.1.1"
},
"engines": {
"node": ">=8"
},
"peerDependencies": {
"react": ">=16.0.0",
"react-dom": ">=16.0.0"
}
},
"web/node_modules/@ant-design/icons/node_modules/@rc-component/util": {
"version": "1.11.1",
"resolved": "https://registry.npmjs.org/@rc-component/util/-/util-1.11.1.tgz",
"integrity": "sha512-awVlI3ub2vqfqkYxOBc/uQ0efm3jw0wcrhtO/YWLyZfxiKXczKwNbVuhlnyxytDt7H9pbbVQiqr+O6MLATtRYg==",
"license": "MIT",
"dependencies": {
"is-mobile": "^5.0.0",
"react-is": "^18.2.0"
},
"peerDependencies": {
"react": ">=18.0.0",
"react-dom": ">=18.0.0"
}
},
"web/node_modules/@ant-design/icons/node_modules/react-is": {
"version": "18.3.1",
"resolved": "https://registry.npmjs.org/react-is/-/react-is-18.3.1.tgz",
"integrity": "sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==",
"license": "MIT"
},
"web/node_modules/@babel/code-frame": {
"version": "7.29.0",
"dev": true,
@@ -8060,6 +7861,111 @@
"peerDependencies": {
"zod": "^3.25.0 || ^4.0.0"
}
},
"web/node_modules/@next/swc-darwin-arm64": {
"version": "16.2.3",
"resolved": "https://mirrors.cloud.tencent.com/npm/@next/swc-darwin-arm64/-/swc-darwin-arm64-16.2.3.tgz",
"integrity": "sha512-u37KDKTKQ+OQLvY+z7SNXixwo4Q2/IAJFDzU1fYe66IbCE51aDSAzkNDkWmLN0yjTUh4BKBd+hb69jYn6qqqSg==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"web/node_modules/@next/swc-darwin-x64": {
"version": "16.2.3",
"resolved": "https://mirrors.cloud.tencent.com/npm/@next/swc-darwin-x64/-/swc-darwin-x64-16.2.3.tgz",
"integrity": "sha512-gHjL/qy6Q6CG3176FWbAKyKh9IfntKZTB3RY/YOJdDFpHGsUDXVH38U4mMNpHVGXmeYW4wj22dMp1lTfmu/bTQ==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"darwin"
],
"engines": {
"node": ">= 10"
}
},
"web/node_modules/@next/swc-linux-arm64-gnu": {
"version": "16.2.3",
"resolved": "https://mirrors.cloud.tencent.com/npm/@next/swc-linux-arm64-gnu/-/swc-linux-arm64-gnu-16.2.3.tgz",
"integrity": "sha512-U6vtblPtU/P14Y/b/n9ZY0GOxbbIhTFuaFR7F4/uMBidCi2nSdaOFhA0Go81L61Zd6527+yvuX44T4ksnf8T+Q==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"web/node_modules/@next/swc-linux-arm64-musl": {
"version": "16.2.3",
"resolved": "https://mirrors.cloud.tencent.com/npm/@next/swc-linux-arm64-musl/-/swc-linux-arm64-musl-16.2.3.tgz",
"integrity": "sha512-/YV0LgjHUmfhQpn9bVoGc4x4nan64pkhWR5wyEV8yCOfwwrH630KpvRg86olQHTwHIn1z59uh6JwKvHq1h4QEw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"web/node_modules/@next/swc-linux-x64-musl": {
"version": "16.2.3",
"resolved": "https://mirrors.cloud.tencent.com/npm/@next/swc-linux-x64-musl/-/swc-linux-x64-musl-16.2.3.tgz",
"integrity": "sha512-Kt44hGJfZSefebhk/7nIdivoDr3Ugp5+oNz9VvF3GUtfxutucUIHfIO0ZYO8QlOPDQloUVQn4NVC/9JvHRk9hw==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"linux"
],
"engines": {
"node": ">= 10"
}
},
"web/node_modules/@next/swc-win32-arm64-msvc": {
"version": "16.2.3",
"resolved": "https://mirrors.cloud.tencent.com/npm/@next/swc-win32-arm64-msvc/-/swc-win32-arm64-msvc-16.2.3.tgz",
"integrity": "sha512-O2NZ9ie3Tq6xj5Z5CSwBT3+aWAMW2PIZ4egUi9MaWLkwaehgtB7YZjPm+UpcNpKOme0IQuqDcor7BsW6QBiQBw==",
"cpu": [
"arm64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
},
"web/node_modules/@next/swc-win32-x64-msvc": {
"version": "16.2.3",
"resolved": "https://mirrors.cloud.tencent.com/npm/@next/swc-win32-x64-msvc/-/swc-win32-x64-msvc-16.2.3.tgz",
"integrity": "sha512-Ibm29/GgB/ab5n7XKqlStkm54qqZE8v2FnijUPBgrd67FWrac45o/RsNlaOWjme/B5UqeWt/8KM4aWBwA1D2Kw==",
"cpu": [
"x64"
],
"optional": true,
"os": [
"win32"
],
"engines": {
"node": ">= 10"
}
}
}
}
-6936
View File
File diff suppressed because it is too large Load Diff
+1
View File
@@ -14,6 +14,7 @@
"@ant-design/icons": "^6.3.2",
"@antv/x6": "^3.1.7",
"@tanstack/react-query": "^5.90.5",
"@ant-design/icons": "^5.6.1",
"antd": "^5.29.3",
"cesium": "^1.140.0",
"class-variance-authority": "^0.7.1",
+272
View File
@@ -0,0 +1,272 @@
"use client";
import type { ComponentType, ReactNode } from "react";
// ──────────────────────────────────────────────
// 集中式 AntDesign 图标引用文件
// 按业务场景分类,便于菜单配置时引用
// ──────────────────────────────────────────────
// 通用/UI 图标
import {
AppstoreOutlined,
LogoutOutlined,
MenuFoldOutlined,
MenuOutlined,
MenuUnfoldOutlined,
MoonOutlined,
SunOutlined,
SyncOutlined,
UserOutlined,
} from "@ant-design/icons";
// 数据与表格
import {
AuditOutlined,
BarChartOutlined,
AreaChartOutlined,
DatabaseOutlined,
DotChartOutlined,
FileExcelOutlined,
LineChartOutlined,
NumberOutlined,
PieChartOutlined,
TableOutlined,
} from "@ant-design/icons";
// 文件与文档
import {
CopyOutlined,
FileAddOutlined,
FileImageOutlined,
FileOutlined,
FilePdfOutlined,
FileSearchOutlined,
FileTextOutlined,
FolderOpenOutlined,
FolderOutlined,
PaperClipOutlined,
ScissorOutlined,
} from "@ant-design/icons";
// 用户与权限
import {
ContactsOutlined,
CrownOutlined,
IdcardOutlined,
KeyOutlined,
LockOutlined,
SafetyCertificateOutlined,
SafetyOutlined,
ShopOutlined,
TeamOutlined,
} from "@ant-design/icons";
// 系统与设置
import {
ApiOutlined,
BuildOutlined,
CloudOutlined,
ClusterOutlined,
ControlOutlined,
DashboardOutlined,
ExperimentOutlined,
SettingOutlined,
ToolOutlined,
} from "@ant-design/icons";
// 通信与消息
import {
BellOutlined,
CommentOutlined,
CustomerServiceOutlined,
MailOutlined,
MessageOutlined,
NotificationOutlined,
SendOutlined,
WechatOutlined,
} from "@ant-design/icons";
// 导航与动作
import {
DownloadOutlined,
ExportOutlined,
ImportOutlined,
LinkOutlined,
ReloadOutlined,
ShrinkOutlined,
SwapOutlined,
UploadOutlined,
} from "@ant-design/icons";
// 状态与提示
import {
CheckCircleOutlined,
CloseCircleOutlined,
InfoCircleOutlined,
QuestionCircleOutlined,
StopOutlined,
WarningOutlined,
} from "@ant-design/icons";
// 杂项工具
import {
BulbOutlined,
EyeOutlined,
FireOutlined,
RobotOutlined,
SearchOutlined,
ThunderboltOutlined,
} from "@ant-design/icons";
// 专业/领域相关
import {
ApartmentOutlined,
CalendarOutlined,
ConsoleSqlOutlined,
DeploymentUnitOutlined,
GlobalOutlined,
NodeIndexOutlined,
RadarChartOutlined,
} from "@ant-design/icons";
/**
* 菜单图标映射表
*
* 左侧为菜单配置中存储的 icon 名称字符串,
* 右侧为对应的 AntDesign 图标组件。
*
* 支持两种格式:
* - 友好名称(如 Users、Settings2)── 兼容旧数据
* - 直接的 Outlined 名称(如 TeamOutlined)── 新配置统一使用
*/
const MENU_ICON_COMPONENTS = {
// ── 原有友好名称映射(兼容旧数据) ──
Users: TeamOutlined,
ShieldCheck: SafetyCertificateOutlined,
MenuSquare: AppstoreOutlined,
Settings2: SettingOutlined,
Network: NodeIndexOutlined,
Zap: ThunderboltOutlined,
Map: GlobalOutlined,
RadarChart: RadarChartOutlined,
CalendarClock: CalendarOutlined,
Experiment: ExperimentOutlined,
Apartment: ApartmentOutlined,
FolderTree: FolderOpenOutlined,
Database: DatabaseOutlined,
FileText: FileTextOutlined,
Terminal: ConsoleSqlOutlined,
Bell: BellOutlined,
// ── 数据与表格 ──
TableOutlined,
FileExcelOutlined,
BarChartOutlined,
PieChartOutlined,
LineChartOutlined,
DotChartOutlined,
AreaChartOutlined,
NumberOutlined,
AuditOutlined,
// ── 文件与文档 ──
FileOutlined,
FolderOutlined,
FilePdfOutlined,
FileImageOutlined,
FileAddOutlined,
FileSearchOutlined,
PaperClipOutlined,
CopyOutlined,
ScissorOutlined,
// ── 用户与权限 ──
SafetyOutlined,
LockOutlined,
KeyOutlined,
ShopOutlined,
CrownOutlined,
IdcardOutlined,
ContactsOutlined,
// ── 系统与设置 ──
ToolOutlined,
BuildOutlined,
ApiOutlined,
CloudOutlined,
ClusterOutlined,
DashboardOutlined,
ControlOutlined,
// ── 通信与消息 ──
MessageOutlined,
NotificationOutlined,
MailOutlined,
SendOutlined,
WechatOutlined,
CustomerServiceOutlined,
CommentOutlined,
// ── 导航与动作 ──
LinkOutlined,
ExportOutlined,
ImportOutlined,
DownloadOutlined,
UploadOutlined,
ReloadOutlined,
SwapOutlined,
ShrinkOutlined,
// ── 状态与提示 ──
CheckCircleOutlined,
WarningOutlined,
InfoCircleOutlined,
CloseCircleOutlined,
QuestionCircleOutlined,
StopOutlined,
// ── 杂项工具 ──
SearchOutlined,
EyeOutlined,
RobotOutlined,
BulbOutlined,
FireOutlined,
// ── 领域相关(已在上面作为友好名称导出,此处保持引用) ──
DeploymentUnitOutlined,
RadarChartOutlined,
CalendarOutlined,
ExperimentOutlined,
ApartmentOutlined,
FolderOpenOutlined,
DatabaseOutlined,
FileTextOutlined,
ConsoleSqlOutlined,
BellOutlined,
SettingOutlined,
NodeIndexOutlined,
ThunderboltOutlined,
GlobalOutlined,
AppstoreOutlined,
SafetyCertificateOutlined,
TeamOutlined,
UserOutlined,
} as const;
type MenuIconKey = keyof typeof MENU_ICON_COMPONENTS;
/**
* 根据图标名称解析为对应的 React 组件
*/
function resolveMenuIcon(iconName: string | null, fallback?: ReactNode): ReactNode {
const key = iconName?.trim() as MenuIconKey | undefined;
if (key && key in MENU_ICON_COMPONENTS) {
const IconComponent = MENU_ICON_COMPONENTS[key] as ComponentType<Record<string, unknown>>;
return <IconComponent />;
}
return fallback ?? <AppstoreOutlined />;
}
export { MENU_ICON_COMPONENTS, resolveMenuIcon };
export type { MenuIconKey };
+88
View File
@@ -99,6 +99,35 @@ import ShareAltOutlined from "@ant-design/icons/ShareAltOutlined";
import BranchesOutlined from "@ant-design/icons/BranchesOutlined";
import CodeOutlined from "@ant-design/icons/CodeOutlined";
import CommentOutlined from "@ant-design/icons/CommentOutlined";
import FileExcelOutlined from "@ant-design/icons/FileExcelOutlined";
import AreaChartOutlined from "@ant-design/icons/AreaChartOutlined";
import NumberOutlined from "@ant-design/icons/NumberOutlined";
import DotChartOutlined from "@ant-design/icons/DotChartOutlined";
import FileOutlined from "@ant-design/icons/FileOutlined";
import FolderOutlined from "@ant-design/icons/FolderOutlined";
import FilePdfOutlined from "@ant-design/icons/FilePdfOutlined";
import FileImageOutlined from "@ant-design/icons/FileImageOutlined";
import FileSearchOutlined from "@ant-design/icons/FileSearchOutlined";
import ScissorOutlined from "@ant-design/icons/ScissorOutlined";
import SafetyOutlined from "@ant-design/icons/SafetyOutlined";
import ShopOutlined from "@ant-design/icons/ShopOutlined";
import CrownOutlined from "@ant-design/icons/CrownOutlined";
import ContactsOutlined from "@ant-design/icons/ContactsOutlined";
import BuildOutlined from "@ant-design/icons/BuildOutlined";
import ApiOutlined from "@ant-design/icons/ApiOutlined";
import CloudOutlined from "@ant-design/icons/CloudOutlined";
import ClusterOutlined from "@ant-design/icons/ClusterOutlined";
import NotificationOutlined from "@ant-design/icons/NotificationOutlined";
import SendOutlined from "@ant-design/icons/SendOutlined";
import WechatOutlined from "@ant-design/icons/WechatOutlined";
import CustomerServiceOutlined from "@ant-design/icons/CustomerServiceOutlined";
import DownloadOutlined from "@ant-design/icons/DownloadOutlined";
import UploadOutlined from "@ant-design/icons/UploadOutlined";
import SwapOutlined from "@ant-design/icons/SwapOutlined";
import ShrinkOutlined from "@ant-design/icons/ShrinkOutlined";
import RobotOutlined from "@ant-design/icons/RobotOutlined";
import BulbOutlined from "@ant-design/icons/BulbOutlined";
import FireOutlined from "@ant-design/icons/FireOutlined";
// ─── 导出类型 ───
@@ -203,6 +232,36 @@ export const ICON_MAP: Record<string, ComponentType<{ className?: string; style?
BranchesOutlined,
CodeOutlined,
CommentOutlined,
// 补充图标
FileExcelOutlined,
AreaChartOutlined,
NumberOutlined,
DotChartOutlined,
FileOutlined,
FolderOutlined,
FilePdfOutlined,
FileImageOutlined,
FileSearchOutlined,
ScissorOutlined,
SafetyOutlined,
ShopOutlined,
CrownOutlined,
ContactsOutlined,
BuildOutlined,
ApiOutlined,
CloudOutlined,
ClusterOutlined,
NotificationOutlined,
SendOutlined,
WechatOutlined,
CustomerServiceOutlined,
DownloadOutlined,
UploadOutlined,
SwapOutlined,
ShrinkOutlined,
RobotOutlined,
BulbOutlined,
FireOutlined,
};
/** 分类图标列表 — 供图标选择器 UI 使用 */
@@ -221,6 +280,10 @@ export const ICON_CATEGORIES: IconCategory[] = [
{ name: "KeyOutlined", label: "密钥", component: KeyOutlined },
{ name: "AuditOutlined", label: "审计", component: AuditOutlined },
{ name: "IdcardOutlined", label: "身份", component: IdcardOutlined },
{ name: "SafetyOutlined", label: "安全", component: SafetyOutlined },
{ name: "ShopOutlined", label: "租户/组织", component: ShopOutlined },
{ name: "CrownOutlined", label: "管理/特权", component: CrownOutlined },
{ name: "ContactsOutlined", label: "通讯录", component: ContactsOutlined },
],
},
{
@@ -237,6 +300,9 @@ export const ICON_CATEGORIES: IconCategory[] = [
{ name: "LineChartOutlined", label: "折线图", component: LineChartOutlined },
{ name: "FieldTimeOutlined", label: "定时任务", component: FieldTimeOutlined },
{ name: "AlertOutlined", label: "告警", component: AlertOutlined },
{ name: "AreaChartOutlined", label: "面积图", component: AreaChartOutlined },
{ name: "NumberOutlined", label: "数值统计", component: NumberOutlined },
{ name: "DotChartOutlined", label: "散点图", component: DotChartOutlined },
],
},
{
@@ -253,6 +319,13 @@ export const ICON_CATEGORIES: IconCategory[] = [
{ name: "TableOutlined", label: "表格", component: TableOutlined },
{ name: "FileAddOutlined", label: "新建文件", component: FileAddOutlined },
{ name: "PaperClipOutlined", label: "附件", component: PaperClipOutlined },
{ name: "FileExcelOutlined", label: "Excel表格", component: FileExcelOutlined },
{ name: "FileOutlined", label: "通用文件", component: FileOutlined },
{ name: "FolderOutlined", label: "文件夹", component: FolderOutlined },
{ name: "FilePdfOutlined", label: "PDF文档", component: FilePdfOutlined },
{ name: "FileImageOutlined", label: "图片", component: FileImageOutlined },
{ name: "FileSearchOutlined", label: "文件搜索", component: FileSearchOutlined },
{ name: "ScissorOutlined", label: "剪切", component: ScissorOutlined },
],
},
{
@@ -327,6 +400,21 @@ export const ICON_CATEGORIES: IconCategory[] = [
{ name: "BranchesOutlined", label: "分支/流程", component: BranchesOutlined },
{ name: "CodeOutlined", label: "代码", component: CodeOutlined },
{ name: "CommentOutlined", label: "评论/备注", component: CommentOutlined },
{ name: "BuildOutlined", label: "构建/部署", component: BuildOutlined },
{ name: "ApiOutlined", label: "API接口", component: ApiOutlined },
{ name: "CloudOutlined", label: "云服务", component: CloudOutlined },
{ name: "ClusterOutlined", label: "集群", component: ClusterOutlined },
{ name: "NotificationOutlined", label: "通知推送", component: NotificationOutlined },
{ name: "SendOutlined", label: "发送", component: SendOutlined },
{ name: "WechatOutlined", label: "微信", component: WechatOutlined },
{ name: "CustomerServiceOutlined", label: "客服", component: CustomerServiceOutlined },
{ name: "DownloadOutlined", label: "下载", component: DownloadOutlined },
{ name: "UploadOutlined", label: "上传", component: UploadOutlined },
{ name: "SwapOutlined", label: "交换/切换", component: SwapOutlined },
{ name: "ShrinkOutlined", label: "收缩", component: ShrinkOutlined },
{ name: "RobotOutlined", label: "机器人/AI", component: RobotOutlined },
{ name: "BulbOutlined", label: "灵感/提示", component: BulbOutlined },
{ name: "FireOutlined", label: "热门/紧急", component: FireOutlined },
],
},
];