model.js 305 B

123456789101112131415161718192021
  1. import { getElementId, randomCode } from "../../plugins/utils";
  2. const MODEL = {
  3. type: "FORBID_AREA",
  4. x: 0,
  5. y: 0,
  6. w: 200,
  7. h: 200,
  8. sign: "",
  9. content: "",
  10. };
  11. const getModel = () => {
  12. return {
  13. id: getElementId(),
  14. key: randomCode(),
  15. ...MODEL,
  16. };
  17. };
  18. export { MODEL, getModel };