index.ts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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/1685592084017_Wu5DW5_thumbnail.png";
  7. export { Component } from "./component";
  8. export const options = {
  9. name: "卡片4",
  10. thumbnail: thumbnail,
  11. };
  12. export const { createComp, useCompData } = createCompHooks({
  13. value: {},
  14. layout: {
  15. padding: "10px",
  16. size: [750, 300],
  17. },
  18. children: {
  19. bgImg: () =>
  20. createCompId("Image", {
  21. value: { url: thumbnail, x: 27.5, y: -6.5, s: 3.5 },
  22. }),
  23. title: () =>
  24. createCompId("Title3", {
  25. layout: {
  26. margin: "0 0 20px 0",
  27. },
  28. children: {
  29. title: createCompId("Text", {
  30. value: `<p style="text-align:center;"><span style="color:#333;font-size:20px;font-weight: bold;">产品详情</span></p>`,
  31. }),
  32. subtitle: createCompId("Text", {
  33. value: `<p style="text-align:center;">/ Product Details /</p>`,
  34. }),
  35. },
  36. }),
  37. text1: () =>
  38. createCompId("Text", {
  39. value: `<p><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>名称: &nbsp; P190(注塑)</strong></span></p><p><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>规格: &nbsp; 52英寸</strong></span><br><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>厚度: &nbsp; 1.0mm+0.05mm</strong></span></p><p><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>底材: &nbsp; 鹿皮绒</strong></span></p><p><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>用途: &nbsp; 凉鞋、跟鞋、高更鞋、</strong></span><br><span style="color:hsl(0, 0%, 60%);font-size:14px;"><strong>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;时尚休闲鞋等</strong></span></p>`,
  40. }),
  41. },
  42. });
  43. export const Form = createAttrsForm([
  44. {
  45. label: "图片尺寸",
  46. dataIndex: "value.imgSize",
  47. component: GroupNumber,
  48. props: {
  49. labels: ["宽", "高"],
  50. },
  51. },
  52. ]);