Showing
6 changed files
with
25 additions
and
13 deletions
@@ -2,11 +2,14 @@ import { ChartFrameEnum } from '@/packages/index.d' | @@ -2,11 +2,14 @@ import { ChartFrameEnum } from '@/packages/index.d' | ||
2 | import { ConfigType } from '@/packages/index.d' | 2 | import { ConfigType } from '@/packages/index.d' |
3 | import { EPackagesCategoryEnum } from '@/packages/components/external/types' | 3 | import { EPackagesCategoryEnum } from '@/packages/components/external/types' |
4 | import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d' | 4 | import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d' |
5 | +import { useWidgetKey } from '@/packages/external/useWidgetKey' | ||
6 | + | ||
7 | +const { key, chartKey, conKey } = useWidgetKey('LeftCenterRightHead') | ||
5 | 8 | ||
6 | export const LeftCenterRightHeadConfig: ConfigType = { | 9 | export const LeftCenterRightHeadConfig: ConfigType = { |
7 | - key: 'LeftCenterRightHead', | ||
8 | - chartKey: 'VLeftCenterRightHead', | ||
9 | - conKey: 'VCLeftCenterRightHead', | 10 | + key, |
11 | + chartKey, | ||
12 | + conKey, | ||
10 | title: '通用头部', | 13 | title: '通用头部', |
11 | category: ChatCategoryEnum.HEADCOMBINATION, | 14 | category: ChatCategoryEnum.HEADCOMBINATION, |
12 | categoryName: ChatCategoryEnumName.HEADCOMBINATION, | 15 | categoryName: ChatCategoryEnumName.HEADCOMBINATION, |
1 | import { ChartFrameEnum, ConfigType } from '@/packages/index.d' | 1 | import { ChartFrameEnum, ConfigType } from '@/packages/index.d' |
2 | import { EPackagesCategoryEnum } from '@/packages/components/external/types' | 2 | import { EPackagesCategoryEnum } from '@/packages/components/external/types' |
3 | import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d' | 3 | import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d' |
4 | +import { useWidgetKey } from '@/packages/external/useWidgetKey' | ||
4 | 5 | ||
6 | +const { key, chartKey, conKey } = useWidgetKey('LeftCenterRightHeadCommon') | ||
5 | export const LeftCenterRightHeadCommonConfig: ConfigType = { | 7 | export const LeftCenterRightHeadCommonConfig: ConfigType = { |
6 | - key: 'LeftCenterRightHeadCommon', | ||
7 | - chartKey: 'VLeftCenterRightHeadCommon', | ||
8 | - conKey: 'VCLeftCenterRightHeadCommon', | 8 | + key, |
9 | + chartKey, | ||
10 | + conKey, | ||
9 | title: '头部', | 11 | title: '头部', |
10 | category: ChatCategoryEnum.HEADCOMBINATION, | 12 | category: ChatCategoryEnum.HEADCOMBINATION, |
11 | categoryName: ChatCategoryEnumName.HEADCOMBINATION, | 13 | categoryName: ChatCategoryEnumName.HEADCOMBINATION, |
1 | -import { ConfigType, PackagesCategoryEnum, ChartFrameEnum } from '@/packages/index.d' | 1 | +import { useWidgetKey } from '@/packages/external/useWidgetKey' |
2 | +import { ConfigType, ChartFrameEnum } from '@/packages/index.d' | ||
3 | +import { EPackagesCategoryEnum } from '../../../types' | ||
2 | import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d' | 4 | import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d' |
3 | 5 | ||
6 | +const { key, conKey, chartKey } = useWidgetKey('WordCloud') | ||
4 | export const WordCloudConfig: ConfigType = { | 7 | export const WordCloudConfig: ConfigType = { |
5 | - key: 'WordCloud', | ||
6 | - chartKey: 'VWordCloud', | ||
7 | - conKey: 'VCWordCloud', | 8 | + key, |
9 | + chartKey, | ||
10 | + conKey, | ||
8 | title: '词云', | 11 | title: '词云', |
9 | category: ChatCategoryEnum.MORE, | 12 | category: ChatCategoryEnum.MORE, |
10 | categoryName: ChatCategoryEnumName.MORE, | 13 | categoryName: ChatCategoryEnumName.MORE, |
11 | - package: PackagesCategoryEnum.INFORMATIONS, | 14 | + package: EPackagesCategoryEnum.COMPOSES, |
12 | chartFrame: ChartFrameEnum.COMMON, | 15 | chartFrame: ChartFrameEnum.COMMON, |
13 | image: 'words_cloud.png' | 16 | image: 'words_cloud.png' |
14 | } | 17 | } |
@@ -3,7 +3,7 @@ import { ConfigType } from "@/packages/index.d" | @@ -3,7 +3,7 @@ import { ConfigType } from "@/packages/index.d" | ||
3 | 3 | ||
4 | // 包分类枚举 | 4 | // 包分类枚举 |
5 | export enum EPackagesCategoryEnum { | 5 | export enum EPackagesCategoryEnum { |
6 | - COMPOSES = 'external/Composes', | 6 | + COMPOSES = 'Composes', |
7 | } | 7 | } |
8 | 8 | ||
9 | // 图表包类型 | 9 | // 图表包类型 |
@@ -11,7 +11,7 @@ export const CONFIG_COMPONENT_PREFIX = 'VCC' | @@ -11,7 +11,7 @@ export const CONFIG_COMPONENT_PREFIX = 'VCC' | ||
11 | * @param scope directory name 目录名 | 11 | * @param scope directory name 目录名 |
12 | * @returns | 12 | * @returns |
13 | */ | 13 | */ |
14 | -export const useWidgetKey = (scope: string, extendPrimitiveCategory = false) => { | 14 | +export const useWidgetKey = (scope: string, extendPrimitiveCategory = true) => { |
15 | const prefix = extendPrimitiveCategory ? EXTERNAL_WIDGET_PREFIX : '' | 15 | const prefix = extendPrimitiveCategory ? EXTERNAL_WIDGET_PREFIX : '' |
16 | return { | 16 | return { |
17 | key: scope, | 17 | key: scope, |