index.ts 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. import { createAttrsForm } from "../../../defines/createAttrsForm";
  2. import { createCompHooks } from "../../../defines/createCompHooks";
  3. import { createCompId } from "../../../defines/createCompId";
  4. import { GroupNumber } from "../../../formItems/GroupNumber";
  5. const thumbnail =
  6. "https://sku3d-test.obs.cn-east-3.myhuaweicloud.com/queenshow/1685607488598_3mmBXh_thumbnail.png";
  7. export { Component } from "./component";
  8. export const options = {
  9. name: "卡片5",
  10. thumbnail: thumbnail,
  11. };
  12. export const { createComp, useCompData } = createCompHooks({
  13. value: {},
  14. layout: {
  15. size: [750, 275],
  16. },
  17. children: {
  18. bgImg: () =>
  19. createCompId("Image", {
  20. value: {
  21. url: require("@/assets/comps/Card14/img_shoe.png"),
  22. },
  23. layout: {
  24. size: [750, 275],
  25. },
  26. }),
  27. text1: () =>
  28. createCompId("Text", {
  29. value: `<p style="text-align:center;line-height:1.5;"><span style="color:hsl(0,0%,90%);font-size:60px;">FASHION</span></p>`,
  30. layout: {
  31. size: [750, 180],
  32. },
  33. }),
  34. },
  35. });
  36. export const Form = createAttrsForm([
  37. {
  38. label: "图片尺寸",
  39. dataIndex: "value.imgSize",
  40. component: GroupNumber,
  41. props: {
  42. labels: ["宽", "高"],
  43. },
  44. },
  45. ]);