fix: 提交动态注册的代码

This commit is contained in:
mtruning
2022-03-06 21:26:31 +08:00
parent b817ee7f80
commit 5c797b738e
5 changed files with 34 additions and 6 deletions
@@ -19,6 +19,8 @@ import { PropType, computed } from 'vue'
import { ChartEditStorageType } from '../../index.d'
import { chartColors } from '@/settings/chartThemes/index'
import { useSizeStyle, useComponentStyle } from '../../hooks/useStyle.hook'
import { componentPackageInstall } from '@/utils'
import { CreateComponentType } from '@/packages/index.d'
const props = defineProps({
localStorageInfo: {
@@ -27,6 +29,11 @@ const props = defineProps({
}
})
// 动态注册
props.localStorageInfo.componentList.forEach((e: CreateComponentType) => {
componentPackageInstall(e.chartConfig)
});
// 主题色
const themeSetting = computed(() => {
const chartThemeSetting = props.localStorageInfo.editCanvasConfig.chartThemeSetting