mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
fix: 提交动态注册的代码
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
<script setup lang="ts">
|
||||
import { PropType } from 'vue'
|
||||
import { MacOsControlBtn } from '@/components/MacOsControlBtn/index'
|
||||
import { requireErrorImg, componentInstall } from '@/utils'
|
||||
import { componentInstall } from '@/utils'
|
||||
import { DragKeyEnum } from '@/enums/editPageEnum'
|
||||
import { ConfigType } from '@/packages/index.d'
|
||||
import omit from 'lodash/omit'
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -18,7 +18,6 @@ import { getLocalStorage, fetchRouteParams } from '@/utils'
|
||||
import { StorageEnum } from '@/enums/storageEnum'
|
||||
import { RenderList } from './components/RenderList/index'
|
||||
import { ChartEditStorageType } from './index.d'
|
||||
import { useSizeStyle } from './hooks/useStyle.hook'
|
||||
|
||||
const previewRef = ref()
|
||||
|
||||
@@ -55,7 +54,7 @@ const previewRefStyle = computed(() => {
|
||||
if (!localStorageInfo) {
|
||||
window['$message'].warning('获取数据失败')
|
||||
}
|
||||
console.log(localStorageInfo);
|
||||
|
||||
nextTick(() => {
|
||||
const { calcRate, windowResize, unWindowResize } = usePreviewScale(width.value as number, height.value as number, previewRef.value)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user