perf: menu svg图标替换

This commit is contained in:
rd
2025-07-07 15:02:04 +08:00
parent 0766c7c1ad
commit 2882d1cae5
7 changed files with 47 additions and 7 deletions

View File

@ -2,10 +2,14 @@
* 资产营销平台
*/
import { IconBookmark } from '@arco-design/web-vue/es/icon';
import type { AppRouteRecordRaw } from '../types';
import { MENU_GROUP_IDS } from '@/router/constants';
import IconRepository from '@/assets/svg/icon-repository.svg';
import IconMediaAccount from '@/assets/svg/icon-mediaAccount.svg';
import IconPutAccount from '@/assets/svg/icon-putAccount.svg';
import IconIntelligentSolution from '@/assets/svg/icon-intelligentSolution.svg';
const COMPONENTS: AppRouteRecordRaw[] = [
{
path: '/repository',
@ -13,7 +17,7 @@ const COMPONENTS: AppRouteRecordRaw[] = [
redirect: 'repository/brandMaterials',
meta: {
locale: '品牌资产管理',
icon: IconBookmark,
icon: IconRepository,
requiresAuth: true,
roles: ['*'],
requiresSidebar: true,
@ -39,7 +43,7 @@ const COMPONENTS: AppRouteRecordRaw[] = [
redirect: 'media-account/accountManagement',
meta: {
locale: '账号资源中心',
icon: IconBookmark,
icon: IconMediaAccount,
requiresAuth: true,
roles: ['*'],
requiresSidebar: true,
@ -87,7 +91,7 @@ const COMPONENTS: AppRouteRecordRaw[] = [
redirect: 'put-account/accountManagement',
meta: {
locale: '投放资源中心',
icon: IconBookmark,
icon: IconPutAccount,
requiresAuth: true,
roles: ['*'],
requiresSidebar: true,
@ -143,7 +147,7 @@ const COMPONENTS: AppRouteRecordRaw[] = [
redirect: 'intelligent-solution/businessAnalysisReport',
meta: {
locale: '智能方案管理',
icon: IconBookmark,
icon: IconIntelligentSolution,
requiresAuth: true,
roles: ['*'],
requiresSidebar: true,

View File

@ -4,7 +4,7 @@ declare module 'vue-router' {
interface RouteMeta {
roles?: string[]; // Controls roles that have access to the page
requiresAuth?: boolean; // Whether login is required to access the current page (every route must declare)
icon?: RouteComponent; // The icon show in the side menu
icon?: RouteComponent | string; // The icon show in the side menu
locale?: string; // The locale name show in side menu and breadcrumb
needNavigate?: boolean; // if set true, the breadcrumb will support navigate
hideInMenu?: boolean; // If true, it is not displayed in the side menu