publicConfig.ts 404 B

123456789101112131415
  1. import { getUUID } from '@/utils'
  2. import { PublicConfigType } from '@/packages/index.d'
  3. export class publicConfig implements PublicConfigType {
  4. public id = getUUID()
  5. // 重命名
  6. public rename = undefined
  7. // 基本信息
  8. public attr = { x: 0, y: 0, w: 500, h: 300, zIndex: -1 }
  9. // 设置坐标
  10. public setPosition(x: number, y: number): void {
  11. this.attr.x = x
  12. this.attr.y = y
  13. }
  14. }