fix: 修改名称规范问题

This commit is contained in:
MTrun
2022-03-14 19:52:01 +08:00
parent 3a9f68384f
commit 6c402b3a17
70 changed files with 136 additions and 155 deletions
@@ -0,0 +1,3 @@
import PreviewRenderList from './index.vue'
export { PreviewRenderList }
@@ -0,0 +1,49 @@
<template>
<div
class="chart-item"
:class="animationsClass(item.styles.animations)"
v-for="(item, index) in localStorageInfo.componentList"
:key="item.id"
:style="{ ...useComponentAttrStyle(item.attr, index), ...useSizeStyle(item.attr), ...useStyle(item.styles)}"
>
<component
:is="item.chartConfig.chartKey"
:chartConfig="item"
:themeSetting="themeSetting"
:themeColor="themeColor"
></component>
</div>
</template>
<script setup lang="ts">
import { PropType, computed } from 'vue'
import { ChartEditStorageType } from '../../index.d'
import { chartColors } from '@/settings/chartThemes/index'
import { useSizeStyle, useStyle, useComponentAttrStyle, animationsClass } from '../../utils'
const props = defineProps({
localStorageInfo: {
type: Object as PropType<ChartEditStorageType>,
required: true
}
})
// 主题色
const themeSetting = computed(() => {
const chartThemeSetting = props.localStorageInfo.editCanvasConfig.chartThemeSetting
return chartThemeSetting
})
// 配置项
const themeColor = computed(() => {
const chartThemeColor = props.localStorageInfo.editCanvasConfig.chartThemeColor
return chartColors[chartThemeColor]
})
</script>
<style lang="scss" scoped>
.chart-item {
position: absolute;
}
</style>