feat: 添加图标库,更新菜单与页面标签中的icon相关功能与样式
This commit is contained in:
@@ -11,12 +11,11 @@ import type { MenuNode } from '@/types';
|
||||
*
|
||||
* ```json
|
||||
* [
|
||||
* { "id": "dashboard", "name": "工作台", "path": "dashboard", "component": "dashboard", "icon": "DashboardOutlined" },
|
||||
* { "id": "dashboard", "name": "工作台", "path": "dashboard", "component": "dashboard", "icon": "AiOutlineDashboard" },
|
||||
* {
|
||||
* "id": "events", "name": "赛事管理", "path": "events", "icon": "TrophyOutlined",
|
||||
* "id": "events", "name": "赛事管理", "path": "events", "icon": "AiOutlineTrophy",
|
||||
* "children": [
|
||||
* { "id": "events_list", "name": "赛事列表", "path": "events/list", "component": "events/list" },
|
||||
* { "id": "events_orders", "name": "订单管理", "path": "events/orders", "component": "events/orders" }
|
||||
* { "id": "events_list", "name": "赛事列表", "path": "events/list", "component": "events/list", "icon": "AiOutlineUnorderedList" }
|
||||
* ]
|
||||
* }
|
||||
* ]
|
||||
@@ -29,7 +28,7 @@ import type { MenuNode } from '@/types';
|
||||
* | name | string | 是 | 菜单名称/路由 name |
|
||||
* | path | string | 是 | 路由相对路径(不带 / 前缀) |
|
||||
* | component | string | 否 | 组件路径(映射 src/pages/ 下目录,如 "events/list") |
|
||||
* | icon | string | 否 | antd 图标名(如 DashboardOutlined) |
|
||||
* | icon | string | 否 | vue-icons-plus 图标名(如 AiOutlineTrophy,需在 routeIcon.tsx 注册) |
|
||||
* | sort | number | 否 | 排序权重(越小越前) |
|
||||
* | hideInMenu | boolean | 否 | 是否在菜单中隐藏 |
|
||||
* | externalLink | string | 否 | 外链地址 |
|
||||
@@ -47,7 +46,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
id: 'events',
|
||||
name: '赛事管理',
|
||||
path: 'events',
|
||||
icon: 'TrophyOutlined',
|
||||
icon: 'AiOutlineTrophy',
|
||||
children: [
|
||||
{
|
||||
id: 'events_list',
|
||||
@@ -55,6 +54,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'events/list',
|
||||
component: 'events/list',
|
||||
componentName: 'EventList',
|
||||
icon: 'AiOutlineUnorderedList',
|
||||
},
|
||||
{
|
||||
id: 'events_orders',
|
||||
@@ -62,6 +62,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'events/orders',
|
||||
component: 'events/orders',
|
||||
componentName: 'EventOrders',
|
||||
icon: 'AiOutlineShoppingCart',
|
||||
},
|
||||
{
|
||||
id: 'events_users',
|
||||
@@ -69,6 +70,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'events/users',
|
||||
component: 'events/users',
|
||||
componentName: 'EventUsers',
|
||||
icon: 'AiOutlineTeam',
|
||||
},
|
||||
{
|
||||
id: 'events_banner',
|
||||
@@ -76,6 +78,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'events/banner',
|
||||
component: 'events/banner',
|
||||
componentName: 'EventBanner',
|
||||
icon: 'AiOutlinePicture',
|
||||
},
|
||||
{
|
||||
id: 'events_logs',
|
||||
@@ -83,6 +86,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'events/logs',
|
||||
component: 'events/logs',
|
||||
componentName: 'EventLogs',
|
||||
icon: 'AiOutlineHistory',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -90,7 +94,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
id: 'finance',
|
||||
name: '账务管理',
|
||||
path: 'finance',
|
||||
icon: 'TransactionOutlined',
|
||||
icon: 'AiOutlineTransaction',
|
||||
children: [
|
||||
{
|
||||
id: 'finance_withdraw',
|
||||
@@ -98,6 +102,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'finance/withdraw',
|
||||
component: 'finance/withdraw',
|
||||
componentName: 'FinanceWithdraw',
|
||||
icon: 'AiOutlineMoneyCollect',
|
||||
},
|
||||
{
|
||||
id: 'finance_wallet',
|
||||
@@ -105,6 +110,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'finance/wallet',
|
||||
component: 'finance/wallet',
|
||||
componentName: 'FinanceWallet',
|
||||
icon: 'AiOutlineWallet',
|
||||
},
|
||||
{
|
||||
id: 'finance_payments',
|
||||
@@ -112,6 +118,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'finance/payments',
|
||||
component: 'finance/payments',
|
||||
componentName: 'FinancePayments',
|
||||
icon: 'AiOutlinePayCircle',
|
||||
},
|
||||
{
|
||||
id: 'finance_reports',
|
||||
@@ -119,6 +126,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'finance/reports',
|
||||
component: 'finance/reports',
|
||||
componentName: 'FinanceReports',
|
||||
icon: 'AiOutlineBarChart',
|
||||
},
|
||||
],
|
||||
},
|
||||
@@ -126,7 +134,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
id: 'system',
|
||||
name: '系统管理',
|
||||
path: 'system',
|
||||
icon: 'SettingOutlined',
|
||||
icon: 'AiOutlineSetting',
|
||||
children: [
|
||||
{
|
||||
id: 'system_users',
|
||||
@@ -134,6 +142,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'system/users',
|
||||
component: 'system/users',
|
||||
componentName: 'SystemUsers',
|
||||
icon: 'AiOutlineUser',
|
||||
},
|
||||
{
|
||||
id: 'system_roles',
|
||||
@@ -141,6 +150,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'system/roles',
|
||||
component: 'system/roles',
|
||||
componentName: 'SystemRoles',
|
||||
icon: 'AiOutlineSafetyCertificate',
|
||||
},
|
||||
{
|
||||
id: 'system_logs',
|
||||
@@ -148,6 +158,7 @@ export const FALLBACK_MENU_NODES: MenuNode[] = [
|
||||
path: 'system/logs',
|
||||
component: 'system/logs',
|
||||
componentName: 'SystemLogs',
|
||||
icon: 'AiOutlineAudit',
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user