fix: 新增图层

This commit is contained in:
MTrun
2022-01-29 11:44:51 +08:00
parent 9659027502
commit b3d723d323
14 changed files with 108 additions and 28 deletions
@@ -1,15 +1,15 @@
import { getUUID } from '@/utils'
import { BarCommonConfig } from './index'
export const chartSize = {
w: 500,
h: 300
}
import { ConfigType } from '@/packages/index.d'
import omit from 'lodash/omit'
export default class Config {
private id: string = getUUID()
private key: string = BarCommonConfig.key
public attr = { x: 0, y: 0, ...chartSize }
chartData: Exclude<ConfigType, ['node']> = omit(BarCommonConfig, ['node'])
public attr = { x: 0, y: 0, w: 500, h: 300 }
// 图表配置项
public config = {
@@ -2,7 +2,6 @@ import BarCommon from './index.vue'
import image from '@/assets/images/chart/charts/bar_x.png'
import { ConfigType, PackagesCategoryEnum } from '@/packages/index.d'
import { ChatCategoryEnum, ChatCategoryEnumName } from '../../index.d'
import { chartSize } from './config'
export const BarCommonConfig: ConfigType = {
key: 'VBarCommon',
@@ -12,5 +11,4 @@ export const BarCommonConfig: ConfigType = {
package: PackagesCategoryEnum.CHARTS,
node: BarCommon,
image: image,
chartData: { chartSize }
}
-6
View File
@@ -7,12 +7,6 @@ export type ConfigType = {
category: string
categoryName: string
package: string
chartData: {
chartSize: {
w: number
h: number
}
}
node: Component
image: string | (() => Promise<typeof import('*.png')>)
[T: string]: unknown