2022-02-04 12:17:50 +08:00
|
|
|
import { getUUID } from '@/utils'
|
|
|
|
import { PublicConfigType } from '@/packages/index.d'
|
|
|
|
|
2022-02-04 18:28:02 +08:00
|
|
|
export class publicConfig implements PublicConfigType {
|
2022-02-04 12:17:50 +08:00
|
|
|
public id = getUUID()
|
|
|
|
// 重命名
|
|
|
|
public rename = undefined
|
|
|
|
// 基本信息
|
2022-02-04 18:28:02 +08:00
|
|
|
public attr = { x: 0, y: 0, w: 500, h: 300, zIndex: -1 }
|
2022-02-04 12:17:50 +08:00
|
|
|
// 设置坐标
|
|
|
|
public setPosition(x: number, y: number): void {
|
|
|
|
this.attr.x = x
|
|
|
|
this.attr.y = y
|
|
|
|
}
|
2022-02-04 18:28:02 +08:00
|
|
|
}
|