fix: 修复图标组件持久化(或导出再导入)时保存的分类不正确导致无法载入的问题

This commit is contained in:
tnt group 2023-05-27 00:02:40 +08:00
parent 1c2bf4019a
commit 9c0aa14473
3 changed files with 7 additions and 6 deletions

View File

@ -6,8 +6,8 @@ export const IconConfig: ConfigType = {
chartKey: 'VIcon',
conKey: 'VCIcon',
title: '图标',
category: ChatCategoryEnum.COMMON,
categoryName: ChatCategoryEnumName.COMMON,
category: ChatCategoryEnum.DEFAULT,
categoryName: ChatCategoryEnumName.DEFAULT,
package: PackagesCategoryEnum.ICONS,
chartFrame: ChartFrameEnum.STATIC,
image: 'icon.png'

View File

@ -1,12 +1,13 @@
export enum ChatCategoryEnum {
ML = 'MaterialLine',
COMMON = 'Common',
WEATHER = "WEATHER"
WEATHER = 'Weather',
DEFAULT = 'Default' // 这个仅用来表示组件分类目录,不要在 index.ts 中导入
}
export enum ChatCategoryEnumName {
ML = '动画',
COMMON = '通用',
WEATHER = "天气"
WEATHER = '天气',
DEFAULT = '默认'
}

View File

@ -2,4 +2,4 @@ import MaterialLine from './MaterialLine'
import Common from './Common'
import Weather from './Weather'
export const IconList = [...MaterialLine, ...Common, ...Weather]
export const IconList = [...MaterialLine, ...Weather, ...Common]