neo-cmp-cli 1.8.2 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (200) hide show
  1. package/bin/neo.js +1 -1
  2. package/package.json +6 -5
  3. package/src/{module/index.js → index.js} +14 -14
  4. package/src/{module/main.js → main.js} +18 -18
  5. package/src/module/neoInitByCopy.js +6 -6
  6. package/src/neo/webpack.mf.js +1 -1
  7. package/src/oss/publish2oss.js +1 -1
  8. package/src/utils/cmpUtils/createCmpByZip.js +7 -5
  9. package/src/utils/cmpUtils/pullCmp.js +1 -1
  10. package/src/utils/cmpUtils/pushCmp.js +9 -7
  11. package/src/utils/projectUtils/updatePublishLog.js +1 -1
  12. package/test/demo.js +1 -1
  13. package/test/demo3.js +1 -1
  14. package/test/neo.config.js +77 -0
  15. package/src/template/antd-custom-cmp-template/.prettierrc.js +0 -12
  16. package/src/template/antd-custom-cmp-template/README.md +0 -153
  17. package/src/template/antd-custom-cmp-template/commitlint.config.js +0 -59
  18. package/src/template/antd-custom-cmp-template/neo.config.js +0 -144
  19. package/src/template/antd-custom-cmp-template/package.json +0 -60
  20. package/src/template/antd-custom-cmp-template/public/css/base.css +0 -283
  21. package/src/template/antd-custom-cmp-template/public/scripts/app/bluebird.js +0 -6679
  22. package/src/template/antd-custom-cmp-template/public/template.html +0 -13
  23. package/src/template/antd-custom-cmp-template/src/assets/css/common.scss +0 -127
  24. package/src/template/antd-custom-cmp-template/src/assets/css/mixin.scss +0 -47
  25. package/src/template/antd-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  26. package/src/template/antd-custom-cmp-template/src/assets/img/custom-widget.svg +0 -1
  27. package/src/template/antd-custom-cmp-template/src/assets/img/favicon.png +0 -0
  28. package/src/template/antd-custom-cmp-template/src/components/dataDashboard/README.md +0 -39
  29. package/src/template/antd-custom-cmp-template/src/components/dataDashboard/index.tsx +0 -462
  30. package/src/template/antd-custom-cmp-template/src/components/dataDashboard/model.ts +0 -75
  31. package/src/template/antd-custom-cmp-template/src/components/dataDashboard/style.scss +0 -1667
  32. package/src/template/antd-custom-cmp-template/src/components/infoCard/index.tsx +0 -87
  33. package/src/template/antd-custom-cmp-template/src/components/infoCard/model.ts +0 -80
  34. package/src/template/antd-custom-cmp-template/src/components/infoCard/style.scss +0 -105
  35. package/src/template/antd-custom-cmp-template/tsconfig.json +0 -68
  36. package/src/template/develop/neo-custom-cmp-template/.prettierrc.js +0 -12
  37. package/src/template/develop/neo-custom-cmp-template/README.md +0 -48
  38. package/src/template/develop/neo-custom-cmp-template/commitlint.config.js +0 -59
  39. package/src/template/develop/neo-custom-cmp-template/docs/README.md +0 -13
  40. package/src/template/develop/neo-custom-cmp-template/neo.config.js +0 -121
  41. package/src/template/develop/neo-custom-cmp-template/package.json +0 -63
  42. package/src/template/develop/neo-custom-cmp-template/public/css/base.css +0 -283
  43. package/src/template/develop/neo-custom-cmp-template/public/scripts/app/bluebird.js +0 -6679
  44. package/src/template/develop/neo-custom-cmp-template/public/template.html +0 -13
  45. package/src/template/develop/neo-custom-cmp-template/src/assets/css/common.scss +0 -127
  46. package/src/template/develop/neo-custom-cmp-template/src/assets/css/mixin.scss +0 -47
  47. package/src/template/develop/neo-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  48. package/src/template/develop/neo-custom-cmp-template/src/assets/img/custom-widget.svg +0 -1
  49. package/src/template/develop/neo-custom-cmp-template/src/assets/img/favicon.png +0 -0
  50. package/src/template/develop/neo-custom-cmp-template/src/assets/img/table.svg +0 -1
  51. package/src/template/develop/neo-custom-cmp-template/src/components/contactCardList/README.md +0 -65
  52. package/src/template/develop/neo-custom-cmp-template/src/components/contactCardList/index.tsx +0 -180
  53. package/src/template/develop/neo-custom-cmp-template/src/components/contactCardList/model.ts +0 -50
  54. package/src/template/develop/neo-custom-cmp-template/src/components/contactCardList/style.scss +0 -260
  55. package/src/template/develop/neo-custom-cmp-template/src/components/contactForm/README.md +0 -94
  56. package/src/template/develop/neo-custom-cmp-template/src/components/contactForm/index.tsx +0 -251
  57. package/src/template/develop/neo-custom-cmp-template/src/components/contactForm/model.ts +0 -56
  58. package/src/template/develop/neo-custom-cmp-template/src/components/contactForm/style.scss +0 -120
  59. package/src/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/README.md +0 -115
  60. package/src/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/index.tsx +0 -304
  61. package/src/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/model.ts +0 -87
  62. package/src/template/develop/neo-custom-cmp-template/src/components/neoEntityGrid/style.scss +0 -127
  63. package/src/template/develop/neo-custom-cmp-template/src/utils/axiosFetcher.ts +0 -29
  64. package/src/template/develop/neo-custom-cmp-template/src/utils/queryObjectData.ts +0 -39
  65. package/src/template/develop/neo-custom-cmp-template/src/utils/xobjects.ts +0 -203
  66. package/src/template/develop/neo-custom-cmp-template/tsconfig.json +0 -68
  67. package/src/template/echarts-custom-cmp-template/.prettierrc.js +0 -12
  68. package/src/template/echarts-custom-cmp-template/README.md +0 -198
  69. package/src/template/echarts-custom-cmp-template/commitlint.config.js +0 -59
  70. package/src/template/echarts-custom-cmp-template/neo.config.js +0 -140
  71. package/src/template/echarts-custom-cmp-template/package.json +0 -61
  72. package/src/template/echarts-custom-cmp-template/public/css/base.css +0 -283
  73. package/src/template/echarts-custom-cmp-template/public/scripts/app/bluebird.js +0 -6679
  74. package/src/template/echarts-custom-cmp-template/public/template.html +0 -13
  75. package/src/template/echarts-custom-cmp-template/src/assets/css/common.scss +0 -127
  76. package/src/template/echarts-custom-cmp-template/src/assets/css/mixin.scss +0 -47
  77. package/src/template/echarts-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  78. package/src/template/echarts-custom-cmp-template/src/assets/img/chart.svg +0 -1
  79. package/src/template/echarts-custom-cmp-template/src/assets/img/custom-widget.svg +0 -1
  80. package/src/template/echarts-custom-cmp-template/src/assets/img/favicon.png +0 -0
  81. package/src/template/echarts-custom-cmp-template/src/components/chartWidget/README.md +0 -186
  82. package/src/template/echarts-custom-cmp-template/src/components/chartWidget/index.tsx +0 -724
  83. package/src/template/echarts-custom-cmp-template/src/components/chartWidget/model.ts +0 -151
  84. package/src/template/echarts-custom-cmp-template/src/components/chartWidget/style.scss +0 -209
  85. package/src/template/echarts-custom-cmp-template/src/components/mapWidget/README.md +0 -125
  86. package/src/template/echarts-custom-cmp-template/src/components/mapWidget/USAGE.md +0 -190
  87. package/src/template/echarts-custom-cmp-template/src/components/mapWidget/index.tsx +0 -385
  88. package/src/template/echarts-custom-cmp-template/src/components/mapWidget/model.ts +0 -107
  89. package/src/template/echarts-custom-cmp-template/src/components/mapWidget/style.scss +0 -192
  90. package/src/template/echarts-custom-cmp-template/src/utils/url.ts +0 -82
  91. package/src/template/echarts-custom-cmp-template/tsconfig.json +0 -68
  92. package/src/template/empty-cmp/index.tsx +0 -58
  93. package/src/template/empty-cmp/model.ts +0 -79
  94. package/src/template/empty-cmp/style.scss +0 -72
  95. package/src/template/empty-custom-cmp-template/.prettierrc.js +0 -12
  96. package/src/template/empty-custom-cmp-template/README.md +0 -154
  97. package/src/template/empty-custom-cmp-template/commitlint.config.js +0 -59
  98. package/src/template/empty-custom-cmp-template/neo.config.js +0 -138
  99. package/src/template/empty-custom-cmp-template/package.json +0 -58
  100. package/src/template/empty-custom-cmp-template/public/css/base.css +0 -283
  101. package/src/template/empty-custom-cmp-template/public/scripts/app/bluebird.js +0 -6679
  102. package/src/template/empty-custom-cmp-template/public/template.html +0 -13
  103. package/src/template/empty-custom-cmp-template/src/assets/css/common.scss +0 -127
  104. package/src/template/empty-custom-cmp-template/src/assets/css/mixin.scss +0 -47
  105. package/src/template/empty-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  106. package/src/template/empty-custom-cmp-template/src/assets/img/custom-widget.svg +0 -1
  107. package/src/template/empty-custom-cmp-template/src/assets/img/favicon.png +0 -0
  108. package/src/template/empty-custom-cmp-template/src/assets/img/map.svg +0 -1
  109. package/src/template/empty-custom-cmp-template/src/components/README.md +0 -3
  110. package/src/template/empty-custom-cmp-template/tsconfig.json +0 -68
  111. package/src/template/neo-custom-cmp-template/.prettierrc.js +0 -12
  112. package/src/template/neo-custom-cmp-template/README.md +0 -155
  113. package/src/template/neo-custom-cmp-template/commitlint.config.js +0 -59
  114. package/src/template/neo-custom-cmp-template/docs/README.md +0 -244
  115. package/src/template/neo-custom-cmp-template/neo.config.js +0 -140
  116. package/src/template/neo-custom-cmp-template/package.json +0 -66
  117. package/src/template/neo-custom-cmp-template/public/css/base.css +0 -283
  118. package/src/template/neo-custom-cmp-template/public/scripts/app/bluebird.js +0 -6679
  119. package/src/template/neo-custom-cmp-template/public/template.html +0 -13
  120. package/src/template/neo-custom-cmp-template/src/assets/css/common.scss +0 -127
  121. package/src/template/neo-custom-cmp-template/src/assets/css/mixin.scss +0 -47
  122. package/src/template/neo-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  123. package/src/template/neo-custom-cmp-template/src/assets/img/card-list.svg +0 -1
  124. package/src/template/neo-custom-cmp-template/src/assets/img/contact-form.svg +0 -1
  125. package/src/template/neo-custom-cmp-template/src/assets/img/custom-form.svg +0 -1
  126. package/src/template/neo-custom-cmp-template/src/assets/img/custom-widget.svg +0 -1
  127. package/src/template/neo-custom-cmp-template/src/assets/img/data-list.svg +0 -1
  128. package/src/template/neo-custom-cmp-template/src/assets/img/detail.svg +0 -1
  129. package/src/template/neo-custom-cmp-template/src/assets/img/table.svg +0 -1
  130. package/src/template/neo-custom-cmp-template/src/components/entityCardList/README.md +0 -61
  131. package/src/template/neo-custom-cmp-template/src/components/entityCardList/index.tsx +0 -202
  132. package/src/template/neo-custom-cmp-template/src/components/entityCardList/model.ts +0 -74
  133. package/src/template/neo-custom-cmp-template/src/components/entityCardList/style.scss +0 -260
  134. package/src/template/neo-custom-cmp-template/src/components/entityDetail/README.md +0 -176
  135. package/src/template/neo-custom-cmp-template/src/components/entityDetail/index.tsx +0 -334
  136. package/src/template/neo-custom-cmp-template/src/components/entityDetail/model.ts +0 -123
  137. package/src/template/neo-custom-cmp-template/src/components/entityDetail/style.scss +0 -292
  138. package/src/template/neo-custom-cmp-template/src/components/entityForm/README.md +0 -176
  139. package/src/template/neo-custom-cmp-template/src/components/entityForm/index.tsx +0 -615
  140. package/src/template/neo-custom-cmp-template/src/components/entityForm/model.ts +0 -107
  141. package/src/template/neo-custom-cmp-template/src/components/entityForm/style.scss +0 -370
  142. package/src/template/neo-custom-cmp-template/src/components/entityTable/README.md +0 -92
  143. package/src/template/neo-custom-cmp-template/src/components/entityTable/index.tsx +0 -784
  144. package/src/template/neo-custom-cmp-template/src/components/entityTable/model.ts +0 -134
  145. package/src/template/neo-custom-cmp-template/src/components/entityTable/style.scss +0 -304
  146. package/src/template/neo-custom-cmp-template/src/utils/axiosFetcher.ts +0 -37
  147. package/src/template/neo-custom-cmp-template/src/utils/queryObjectData.ts +0 -76
  148. package/src/template/neo-custom-cmp-template/src/utils/xobjects.ts +0 -162
  149. package/src/template/neo-custom-cmp-template/tsconfig.json +0 -49
  150. package/src/template/react-custom-cmp-template/.prettierrc.js +0 -12
  151. package/src/template/react-custom-cmp-template/README.md +0 -154
  152. package/src/template/react-custom-cmp-template/commitlint.config.js +0 -59
  153. package/src/template/react-custom-cmp-template/neo.config.js +0 -137
  154. package/src/template/react-custom-cmp-template/package.json +0 -57
  155. package/src/template/react-custom-cmp-template/public/css/base.css +0 -283
  156. package/src/template/react-custom-cmp-template/public/scripts/app/bluebird.js +0 -6679
  157. package/src/template/react-custom-cmp-template/public/template.html +0 -13
  158. package/src/template/react-custom-cmp-template/src/assets/css/common.scss +0 -127
  159. package/src/template/react-custom-cmp-template/src/assets/css/mixin.scss +0 -47
  160. package/src/template/react-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  161. package/src/template/react-custom-cmp-template/src/assets/img/custom-widget.svg +0 -1
  162. package/src/template/react-custom-cmp-template/src/assets/img/favicon.png +0 -0
  163. package/src/template/react-custom-cmp-template/src/components/infoCard/index.jsx +0 -45
  164. package/src/template/react-custom-cmp-template/src/components/infoCard/model.js +0 -81
  165. package/src/template/react-custom-cmp-template/src/components/infoCard/style.scss +0 -67
  166. package/src/template/react-ts-custom-cmp-template/.prettierrc.js +0 -12
  167. package/src/template/react-ts-custom-cmp-template/README.md +0 -154
  168. package/src/template/react-ts-custom-cmp-template/commitlint.config.js +0 -59
  169. package/src/template/react-ts-custom-cmp-template/neo.config.js +0 -138
  170. package/src/template/react-ts-custom-cmp-template/package.json +0 -59
  171. package/src/template/react-ts-custom-cmp-template/public/css/base.css +0 -283
  172. package/src/template/react-ts-custom-cmp-template/public/scripts/app/bluebird.js +0 -6679
  173. package/src/template/react-ts-custom-cmp-template/public/template.html +0 -13
  174. package/src/template/react-ts-custom-cmp-template/src/assets/css/common.scss +0 -127
  175. package/src/template/react-ts-custom-cmp-template/src/assets/css/mixin.scss +0 -47
  176. package/src/template/react-ts-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  177. package/src/template/react-ts-custom-cmp-template/src/assets/img/custom-widget.svg +0 -1
  178. package/src/template/react-ts-custom-cmp-template/src/assets/img/favicon.png +0 -0
  179. package/src/template/react-ts-custom-cmp-template/src/assets/img/map.svg +0 -1
  180. package/src/template/react-ts-custom-cmp-template/src/components/listWidget/README.md +0 -2
  181. package/src/template/react-ts-custom-cmp-template/src/components/listWidget/index.tsx +0 -208
  182. package/src/template/react-ts-custom-cmp-template/src/components/listWidget/model.ts +0 -92
  183. package/src/template/react-ts-custom-cmp-template/src/components/listWidget/style.scss +0 -350
  184. package/src/template/react-ts-custom-cmp-template/tsconfig.json +0 -68
  185. package/src/template/vue2-custom-cmp-template/.prettierrc.js +0 -12
  186. package/src/template/vue2-custom-cmp-template/README.md +0 -154
  187. package/src/template/vue2-custom-cmp-template/commitlint.config.js +0 -59
  188. package/src/template/vue2-custom-cmp-template/neo.config.js +0 -146
  189. package/src/template/vue2-custom-cmp-template/package.json +0 -59
  190. package/src/template/vue2-custom-cmp-template/public/css/base.css +0 -283
  191. package/src/template/vue2-custom-cmp-template/public/scripts/app/bluebird.js +0 -6679
  192. package/src/template/vue2-custom-cmp-template/public/template.html +0 -13
  193. package/src/template/vue2-custom-cmp-template/src/assets/css/common.scss +0 -126
  194. package/src/template/vue2-custom-cmp-template/src/assets/css/mixin.scss +0 -47
  195. package/src/template/vue2-custom-cmp-template/src/assets/img/NeoCRM.jpg +0 -0
  196. package/src/template/vue2-custom-cmp-template/src/assets/img/custom-widget.svg +0 -1
  197. package/src/template/vue2-custom-cmp-template/src/assets/img/favicon.png +0 -0
  198. package/src/template/vue2-custom-cmp-template/src/components/vueInfoCard/index.vue +0 -131
  199. package/src/template/vue2-custom-cmp-template/src/components/vueInfoCard/model.js +0 -81
  200. package/src/utils/getConfigObj.js +0 -18
