feat: 新增剪切

This commit is contained in:
MTrun
2022-02-04 12:17:50 +08:00
parent ad8cc8a003
commit 71e13c83e6
11 changed files with 224 additions and 45 deletions
@@ -1,17 +1,12 @@
import { getUUID } from '@/utils'
import { echartOptionProfixHandle } from '@/packages/utils/chart'
import { echartOptionProfixHandle, publicConfig } from '@/packages/utils'
import { BarCommonConfig } from './index'
import { ConfigType, CreateComponentType } from '@/packages/index.d'
import omit from 'lodash/omit'
export default class Config implements CreateComponentType {
public id = getUUID()
export default class Config extends publicConfig implements CreateComponentType {
public key = BarCommonConfig.key
public rename = undefined
public chartData: Exclude<ConfigType, ['node']> = omit(BarCommonConfig, ['node'])
public attr = { x: 0, y: 0, w: 500, h: 300 }
// 图表配置项
public option = echartOptionProfixHandle({
tooltip: {
@@ -34,10 +29,4 @@ export default class Config implements CreateComponentType {
}
]
})
// 设置坐标
public setPosition(x: number, y: number): void {
this.attr.x = x
this.attr.y = y
}
}