index.ts 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. import { Dict_Imgs } from "@/dict";
  2. import { createAttrsForm } from "../../defines/createAttrsForm";
  3. import { createOptions } from "../../defines/createOptions";
  4. import { ImagePicker } from "../../formItems/ImagePicker";
  5. export { Component } from "./component";
  6. export const { options, useCompData } = createOptions({
  7. name: "3D",
  8. thumbnail: Dict_Imgs.Default,
  9. value: {
  10. url: "https://www.sku3d.com/share.html?id=6478676ca494a3ea15a6fa82",
  11. openWindow: false,
  12. poster: Dict_Imgs.Default,
  13. ratio: 1,
  14. },
  15. });
  16. export const Form = createAttrsForm([
  17. {
  18. label: "3D链接",
  19. dataIndex: "value.url",
  20. component: "Input",
  21. },
  22. {
  23. label: "封面",
  24. dataIndex: "value.poster",
  25. component: ImagePicker,
  26. },
  27. {
  28. label: "视频比例",
  29. dataIndex: "value.ratio",
  30. component: "Select",
  31. props: {
  32. options: [
  33. { label: "1:1", value: 1 },
  34. { label: "4:3", value: 4 / 3 },
  35. { label: "3:4", value: 3 / 4 },
  36. { label: "16:9", value: 16 / 9 },
  37. { label: "9:16", value: 9 / 16 },
  38. ],
  39. },
  40. },
  41. {
  42. label: "是否跳转",
  43. dataIndex: "value.openWindow",
  44. component: "Switch",
  45. },
  46. ]);