@@ -1,13 +0,0 @@
1
- <html lang="en">
2
- <head>
3
- <meta charset="UTF-8">
4
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
5
- <meta name="format-detection" content="telephone=no"/>
6
- <meta name="viewport" content="initial-scale=1.0,user-scalable=no,width=device-width,viewport-fit=cover">
7
- <meta http-equiv="X-UA-Compatible" content="ie=edge">
8
- <title>自定义组件预览页</title>
9
- </head>
10
- <body>
11
- <div id="root"></div>
12
- </body>
13
- </html>
@@ -1,127 +0,0 @@
1
- /* 公共的自定义函数 */
2
-
3
- @function px2vw($px, $screen-width: 750) {
4
- @return ($px / $screen-width) * 100vw;
5
- }
6
-
7
- @function px2rem($px, $remRate: 100) {
8
- @return ($px / $remRate) + rem;
9
- }
10
-
11
- @function px2vmin($px, $screen-width: 750) {
12
- @return ($px / $screen-width) * 100vmin;
13
- }
14
-
15
- @mixin fillBox {
16
- width: 100%;
17
- height: 100%;
18
- }
19
-
20
- /* 头部细线 */
21
- @mixin borderTop {
22
- content: '';
23
- position: absolute;
24
- left: 0;
25
- right: 0;
26
- top: 0;
27
- width: 100%;
28
- height: 1px;
29
- background: #ddd;
30
- transform: scaleY(0.5);
31
- }
32
-
33
- /* 底部细线 */
34
- @mixin borderBtm {
35
- content: '';
36
- position: absolute;
37
- left: 0;
38
- right: 0;
39
- bottom: 0;
40
- width: 100%;
41
- height: 1px;
42
- background: #ddd;
43
- transform: scaleY(0.5);
44
- }
45
-
46
- /* 统一的内边距 */
47
- @mixin unifiedPadding($value: 40) {
48
- padding: 0 px2rem($value) 0 px2rem($value);
49
- }
50
-
51
- /* 统一的左内边距 */
52
- @mixin unifiedLeftPadding($value: 40) {
53
- padding-left: px2rem($value);
54
- }
55
-
56
- /* 统一的右内边距 */
57
- @mixin unifiedRightPadding($value: 40) {
58
- padding-right: px2rem($value);
59
- }
60
-
61
- /* 统一的底部边框样式 */
62
- @mixin unifiedBottomBorder {
63
- border-bottom: 1px solid #ddd;
64
- }
65
-
66
- /* 统一的上边框样式 */
67
- @mixin unifiedTopBorder {
68
- border-top: 1px solid #ddd;
69
- }
70
-
71
- /* 统一的Item高度 */
72
- @mixin unifiedItemHeight {
73
- line-height: px2rem(120);
74
- height: px2rem(120);
75
- }
76
-
77
- /* 设置行高样式 */
78
- @mixin setItemHeight($value: 120) {
79
- line-height: px2rem($value);
80
- height: px2rem($value);
81
- }
82
-
83
- /* 统一的Item样式 */
84
- @mixin unifiedItemStyle {
85
- font-family: PingFangSC-Regular;
86
- font-size: px2rem(28);
87
- color: #828282;
88
- letter-spacing: 0;
89
- }
90
-
91
- /* 统一的弹性盒子样式 */
92
- @mixin unifiedFlexBoxStyle {
93
- display: flex;
94
- flex-wrap: nowrap;
95
- justify-content: center;
96
- align-items: center;
97
- }
98
-
99
- /* 统一的Title样式 */
100
- @mixin unifiedTitleStyle {
101
- font-family: PingFangSC-Regular;
102
- font-size: px2rem(40);
103
- color: #1e1e1e;
104
- }
105
-
106
- /* 统一的内容样式 */
107
- @mixin unifiedContentStyle {
108
- font-family: PingFangSC-Regular;
109
- font-size: px2rem(28);
110
- color: #1e1e1e;
111
- letter-spacing: 0;
112
- text-align: right;
113
- line-height: px2rem(28);
114
- }
115
-
116
- /* 底部导航盒子样式 */
117
- @mixin fixedBottomBox {
118
- position: fixed;
119
- left: 0;
120
- bottom: 0;
121
- width: 100%;
122
- }
123
-
124
- // 常用的变量
125
- $background-color: #fafafa;
126
- $border-color: #f7f7f7;
127
- $page-padding-top: px2rem(20);
@@ -1,47 +0,0 @@
1
- // 通用mixin
2
- $borderColor: #ddd;
3
-
4
- // type 为top 或者 bottom
5
- @mixin borderTopOrBtm($type) {
6
- &::after {
7
- content: '';
8
- position: absolute;
9
- left: 0;
10
- right: 0;
11
- #{$type}: 0;
12
- width: 100%;
13
- height: 1px;
14
- background: $borderColor;
15
- transform: scaleY(0.5);
16
- }
17
- }
18
-
19
- // type为 right 或者 left
20
- @mixin borderRtOrLt($type) {
21
- &::after {
22
- content: '';
23
- position: absolute;
24
- top: 0;
25
- bottom: 0;
26
- #{$type}: 0;
27
- height: 100%;
28
- width: 1px;
29
- background: $borderColor;
30
- transform: scaleX(0.5);
31
- }
32
- }
33
-
34
- //超出1行显示...
35
- @mixin ellipsis1 {
36
- overflow: hidden;
37
- text-overflow: ellipsis;
38
- white-space: nowrap;
39
- }
40
-
41
- // 超出多行显示...
42
- @mixin ellipsis($num) {
43
- overflow: hidden;
44
- display: -webkit-box;
45
- -webkit-line-clamp: $num;
46
- -webkit-box-orient: vertical;
47
- }
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1758858496804" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4824" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M362.666667 448h-213.333334c-46.933333 0-85.333333-38.4-85.333333-85.333333v-213.333334c0-46.933333 38.4-85.333333 85.333333-85.333333h213.333334c46.933333 0 85.333333 38.4 85.333333 85.333333v213.333334c0 46.933333-38.4 85.333333-85.333333 85.333333z m-213.333334-298.666667v213.333334h213.333334v-213.333334h-213.333334zM917.333333 405.333333h-298.666666c-25.6 0-42.666667-17.066667-42.666667-42.666666s17.066667-42.666667 42.666667-42.666667h298.666666c25.6 0 42.666667 17.066667 42.666667 42.666667s-17.066667 42.666667-42.666667 42.666666zM917.333333 192h-298.666666c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666666h298.666666c25.6 0 42.666667 17.066667 42.666667 42.666666s-17.066667 42.666667-42.666667 42.666667zM362.666667 960h-213.333334c-46.933333 0-85.333333-38.4-85.333333-85.333333v-213.333334c0-46.933333 38.4-85.333333 85.333333-85.333333h213.333334c46.933333 0 85.333333 38.4 85.333333 85.333333v213.333334c0 46.933333-38.4 85.333333-85.333333 85.333333z m-213.333334-298.666667v213.333334h213.333334v-213.333334h-213.333334zM917.333333 917.333333h-298.666666c-25.6 0-42.666667-17.066667-42.666667-42.666666s17.066667-42.666667 42.666667-42.666667h298.666666c25.6 0 42.666667 17.066667 42.666667 42.666667s-17.066667 42.666667-42.666667 42.666666zM917.333333 704h-298.666666c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666666h298.666666c25.6 0 42.666667 17.066667 42.666667 42.666666s-17.066667 42.666667-42.666667 42.666667z" p-id="4825" fill="#0764f5"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1758858859788" class="icon" viewBox="0 0 1600 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6860" xmlns:xlink="http://www.w3.org/1999/xlink" width="312.5" height="200"><path d="M983.3038 139.924829l-69.963665 0C913.340135 63.602422 849.737713 0 773.415306 0s-139.924829 63.602422-139.924829 139.924829l-63.602422 0 0 69.963665 413.415745 0L983.3038 139.924829 983.3038 139.924829 983.3038 139.924829zM703.452891 139.924829c0-38.161203 31.801211-69.962415 69.962415-69.962415 38.161203 0 69.962415 31.801211 69.962415 69.962415L703.452891 139.924829 703.452891 139.924829z" p-id="6861" fill="#0764f5"></path><path d="M1111.109894 253.80844l0 449.446951C1149.998596 706.249138 1167.498575 714.999127 1181.072308 735.056603l0-513.049374c0-44.522446-31.801211-82.683649-82.683649-82.683649l-57.24118 0 0 69.962415 31.801211 0C1092.028667 209.285995 1111.109894 228.367221 1111.109894 253.80844L1111.109894 253.80844z" p-id="6862" fill="#0764f5"></path><path d="M922.572624 896.793905l-454.449445 0c-25.439969 0-38.161203-19.081227-38.161203-38.161203L429.961975 248.049697c0-25.441219 19.081227-38.161203 38.161203-38.161203l31.801211 0L499.92439 139.924829l-57.24118 0c-44.522446 0-82.683649 38.162453-82.683649 82.683649l0 674.185427c0 44.521196 31.801211 82.683649 82.683649 82.683649l518.050618 0C931.248863 956.248833 922.572624 928.595116 922.572624 896.793905L922.572624 896.793905z" p-id="6863" fill="#0764f5"></path><path d="M1087.753672 724.081616c-80.334902 0-149.959817 64.267422-149.959817 149.958567 0 80.336152 64.268672 149.959817 149.959817 149.959817s149.958567-64.268672 149.958567-149.959817C1237.713489 788.349038 1173.444818 724.081616 1087.753672 724.081616L1087.753672 724.081616zM1109.176146 895.462657l0 85.691145-42.846198 0 0-85.691145-85.691145 0 0-42.844948 85.691145 0 0-85.691145 42.846198 0 0 85.691145 85.691145 0 0 42.844948L1109.176146 895.462657 1109.176146 895.462657z" p-id="6864" fill="#0764f5"></path><path d="M804.611518 653.237953c-10.739987-4.229995-19.073727-9.053739-25.027469-14.407482-5.979993-5.391243-10.394987-11.056237-13.276234-16.976229-2.882496-5.986243-4.511244-11.932485-4.887494-17.886228-0.4075-5.953743 0-11.811236 1.156249-17.573729 1.534998-9.617488 4.603744-16.41373 9.211239-20.451225 4.601244-4.041245 10.584987-8.927489 17.851228-14.689982 3.069996-2.694997 5.858743-6.453742 8.36624-11.213736 2.502497-4.824994 4.694994-9.709988 6.604992-14.722482 1.943748-5.763743 3.886245-11.902485 5.796243-18.417478 3.821245-1.157499 7.452491-3.256246 10.932487-6.358742 3.069996-2.661247 5.854993-6.421242 8.36499-11.243736 2.501247-4.762494 4.102495-11.214986 4.883744-19.296226 0.784999-6.139993 0.689999-11.307486-0.28-15.536231-0.974999-4.227495-2.224997-7.704991-3.761245-10.398737-1.533748-3.068746-3.633746-5.546243-6.326242-7.457491 0-15.754981-0.941249-31.323712-2.882496-46.669943-1.942498-13.467484-5.171244-27.563716-9.774988-42.348698-4.633744-14.784982-11.932485-28.346215-21.924973-40.62495-4.194995-5.387493-10.056238-10.743737-17.572479-16.13248-7.484991-5.387493-16.03748-10.212488-25.618719-14.408732-9.617488-4.258745-19.894976-7.578741-30.852462-10.084988-10.931237-2.504997-21.957473-3.761245-33.10871-3.761245-8.836239 0-17.982478 0.689999-27.377467 2.006248-9.394989 1.378748-18.823727 3.946245-28.218716 7.79874-9.431238 3.853745-18.639977 9.113739-27.662466 15.851231-9.018739 6.702492-17.193729 15.439981-24.49122 26.216218-8.08124 11.148736-14.096233 23.803721-18.168728 38.024954-4.008745 14.222483-6.797492 27.438717-8.33249 39.749951-1.938748 14.594982-2.692497 29.192464-2.317497 43.788697-3.443746 3.852495-5.951243 7.86124-7.484991 12.121235-1.534998 3.822495-2.601247 8.42499-3.162496 13.814983-0.564999 5.357493 0.2825 11.307486 2.598747 17.852478 1.909998 6.547492 4.226245 11.527486 6.923742 15.004982 2.693747 3.444996 5.163744 6.137493 7.451241 8.04874 2.696247 1.911248 5.387493 3.257496 8.08249 4.041245 1.942498 6.514992 3.851245 12.654985 5.762493 18.418728 1.946248 5.011244 4.042495 9.897488 6.327492 14.721232 2.317497 4.759994 5.012494 8.51999 8.08124 11.214986 6.516242 5.387493 12.464985 10.648737 17.852478 15.848731 5.387493 5.167494 8.45874 12.183735 9.208739 21.017474 0.40875 6.169992 0.597499 11.714986 0.597499 16.69498 0 5.013744-0.972499 9.806238-2.882496 14.437482-1.908748 4.604994-4.978744 9.208739-9.242489 13.812483-4.194995 4.603744-10.334987 9.428738-18.417478 14.412482-10.366237 6.513742-22.294973 11.527486-35.707456 14.971232-13.464984 3.473746-26.436218 7.426241-38.902453 11.806236-12.497485 4.418745-23.428721 10.402487-32.82246 17.856228-9.429988 7.514991-15.098732 18.354978-17.043729 32.57746-3.822495 24.95997-4.697494 45.322445-2.567497 61.076175 2.099997 15.723731 5.073744 25.149969 8.927489 28.222466 2.287497 1.942498 7.86124 3.852495 16.69498 5.763743 8.832489 1.938748 19.608726 3.852495 32.261211 5.762493 12.714984 1.908748 26.814967 3.728745 42.349948 5.484993 15.567481 1.718748 31.228712 3.253746 46.982443 4.602494 15.723731 1.317498 31.012462 2.412497 45.796194 3.163746 14.784982 0.782499 27.751216 1.157499 38.903703 1.157499 11.152486 0 24.30122-0.37625 39.462452-1.157499 15.159981-0.752499 31.012462-1.847498 47.552442-3.163746 16.50623-1.347498 32.92121-2.977496 49.23494-4.919994 9.192489-1.074999 17.882478-2.244997 26.101218-3.503746 0 0-5.852493-162.766051-8.812489-163.56605C824.688993 660.534194 814.227756 657.057948 804.611518 653.237953L804.611518 653.237953z" p-id="6865" fill="#0764f5"></path><path d="M891.166412 413.571995l121.812351 0c13.216234 0 23.927471-10.712487 23.927471-23.926221 0-13.213734-10.711237-23.926221-23.927471-23.926221l-121.812351 0c-13.213734 0-23.926221 10.712487-23.926221 23.926221C867.238941 402.858258 877.952678 413.571995 891.166412 413.571995L891.166412 413.571995z" p-id="6866" fill="#0764f5"></path><path d="M1012.980013 490.449401l-121.812351 0c-13.213734 0-23.926221 10.711237-23.926221 23.924971 0 13.214984 10.712487 23.927471 23.926221 23.927471l121.812351 0c13.214984 0 23.926221-10.712487 23.926221-23.927471C1036.906234 501.160638 1026.194997 490.449401 1012.980013 490.449401L1012.980013 490.449401z" p-id="6867" fill="#0764f5"></path><path d="M1012.980013 608.928007l-121.812351 0c-13.213734 0-23.926221 10.711237-23.926221 23.924971 0 13.214984 10.712487 23.926221 23.926221 23.926221l121.812351 0c13.214984 0 23.926221-10.711237 23.926221-23.926221C1036.906234 619.639244 1026.194997 608.928007 1012.980013 608.928007L1012.980013 608.928007z" p-id="6868" fill="#0764f5"></path><path d="M836.027729 663.60794c0 0 31.213712 2.016248 53.971184 27.641216 0 0 13.437484 11.874986 16.981229 43.749947l0 56.249931c0 0-4.706244 29.087464-62.139924 35.924956L833.748982 702.499142 836.027729 663.60794z" p-id="6869" fill="#0764f5"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1760606213824" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2396" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M258.133333 128A106.666667 106.666667 0 0 0 362.666667 213.333333h298.666666a106.666667 106.666667 0 0 0 104.533334-85.333333h87.424A128 128 0 0 1 981.333333 255.744v597.845333A127.872 127.872 0 0 1 853.290667 981.333333H170.666667A128 128 0 0 1 42.666667 853.589333V255.744A127.872 127.872 0 0 1 170.709333 128H258.133333zM298.666667 384a42.666667 42.666667 0 1 0 0 85.333333h256a42.666667 42.666667 0 0 0 0-85.333333H298.666667z m0 170.666667a42.666667 42.666667 0 0 0 0 85.333333h426.666666a42.666667 42.666667 0 0 0 0-85.333333H298.666667z m0 170.666666a42.666667 42.666667 0 0 0 0 85.333334h256a42.666667 42.666667 0 0 0 0-85.333334H298.666667zM362.666667 42.666667h298.666666a64 64 0 0 1 0 128h-298.666666a64 64 0 0 1 0-128z" p-id="2397" fill="#0764f5"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1756957113315" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5395" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M288 768v115.2c0 25.6 19.2 44.8 44.8 44.8h556.8c25.6 0 44.8-19.2 44.8-44.8v-198.4s0-6.4-6.4-6.4h-83.2c-38.4 0-70.4-32-70.4-70.4 0-38.4 32-70.4 70.4-70.4h83.2s6.4 0 6.4-6.4V332.8c0-25.6-19.2-44.8-44.8-44.8H768C768 198.4 697.6 128 608 128S448 198.4 448 288H332.8c-25.6 0-44.8 19.2-44.8 44.8V448C198.4 448 128 518.4 128 608S198.4 768 288 768z m0-249.6h70.4V358.4h160V288c0-51.2 38.4-89.6 89.6-89.6 51.2 0 89.6 38.4 89.6 89.6v70.4h160v108.8h-19.2c-76.8 0-140.8 64-140.8 140.8 0 76.8 64 140.8 140.8 140.8h19.2v108.8H358.4v-160H288c-51.2 0-89.6-38.4-89.6-89.6 0-51.2 38.4-89.6 89.6-89.6z" p-id="5396" fill="#0764f5"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1759212323849" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3505" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M202.8 408.1c-55 0-99.7 44.7-99.7 99.7s44.7 99.7 99.7 99.7c40.7 0 75.8-24.6 91.3-59.7h639v-80h-639c-15.5-35.1-50.6-59.7-91.3-59.7z m0 157c-31.6 0-57.3-25.7-57.3-57.3 0-31.6 25.7-57.3 57.3-57.3 31.6 0 57.3 25.7 57.3 57.3 0 31.6-25.7 57.3-57.3 57.3zM202.8 739.3c-55 0-99.7 44.7-99.7 99.7s44.7 99.7 99.7 99.7c40.7 0 75.8-24.6 91.3-59.7h639v-80h-639c-15.5-35.1-50.6-59.7-91.3-59.7z m0 157c-31.6 0-57.3-25.7-57.3-57.3 0-31.6 25.7-57.3 57.3-57.3 31.6 0 57.3 25.7 57.3 57.3 0 31.6-25.7 57.3-57.3 57.3zM295.1 149.5c-14.9-36.4-50.6-62.1-92.3-62.1-55 0-99.7 44.7-99.7 99.7s44.7 99.7 99.7 99.7c39.8 0 74.2-23.5 90.2-57.3h640v-80H295.1z m-92.3 95c-31.6 0-57.3-25.7-57.3-57.3 0-31.6 25.7-57.3 57.3-57.3 31.6 0 57.3 25.7 57.3 57.3 0 31.5-25.7 57.3-57.3 57.3zM519.6 641.8H933v80H519.6zM519.6 308.6H933v80H519.6z" fill="#0764f5" p-id="3506"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1759211982910" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2424" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M1024 1024H0V0h768v20.608l19.84-19.904 235.52 235.392-19.84 19.904H1024v768zM768 147.2V256h108.8zM896 384h-256V128H128v768h768V384z m-128 192H256V448h512v128z m0 192H256v-128h512v128z" fill="#0764f5" p-id="2425"></path></svg>
@@ -1 +0,0 @@
1
- <?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1758542964332" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2345" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M853.333333 1024 170.666667 1024c-93.866667 0-170.666667-76.8-170.666667-170.666667L0 213.333333c0-25.6 17.066667-42.666667 42.666667-42.666667l938.666667 0c25.6 0 42.666667 17.066667 42.666667 42.666667l0 640C1024 947.2 947.2 1024 853.333333 1024zM85.333333 256l0 597.333333c0 46.933333 38.4 85.333333 85.333333 85.333333l682.666667 0c46.933333 0 85.333333-38.4 85.333333-85.333333L938.666667 256 85.333333 256z" p-id="2346" fill="#0764f5"></path><path d="M512 256" p-id="2347" fill="#0764f5"></path><path d="M981.333333 213.333333 42.666667 213.333333 42.666667 170.666667c0-72.533333 55.466667-128 128-128l682.666667 0c72.533333 0 128 55.466667 128 128L981.333333 213.333333z" p-id="2348" fill="#0764f5"></path><path d="M981.333333 256 42.666667 256C17.066667 256 0 238.933333 0 213.333333L0 170.666667c0-93.866667 76.8-170.666667 170.666667-170.666667l682.666667 0c93.866667 0 170.666667 76.8 170.666667 170.666667l0 42.666667C1024 238.933333 1006.933333 256 981.333333 256zM85.333333 170.666667l853.333333 0c0-46.933333-38.4-85.333333-85.333333-85.333333L170.666667 85.333333C123.733333 85.333333 85.333333 123.733333 85.333333 170.666667z" p-id="2349" fill="#0764f5"></path><path d="M298.666667 1024c-25.6 0-42.666667-17.066667-42.666667-42.666667L256 213.333333c0-25.6 17.066667-42.666667 42.666667-42.666667s42.666667 17.066667 42.666667 42.666667l0 768C341.333333 1006.933333 324.266667 1024 298.666667 1024z" p-id="2350" fill="#0764f5"></path><path d="M42.666667 341.333333" p-id="2351" fill="#0764f5"></path><path d="M981.333333 341.333333" p-id="2352" fill="#0764f5"></path><path d="M981.333333 512 42.666667 512c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666667l938.666667 0c25.6 0 42.666667 17.066667 42.666667 42.666667S1006.933333 512 981.333333 512z" p-id="2353" fill="#0764f5"></path><path d="M981.333333 768 42.666667 768c-25.6 0-42.666667-17.066667-42.666667-42.666667s17.066667-42.666667 42.666667-42.666667l938.666667 0c25.6 0 42.666667 17.066667 42.666667 42.666667S1006.933333 768 981.333333 768z" p-id="2354" fill="#0764f5"></path></svg>
@@ -1,61 +0,0 @@
1
- # EntityCardList 数据卡片列表组件
2
- 数据卡片列表组件用于展示数据信息,以卡片形式展示每个数据的姓名和手机号。组件使用 Ant Design 的 Card 组件,具有良好的视觉效果和交互体验。
3
-
4
- ## 功能特性
5
-
6
- - 📱 响应式设计,支持多种屏幕尺寸
7
- - 🎨 美观的卡片布局,支持悬停效果
8
- - 🔄 自动加载数据,支持错误重试
9
- - 📊 使用 neo-open-api 获取 customContact__c 数据
10
- - 🎯 展示数据姓名和手机号信息
11
- - 💫 加载状态和空状态处理
12
-
13
- ## 组件属性
14
-
15
- | 属性名 | 类型 | 默认值 | 描述 |
16
- |--------|------|--------|------|
17
- | title | string | '数据卡片列表' | 组件标题 |
18
- | data | any | - | 组件数据,包含用户信息和系统信息 |
19
-
20
- ## 数据源
21
-
22
- 组件通过 `neo-open-api` 工具函数获取数据:
23
-
24
- - **数据表**: `customContact__c`
25
- - **字段**: `id`, `name`, `phone__c`
26
-
27
- ## 样式特性
28
-
29
- - 使用 Flexbox 布局,支持响应式设计
30
- - 卡片悬停效果,提升用户体验
31
- - 渐变色头像,美观大方
32
- - 支持移动端适配
33
-
34
- ## 使用示例
35
-
36
- ```tsx
37
- import EntityCardList from './components/entity-card-list';
38
-
39
- // 在页面中使用
40
- <EntityCardList
41
- title="我的数据"
42
- data={amisData}
43
- />
44
- ```
45
-
46
- ## 技术栈
47
-
48
- - React 16.9+
49
- - TypeScript
50
- - Ant Design 4.9+
51
- - SCSS
52
-
53
- ## 文件结构
54
-
55
- ```
56
- entity-card-list/
57
- ├── index.tsx # 主组件文件
58
- ├── model.ts # 组件配置和编辑器属性定义
59
- ├── style.scss # 组件样式文件
60
- └── README.md # 组件说明文档
61
- ```
@@ -1,202 +0,0 @@
1
- import * as React from 'react';
2
- import { Card, Row, Col, Spin, Empty, Avatar, Button } from 'antd';
3
- import { UserOutlined, PhoneOutlined, ReloadOutlined } from '@ant-design/icons';
4
- // @ts-ignore
5
- import { xObject } from 'neo-open-api'; // Neo Open API
6
- import './style.scss';
7
-
8
- interface EntityCardListProps {
9
- title: string;
10
- xObjectDataApi?: any;
11
- entityData?: any;
12
- data?: any;
13
- }
14
-
15
- interface ContactData {
16
- id: string;
17
- name: string;
18
- phone__c: string;
19
- [key: string]: any;
20
- }
21
-
22
- interface EntityCardListState {
23
- objectDataList: ContactData[];
24
- totalSize: number;
25
- loading: boolean;
26
- error: string | null;
27
- }
28
-
29
- export default class EntityCardList extends React.PureComponent<
30
- EntityCardListProps,
31
- EntityCardListState
32
- > {
33
- constructor(props: EntityCardListProps) {
34
- super(props);
35
-
36
- this.state = {
37
- objectDataList: [],
38
- totalSize: 0,
39
- loading: false,
40
- error: null,
41
- };
42
-
43
- this.loadObjectData = this.loadObjectData.bind(this);
44
- }
45
-
46
- componentDidMount() {
47
- this.loadObjectData();
48
- }
49
-
50
- componentDidUpdate(prevProps: EntityCardListProps) {
51
- const { xObjectDataApi } = this.props;
52
- if (
53
- xObjectDataApi?.xObjectApiKey !==
54
- prevProps.xObjectDataApi?.xObjectApiKey ||
55
- xObjectDataApi?.fields !== prevProps.xObjectDataApi?.fields
56
- ) {
57
- this.loadObjectData();
58
- }
59
- }
60
-
61
- async loadObjectData() {
62
- const { xObjectDataApi } = this.props;
63
- const { autoFetchData } = xObjectDataApi || {};
64
-
65
- if (autoFetchData) {
66
- // 方式一:直接从 props 中取实体数据源相关数据
67
- const { entityData: entityDataList } = this.props;
68
- if (entityDataList) {
69
- this.setState({ objectDataList: entityDataList });
70
- }
71
- } else {
72
- this.setState({ loading: true, error: null });
73
- // 方式二:使用 Neo Open API SDK 获取数据
74
- const result = await xObject.query(xObjectDataApi);
75
-
76
- if (result?.status) {
77
- const records = result.data || [];
78
- const totalSize = result.totalSize || 0;
79
- this.setState({
80
- objectDataList: records,
81
- totalSize,
82
- loading: false,
83
- });
84
- } else {
85
- this.setState({
86
- error: result?.msg || '获取数据数据失败',
87
- loading: false,
88
- });
89
- }
90
- }
91
- }
92
-
93
- renderEntityCard(object: ContactData, index: number) {
94
- return (
95
- <Col xs={24} sm={12} md={8} lg={6} xl={6} key={object.id || index}>
96
- <Card
97
- className="object-card"
98
- hoverable
99
- size="small"
100
- style={{ marginBottom: 16 }}
101
- >
102
- <div className="object-card-content">
103
- <div className="object-avatar">
104
- <Avatar
105
- size={48}
106
- icon={<UserOutlined />}
107
- className="avatar-icon"
108
- />
109
- </div>
110
- <div className="object-info">
111
- <div className="object-name">
112
- <UserOutlined className="info-icon" />
113
- <span className="name-text">
114
- {object.name ||
115
- object.accountName ||
116
- object.productName ||
117
- '未知姓名'}
118
- </span>
119
- </div>
120
- <div className="object-phone">
121
- <PhoneOutlined className="info-icon" />
122
- <span className="phone-text">
123
- {object.phone__c ||
124
- object.phone ||
125
- object.phoneNumber ||
126
- '未填写手机号'}
127
- </span>
128
- </div>
129
- </div>
130
- </div>
131
- </Card>
132
- </Col>
133
- );
134
- }
135
-
136
- render() {
137
- const { title } = this.props;
138
- const { objectDataList, loading, error } = this.state;
139
- const curAmisData = this.props.data || {};
140
- const systemInfo = curAmisData.__NeoSystemInfo || {};
141
- console.log('this.props:', this.props);
142
-
143
- return (
144
- <div className="entity-card-list-container">
145
- <div className="card-list-header">
146
- <div className="header-content">
147
- <h3 className="header-title">
148
- {title || '数据卡片列表'}
149
- {systemInfo.tenantName ? `【${systemInfo.tenantName}】` : ''}
150
- </h3>
151
- <Button
152
- type="primary"
153
- icon={<ReloadOutlined />}
154
- onClick={this.loadObjectData}
155
- loading={loading}
156
- className="refresh-button"
157
- size="small"
158
- >
159
- 刷新
160
- </Button>
161
- </div>
162
- </div>
163
-
164
- <div className="card-list-content">
165
- <Spin spinning={loading} tip="加载数据数据中...">
166
- {error ? (
167
- <div className="error-container">
168
- <Empty
169
- image={Empty.PRESENTED_IMAGE_SIMPLE}
170
- description={
171
- <div>
172
- <div style={{ color: '#ff4d4f', marginBottom: 8 }}>
173
- {error}
174
- </div>
175
- <button
176
- className="retry-button"
177
- onClick={this.loadObjectData}
178
- >
179
- 重新加载
180
- </button>
181
- </div>
182
- }
183
- />
184
- </div>
185
- ) : objectDataList.length === 0 ? (
186
- <Empty
187
- image={Empty.PRESENTED_IMAGE_SIMPLE}
188
- description="暂无数据数据"
189
- />
190
- ) : (
191
- <Row gutter={[16, 16]}>
192
- {objectDataList.map((object, index) =>
193
- this.renderEntityCard(object, index),
194
- )}
195
- </Row>
196
- )}
197
- </Spin>
198
- </div>
199
- </div>
200
- );
201
- }
202
- }
@@ -1,74 +0,0 @@
1
- /**
2
- * @file 数据卡片列表组件对接编辑器的描述文件
3
- */
4
- export class EntityCardListModel {
5
- /**
6
- * cmpType 为自定义组件名称,用于标识组件的唯一性
7
- * 在构建时根据当前组件目录名称自动生成
8
- */
9
- // cmpType: string = 'entityCardList';
10
-
11
- // 组件名称,用于设置在编辑器左侧组件面板中展示的名称
12
- label: string = '实体数据卡片列表';
13
-
14
- // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
- description: string = '展示实体数据信息的卡片列表组件,支持姓名和手机号展示';
16
-
17
- // 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示(可设置多个分类标签)
18
- // tags: string[] = ['自定义组件'];
19
-
20
- /**
21
- * 用于设置组件支持的页面类型
22
- *
23
- * 当前 NeoCRM 平台存在的页面类型:
24
- * all: 1 全页面
25
- * indexPage: 2 首页
26
- * entityListPage: 3 实体列表页
27
- * entityFormPage: 4 实体表单页
28
- * entityDetailPage: 5 实体详情页
29
- * customPage: 6 自定义页面
30
- * bizPage: 7 业务页面
31
- */
32
- // targetPage: string[] = ['customPage'];
33
-
34
- // 组件图标,用于设置在编辑器左侧组件面板中展示的图标
35
- iconSrc: string = 'https://custom-widgets.bj.bcebos.com/data-list.svg';
36
-
37
- // 初次插入页面的默认属性数据
38
- defaultComProps = {
39
- title: '数据卡片列表',
40
- label: '数据卡片列表',
41
- xObjectDataApi: {
42
- xObjectApiKey: 'customContact__c',
43
- fields: ['name', 'phone__c'],
44
- },
45
- };
46
-
47
- /**
48
- * 组件面板配置,用于生成编辑器右侧属性配置面板内容
49
- */
50
- propsSchema = [
51
- {
52
- type: 'textarea',
53
- name: 'title',
54
- label: '组件标题',
55
- value: '数据卡片列表',
56
- placeholder: '请输入组件标题',
57
- },
58
- {
59
- type: 'xObjectDataApi', // 用于获取实体业务数据列表的配置项
60
- name: 'xObjectDataApi',
61
- label: '实体数据源',
62
- placeholder: '请选择实体数据源',
63
- /*
64
- // 返回的数值格式:
65
- value: {
66
- xObjectApiKey: 'customContact__c',
67
- fields: ['name', 'phone__c'],
68
- },
69
- */
70
- },
71
- ];
72
- }
73
-
74
- export default EntityCardListModel;