Origindata.js

layer对应的json数据。这里是一个class类

// 原始数据
export class Origindata {
  constructor() {
    this.version = '1.0.0'; // 插件版本号
    this.id = null;
    this.eid = this.randomID();
    this.type = 'atext';
    this.animate = [];
    this.data = 'SSSSS';
    this.estyle = {};
    this.style = {
      width: 200,
      height: 200,
      top: 0,
      left: 0
    };
    this.color = '';
    this.ue = {};
  }

  randomID(randomLength = 8) {
    return (
      'EID_' +
      Number(
        Math.random()
          .toString()
          .substr(3, randomLength || 8) + Date.now()
      ).toString(36)
    );
  }
}

results matching ""

    No results matching ""