From 2fe63c613dff5508a91100a916c0fa8fbf8a24b3 Mon Sep 17 00:00:00 2001 From: tnt group Date: Thu, 18 May 2023 19:44:27 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E5=A2=9E=E5=8A=A0=E5=9B=BE=E6=A0=87?= =?UTF-8?q?=E8=BE=B9=E6=A0=8F=E9=80=89=E9=A1=B9=E5=8D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/packages/index.d.ts | 3 +++ src/packages/index.ts | 2 ++ src/plugins/icon.ts | 9 ++++++--- src/views/chart/ContentCharts/hooks/useAside.hook.ts | 6 +++++- 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/src/packages/index.d.ts b/src/packages/index.d.ts index a6b2d7ec..b0995a90 100644 --- a/src/packages/index.d.ts +++ b/src/packages/index.d.ts @@ -162,6 +162,7 @@ export enum PackagesCategoryEnum { TABLES = 'Tables', INFORMATIONS = 'Informations', PHOTOS = 'Photos', + ICONS = 'Icons', DECORATES = 'Decorates' } @@ -171,6 +172,7 @@ export enum PackagesCategoryName { TABLES = '列表', INFORMATIONS = '信息', PHOTOS = '图片', + ICONS = '图标', DECORATES = '小组件' } @@ -186,5 +188,6 @@ export type PackagesType = { [PackagesCategoryEnum.INFORMATIONS]: ConfigType[] [PackagesCategoryEnum.TABLES]: ConfigType[] [PackagesCategoryEnum.PHOTOS]: ConfigType[] + [PackagesCategoryEnum.ICONS]: ConfigType[] [PackagesCategoryEnum.DECORATES]: ConfigType[] } diff --git a/src/packages/index.ts b/src/packages/index.ts index bffe5949..fd9c7e83 100644 --- a/src/packages/index.ts +++ b/src/packages/index.ts @@ -3,6 +3,7 @@ import { DecorateList } from '@/packages/components/Decorates/index' import { InformationList } from '@/packages/components/Informations/index' import { TableList } from '@/packages/components/Tables/index' import { PhotoList } from '@/packages/components/Photos/index' +import { IconList } from '@/packages/components/Icons/index' import { PackagesCategoryEnum, PackagesType, ConfigType, FetchComFlagType } from '@/packages/index.d' const configModules: Record = import.meta.glob('./components/**/config.vue', { @@ -21,6 +22,7 @@ export let packagesList: PackagesType = { [PackagesCategoryEnum.INFORMATIONS]: InformationList, [PackagesCategoryEnum.TABLES]: TableList, [PackagesCategoryEnum.PHOTOS]: PhotoList, + [PackagesCategoryEnum.ICONS]: IconList, [PackagesCategoryEnum.DECORATES]: DecorateList } diff --git a/src/plugins/icon.ts b/src/plugins/icon.ts index e8979e07..6685ecd9 100644 --- a/src/plugins/icon.ts +++ b/src/plugins/icon.ts @@ -67,7 +67,8 @@ import { EyeOutline as EyeOutlineIcon, EyeOffOutline as EyeOffOutlineIcon, Albums as AlbumsIcon, - Analytics as AnalyticsIcon + Analytics as AnalyticsIcon, + Airplane as AirPlaneIcon } from '@vicons/ionicons5' import { @@ -238,10 +239,12 @@ const ionicons5 = { // 眼睛 EyeOutlineIcon, EyeOffOutlineIcon, - // 图表列表 + // 图表列表 AlbumsIcon, // 分析 - AnalyticsIcon + AnalyticsIcon, + // 飞机 + AirPlaneIcon } const carbon = { diff --git a/src/views/chart/ContentCharts/hooks/useAside.hook.ts b/src/views/chart/ContentCharts/hooks/useAside.hook.ts index 22e4f0d3..e2aa66e5 100644 --- a/src/views/chart/ContentCharts/hooks/useAside.hook.ts +++ b/src/views/chart/ContentCharts/hooks/useAside.hook.ts @@ -7,7 +7,7 @@ import { PackagesCategoryEnum, PackagesCategoryName, PackagesType } from '@/pack import { usePackagesStore } from '@/store/modules/packagesStore/packagesStore' import { ChartLayoutStoreEnum } from '@/store/modules/chartLayoutStore/chartLayoutStore.d' // 图标 -const { ImageIcon, BarChartIcon } = icon.ionicons5 +const { AirPlaneIcon, ImageIcon, BarChartIcon } = icon.ionicons5 const { TableSplitIcon, RoadmapIcon, SpellCheckIcon, GraphicalDataFlowIcon } = icon.carbon // 图表 @@ -38,6 +38,10 @@ const packagesListObj = { icon: renderIcon(ImageIcon), label: PackagesCategoryName.PHOTOS }, + [PackagesCategoryEnum.ICONS]: { + icon: renderIcon(AirPlaneIcon), + label: PackagesCategoryName.ICONS + }, [PackagesCategoryEnum.DECORATES]: { icon: renderIcon(GraphicalDataFlowIcon), label: PackagesCategoryName.DECORATES