20 lines
372 B
TypeScript
Raw Normal View History

2022-01-24 21:12:18 +08:00
import { getUUID } from '@/utils'
2022-01-25 18:19:44 +08:00
import { BarCommonConfig } from './index'
2022-01-24 21:12:18 +08:00
2022-01-25 11:09:32 +08:00
export default class Config {
2022-01-24 21:12:18 +08:00
id: string = getUUID()
2022-01-25 18:19:44 +08:00
key: string = BarCommonConfig.key
attr = { x: 0, y: 0, w: 500, h: 300 }
// 图表配置项
2022-01-24 21:12:18 +08:00
public config = {
global: {}
}
2022-01-25 18:19:44 +08:00
// 设置坐标
setPosition(x: number, y: number) {
this.attr.x = x
this.attr.y = y
}
2022-01-24 21:12:18 +08:00
}