model.js 335 B

1234567891011121314151617181920212223
  1. import { getElementId, randomCode } from "../../plugins/utils";
  2. const MODEL = {
  3. type: "IMAGE",
  4. x: 0,
  5. y: 0,
  6. w: 150,
  7. h: 100,
  8. sign: "",
  9. borderColor: "",
  10. borderStyle: "",
  11. content: []
  12. };
  13. const getModel = () => {
  14. return {
  15. id: getElementId(),
  16. key: randomCode(),
  17. ...MODEL
  18. };
  19. };
  20. export { MODEL, getModel };