component.json 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  1. {
  2. "name": "图片组件",
  3. "icon": "el-icon-picture-outline",
  4. "fields": {
  5. "dataVal": {
  6. "label": "图片组件",
  7. "type": "array",
  8. "child": {
  9. "dataSource": {
  10. "label": "数据源",
  11. "type": "select",
  12. "valType": "Number",
  13. "value": 0,
  14. "data": [{
  15. "label": "自定义",
  16. "value": 0
  17. },
  18. {
  19. "label": "选择",
  20. "value": 1
  21. },
  22. {
  23. "label": "接口获取",
  24. "value": 2
  25. }
  26. ]
  27. },
  28. "dataList": {
  29. "label": "图片",
  30. "type": "upload",
  31. "value": "http://songhe-cdn.oss-cn-shenzhen.aliyuncs.com/songhe/20231030/cfdca276e835409292246f29d6732956.jpeg"
  32. }
  33. }
  34. },
  35. "attrs": {
  36. "label": "轮播设置",
  37. "type": "object",
  38. "child": {
  39. "width": {
  40. "label": "图片宽度",
  41. "type": "number",
  42. "valType": "Number",
  43. "value": 100,
  44. "min": 1,
  45. "max": 100
  46. },
  47. "height": {
  48. "label": "图片高度",
  49. "type": "number",
  50. "valType": "Number",
  51. "value": 300,
  52. "min": 1,
  53. "max": 1000
  54. },
  55. "border-radius": {
  56. "label": "圆角值",
  57. "hint": "图片形状为圆形时无效",
  58. "type": "number",
  59. "valType": "Number",
  60. "value": 0,
  61. "max": 1000
  62. },
  63. "shape": {
  64. "label": "图片形状",
  65. "type": "select",
  66. "valType": "String",
  67. "value": "square",
  68. "data": [{
  69. "label": "圆形",
  70. "value": "circle"
  71. },
  72. {
  73. "label": "方形",
  74. "value": "square"
  75. }
  76. ]
  77. },
  78. "mode": {
  79. "label": "裁剪模式",
  80. "hint": "图片的裁剪模式",
  81. "type": "select",
  82. "valType": "String",
  83. "value": "aspectFill",
  84. "data": [{
  85. "label": "不保持纵横比缩放图片",
  86. "value": "scaleToFill"
  87. },
  88. {
  89. "label": "保持纵横比缩放图片,使图片的长边能完全显示出来",
  90. "value": "aspectFit"
  91. },
  92. {
  93. "label": "保持纵横比缩放图片,只保证图片的短边能完全显示出来",
  94. "value": "aspectFill"
  95. },
  96. {
  97. "label": "宽度不变,高度自动变化",
  98. "value": "widthFix"
  99. },
  100. {
  101. "label": "高度不变,宽度自动变化",
  102. "value": "heightFix"
  103. }
  104. ]
  105. }
  106. }
  107. },
  108. "styles": {
  109. "label": "轮播样式",
  110. "type": "object",
  111. "child": {
  112. "paddingTop": {
  113. "label": "上边距",
  114. "type": "number",
  115. "value": 0
  116. },
  117. "paddingRight": {
  118. "label": "右边距",
  119. "type": "number",
  120. "value": 0
  121. },
  122. "paddingBottom": {
  123. "label": "下边距",
  124. "type": "number",
  125. "value": 0
  126. },
  127. "paddingLeft": {
  128. "label": "左边距",
  129. "type": "number",
  130. "value": 0
  131. },
  132. "backgroundColor": {
  133. "label": "背景色",
  134. "type": "color",
  135. "value": "#ffffff"
  136. }
  137. }
  138. }
  139. }
  140. }