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