model.js 399 B

1234567891011121314151617181920212223242526
  1. import { getElementId, randomCode } from "../../plugins/utils";
  2. const MODEL = {
  3. type: "LINES",
  4. x: 0,
  5. y: 0,
  6. w: 300,
  7. h: 100,
  8. sign: "",
  9. lineCount: 2,
  10. lineSpacing: 40,
  11. margin: 0, // 左右边距
  12. bold: "1px",
  13. color: "#000000",
  14. style: "solid"
  15. };
  16. const getModel = () => {
  17. return {
  18. id: getElementId(),
  19. key: randomCode(),
  20. ...MODEL
  21. };
  22. };
  23. export { MODEL, getModel };