index.tsx 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. import { Dict_Imgs } from "@/dict";
  2. import { createAttrsForm } from "../../../defines/createAttrsForm";
  3. import { createOptions } from "../../../defines/createOptions";
  4. import { GroupNumber } from "../../../formItems/GroupNumber";
  5. export { Component } from "./component";
  6. const thumbnail = require("@/assets/comps/card2/thumbnail.png")
  7. export const { options, useCompData } = createOptions({
  8. name: "卡片2",
  9. thumbnail:thumbnail,
  10. value: {
  11. },
  12. layout: {
  13. padding: "0 0 0.2rem 0",
  14. },
  15. children: {
  16. bgImg: {
  17. compKey: "Image",
  18. value: { url: require("@/assets/comps/card2/bg.png"), x: 0, y: 0, s: 1 },
  19. },
  20. item1: {
  21. compKey: "Image",
  22. value: { url: thumbnail, x: 26.50, y: -23.00, s: 4.05 },
  23. },
  24. item2: {
  25. compKey: "Image",
  26. value: { url: thumbnail, x: -4.0, y: -13.50, s: 3.90 },
  27. },
  28. item3: {
  29. compKey: "Image",
  30. value: { url: thumbnail, x: -34.00, y: -3.5, s: 4.0 },
  31. },
  32. text1: {
  33. compKey: "Text",
  34. value: `<p><span style="font-size:42px;"><strong>&nbsp; </strong></span><span style="color:hsl(0, 0%, 100%);font-size:42px;"><strong>P190</strong></span></p><p><span style="color:hsl(0, 0%, 100%);font-size:20px;">&nbsp; &nbsp; &nbsp;可注塑</span></p>`,
  35. },
  36. text2: {
  37. compKey: "Text",
  38. value: `<p style="text-align:right;"><span style="color:hsl(0, 0%, 0%);font-size:14px;">全新 &nbsp;| &nbsp;时尚 &nbsp;| &nbsp;简约 &nbsp;</span></p>`,
  39. },
  40. },
  41. });
  42. export const Form = createAttrsForm([
  43. {
  44. label: "图片尺寸",
  45. dataIndex: "value.imgSize",
  46. component: GroupNumber,
  47. props: {
  48. labels: ["宽", "高"],
  49. },
  50. },
  51. ]);