ComponentDict.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <?php
  2. // +----------------------------------------------------------------------
  3. // | Niucloud-admin 企业快速开发的多应用管理平台
  4. // +----------------------------------------------------------------------
  5. // | 官方网址:https://www.niucloud.com
  6. // +----------------------------------------------------------------------
  7. // | niucloud团队 版权所有 开源版本可自由商用
  8. // +----------------------------------------------------------------------
  9. // | Author: Niucloud Team
  10. // +----------------------------------------------------------------------
  11. namespace app\dict\poster;
  12. use core\dict\DictLoader;
  13. /**
  14. * 基础组件+业务组件
  15. * Class ComponentDict
  16. * @package app\dict\poster
  17. */
  18. class ComponentDict
  19. {
  20. public static function getComponent()
  21. {
  22. $system_components = [
  23. 'basic' => [
  24. 'title' => get_lang('dict_diy_poster.component_type_basic'),
  25. 'support' => [], // 支持的插件
  26. 'list' => [
  27. 'Text' => [
  28. 'title' => "文本", // 组件名称
  29. 'type' => 'text', // 组件类型,文本:text,image:图片,qrcode:二维码
  30. 'icon' => "iconfont iconbiaoti", // 组件图标
  31. 'path' => "text", // 组件预览,前缀 edit-,编辑组件属性,前缀 preview-
  32. 'uses' => 0,
  33. 'sort' => 10000,
  34. 'relate' => '', // 关联字段,空为不处理// 组件属性
  35. 'value' => '文本内容',
  36. 'template' => [
  37. "width" => 165, // 宽度
  38. 'height' => 53 // 高度
  39. ]
  40. ],
  41. 'Image' => [
  42. 'title' => "图片",
  43. 'type' => 'image',
  44. 'icon' => "iconfont icontupian1",
  45. 'path' => "image",
  46. 'uses' => 0,
  47. 'sort' => 10001,
  48. 'relate' => '', // 关联字段,空为不处理
  49. 'value' => '',
  50. ],
  51. 'Qrcode' => [
  52. 'title' => "二维码",
  53. 'type' => 'qrcode',
  54. 'icon' => "iconfont iconerweima",
  55. 'path' => "qrcode",
  56. 'uses' => 1,
  57. 'sort' => 10002,
  58. 'relate' => 'url', // 关联字段,空为不处理
  59. 'value' => '',
  60. ],
  61. 'HeadImg' => [
  62. 'title' => "头像",
  63. 'type' => 'image',
  64. 'icon' => "iconfont icongeren",
  65. 'path' => "headimg",
  66. 'uses' => 1,
  67. 'sort' => 10003,
  68. 'relate' => 'headimg', // 关联字段,空为不处理
  69. 'value' => '',
  70. 'template' => [
  71. "width" => 100, // 宽度
  72. 'height' => 100, // 高度
  73. 'minWidth' => 60, // 最小宽度
  74. 'minHeight' => 60, // 最小高度
  75. 'shape' => 'circle'
  76. ],
  77. ],
  78. 'NickName' => [
  79. 'title' => "昵称",
  80. 'type' => 'text',
  81. 'icon' => "iconfont iconnicheng1",
  82. 'path' => "nickname",
  83. 'uses' => 1,
  84. 'sort' => 10004,
  85. 'relate' => 'nickname', // 关联字段,空为不处理
  86. 'value' => '',
  87. 'template' => [
  88. "width" => 164, // 宽度
  89. 'height' => 55, // 高度
  90. 'minWidth' => 120, // 最小宽度
  91. 'minHeight' => 50, // 最小高度
  92. ],
  93. ],
  94. 'Draw' => [
  95. 'title' => "绘画",
  96. 'type' => 'draw',
  97. 'icon' => "iconfont iconhuihua1",
  98. 'path' => "draw",
  99. 'uses' => 0,
  100. 'sort' => 10005,
  101. 'relate' => '', // 关联字段,空为不处理
  102. 'value' => '',
  103. 'template' => [
  104. "width" => 200, // 宽度
  105. 'height' => 200, // 高度
  106. 'minWidth' => 60, // 最小宽度
  107. 'minHeight' => 60, // 最小高度
  108. 'drawType' => 'Polygon',
  109. 'bgColor' => '#eeeeee',
  110. 'points' => [], // [x,y]:左上,右上,右下,左下
  111. ],
  112. ],
  113. 'FriendsPayMessage' => [
  114. 'title' => "帮付留言",
  115. 'type' => 'text',
  116. 'icon' => "nc-iconfont nc-icon-daifuliuyanV6xx",
  117. 'path' => "friendspay-message",
  118. 'uses' => 1,
  119. 'sort' => 10006,
  120. 'relate' => 'friendspay_message', // 关联字段,空为不处理
  121. 'value' => get_lang('dict_pay_config.pay_leave_message'),
  122. 'template' => [
  123. "width" => 611,
  124. "height" => 85,
  125. "minWidth" => 120,
  126. "minHeight" => 44,
  127. ]
  128. ],
  129. 'FriendsPayMoney' => [
  130. 'title' => "帮付金额",
  131. 'type' => 'text',
  132. 'icon' => "nc-iconfont nc-icon-daifujineV6xx",
  133. 'path' => "friendspay-money",
  134. 'uses' => 1,
  135. 'sort' => 10007,
  136. 'relate' => 'friendspay_money', // 关联字段,空为不处理
  137. 'value' => '帮付金额',
  138. 'template' => [
  139. "width" => 436,
  140. "height" => 50,
  141. "minWidth" => 120,
  142. "minHeight" => 44,
  143. ]
  144. ],
  145. ],
  146. ],
  147. ];
  148. return ( new DictLoader("Poster") )->loadComponents($system_components);
  149. }
  150. }