index.ts 822 B

1234567891011121314151617181920212223242526272829303132333435
  1. import { Dict_Imgs } from "@/dict";
  2. import { createAttrsForm } from "../../defines/createAttrsForm";
  3. import { createOptions2 } from "../../defines/createOptions";
  4. import { RegCompType } from "../../defines/creator";
  5. export { Component } from "./component";
  6. export const { createCompData, useCompData } = RegCompType(
  7. {type: "Image2", name: "图片", thumbnail: Dict_Imgs.Default},
  8. {
  9. value: {url: Dict_Imgs.Default, x: 0, y:0, s: 1},
  10. }
  11. );
  12. export const Form = createAttrsForm([
  13. {
  14. label: "图片",
  15. dataIndex: "value.url",
  16. component: "Input",
  17. },
  18. {
  19. label: "x偏移",
  20. dataIndex: "value.x",
  21. component: "Input",
  22. },
  23. {
  24. label: "y偏移",
  25. dataIndex: "value.y",
  26. component: "Input",
  27. },{
  28. label: "缩放",
  29. dataIndex: "value.s",
  30. component: "Input",
  31. },
  32. ]);