component.js 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. export const config = {
  2. "name": "宫格",
  3. "icon": "el-icon-picture-outline",
  4. "fields": {
  5. "dataVal": {
  6. "label": "宫格组件",
  7. "type": "array",
  8. "child": {
  9. "dataList": {
  10. "label": "数据列表",
  11. "type": "array",
  12. "template": {
  13. "title": {
  14. "label": "标题",
  15. "type": "input",
  16. "maxlength": 5,
  17. "value": ""
  18. },
  19. "image": {
  20. "label": "轮播图片",
  21. "type": "upload",
  22. "value": ""
  23. },
  24. "jump": {
  25. "label": "页面跳转",
  26. "type": "jump",
  27. "value": ""
  28. }
  29. },
  30. "value": [{
  31. "title": {
  32. "label": "标题",
  33. "type": "input",
  34. "maxlength": 5,
  35. "value": "标题1"
  36. },
  37. "image": {
  38. "label": "轮播图片",
  39. "type": "upload",
  40. "value": "https://images8.alphacoders.com/133/thumbbig-1336068.webp"
  41. },
  42. "jump": {
  43. "label": "页面跳转",
  44. "type": "jump",
  45. "value": ""
  46. },
  47. "bgColor": {
  48. "label": "背景色",
  49. "type": "color",
  50. "value": "#fff"
  51. },
  52. "color": {
  53. "label": "字体颜色",
  54. "type": "color",
  55. "value": "#303133"
  56. }
  57. },
  58. {
  59. "title": {
  60. "label": "标题",
  61. "type": "input",
  62. "maxlength": 5,
  63. "value": "标题1"
  64. },
  65. "image": {
  66. "label": "轮播图片",
  67. "type": "upload",
  68. "value": "https://images8.alphacoders.com/133/thumbbig-1336068.webp"
  69. },
  70. "jump": {
  71. "label": "页面跳转",
  72. "type": "jump",
  73. "value": ""
  74. }
  75. },
  76. {
  77. "title": {
  78. "label": "标题",
  79. "type": "input",
  80. "maxlength": 5,
  81. "value": "标题1"
  82. },
  83. "image": {
  84. "label": "轮播图片",
  85. "type": "upload",
  86. "value": "https://images8.alphacoders.com/133/thumbbig-1336068.webp"
  87. },
  88. "jump": {
  89. "label": "页面跳转",
  90. "type": "jump",
  91. "value": ""
  92. }
  93. }
  94. ]
  95. }
  96. }
  97. },
  98. "attrs": {
  99. "label": "宫格设置",
  100. "type": "object",
  101. "child": {
  102. "col": {
  103. "label": "列数",
  104. "type": "number",
  105. "value": 4,
  106. "max": 5
  107. },
  108. "border": {
  109. "label": "宫格边框",
  110. "type": "switch",
  111. "value": true
  112. },
  113. "align": {
  114. "label": "对齐方式",
  115. "type": "select",
  116. "value": "center",
  117. "data": [{
  118. "label": "居中",
  119. "value": "center"
  120. },
  121. {
  122. "label": "居左",
  123. "value": "left"
  124. },
  125. {
  126. "label": "居右",
  127. "value": "right"
  128. }
  129. ]
  130. },
  131. "paddingTop": {
  132. "label": "上边距",
  133. "type": "number",
  134. "value": 0,
  135. "isCss": true
  136. },
  137. "paddingRight": {
  138. "label": "右边距",
  139. "type": "number",
  140. "value": 0,
  141. "isCss": true
  142. },
  143. "paddingBottom": {
  144. "label": "下边距",
  145. "type": "number",
  146. "value": 0,
  147. "isCss": true
  148. },
  149. "paddingLeft": {
  150. "label": "左边距",
  151. "type": "number",
  152. "value": 0,
  153. "isCss": true
  154. }
  155. }
  156. },
  157. "styles": {
  158. "label": "宫格样式",
  159. "type": "object",
  160. "child": {
  161. }
  162. }
  163. }
  164. }