mirror of
https://gitee.com/dromara/go-view.git
synced 2026-04-23 00:00:12 +08:00
feat: 新增剪切
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user