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="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="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,65 +0,0 @@
1
- # ContactCardList 联系人卡片列表组件
2
-
3
- ## 组件描述
4
-
5
- 联系人卡片列表组件用于展示联系人信息,以卡片形式展示每个联系人的姓名和手机号。组件使用 Ant Design 的 Card 组件,具有良好的视觉效果和交互体验。
6
-
7
- ## 功能特性
8
-
9
- - 📱 响应式设计,支持多种屏幕尺寸
10
- - 🎨 美观的卡片布局,支持悬停效果
11
- - 🔄 自动加载数据,支持错误重试
12
- - 📊 使用 queryXObjectData 获取 customContact__c 数据
13
- - 🎯 展示联系人姓名和手机号信息
14
- - 💫 加载状态和空状态处理
15
-
16
- ## 组件属性
17
-
18
- | 属性名 | 类型 | 默认值 | 描述 |
19
- |--------|------|--------|------|
20
- | title | string | '联系人卡片列表' | 组件标题 |
21
- | data | any | - | 组件数据,包含用户信息和系统信息 |
22
-
23
- ## 数据源
24
-
25
- 组件通过 `queryXObjectData` 工具函数获取数据:
26
-
27
- - **数据表**: `customContact__c`
28
- - **字段**: `id`, `name`, `phone__c`
29
- - **API**: `/rest/data/v2/query`
30
-
31
- ## 样式特性
32
-
33
- - 使用 Flexbox 布局,支持响应式设计
34
- - 卡片悬停效果,提升用户体验
35
- - 渐变色头像,美观大方
36
- - 支持移动端适配
37
-
38
- ## 使用示例
39
-
40
- ```tsx
41
- import ContactCardList from './components/contact-card-list';
42
-
43
- // 在页面中使用
44
- <ContactCardList
45
- title="我的联系人"
46
- data={amisData}
47
- />
48
- ```
49
-
50
- ## 技术栈
51
-
52
- - React 16.9+
53
- - TypeScript
54
- - Ant Design 4.9+
55
- - SCSS
56
-
57
- ## 文件结构
58
-
59
- ```
60
- contact-card-list/
61
- ├── index.tsx # 主组件文件
62
- ├── model.ts # 组件配置和编辑器属性定义
63
- ├── style.scss # 组件样式文件
64
- └── README.md # 组件说明文档
65
- ```
@@ -1,180 +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
- import {queryXObjectData} from '../../utils/queryObjectData';
5
- import './style.scss';
6
-
7
- interface ContactCardListProps {
8
- title: string;
9
- data?: any;
10
- }
11
-
12
- interface ContactData {
13
- id: string;
14
- name: string;
15
- phone__c: string;
16
- }
17
-
18
- interface ContactCardListState {
19
- contactList: ContactData[];
20
- totalSize: number;
21
- loading: boolean;
22
- error: string | null;
23
- }
24
-
25
- export default class ContactCardList extends React.PureComponent<
26
- ContactCardListProps,
27
- ContactCardListState
28
- > {
29
- constructor(props: ContactCardListProps) {
30
- super(props);
31
-
32
- this.state = {
33
- contactList: [],
34
- totalSize: 0,
35
- loading: false,
36
- error: null,
37
- };
38
-
39
- this.loadContactData = this.loadContactData.bind(this);
40
- }
41
-
42
- componentDidMount() {
43
- this.loadContactData();
44
- }
45
-
46
- async loadContactData() {
47
- this.setState({ loading: true, error: null });
48
-
49
- try {
50
- // 使用 queryXObjectData 获取 customContact__c 数据
51
- const response = await queryXObjectData({
52
- xObjectApiKey: 'customContact__c',
53
- fields: ['id', 'name', 'phone__c'],
54
- });
55
-
56
- if (response && response.code === 200) {
57
- const curResult = response.result || {};
58
- const records = curResult.records || [];
59
- const totalSize = curResult.totalSize || 0;
60
- this.setState({
61
- contactList: records,
62
- totalSize,
63
- loading: false,
64
- });
65
- } else {
66
- this.setState({
67
- error: response?.message || '获取联系人数据失败',
68
- loading: false,
69
- });
70
- }
71
- } catch (error: any) {
72
- console.error('获取联系人数据失败:', error);
73
- this.setState({
74
- error: error.message || '获取联系人数据失败',
75
- loading: false,
76
- });
77
- }
78
- }
79
-
80
- renderContactCard(contact: ContactData, index: number) {
81
- return (
82
- <Col xs={24} sm={12} md={8} lg={6} xl={6} key={contact.id || index}>
83
- <Card
84
- className="contact-card"
85
- hoverable
86
- size="small"
87
- style={{ marginBottom: 16 }}
88
- >
89
- <div className="contact-card-content">
90
- <div className="contact-avatar">
91
- <Avatar
92
- size={48}
93
- icon={<UserOutlined />}
94
- className="avatar-icon"
95
- />
96
- </div>
97
- <div className="contact-info">
98
- <div className="contact-name">
99
- <UserOutlined className="info-icon" />
100
- <span className="name-text">{contact.name || '未知姓名'}</span>
101
- </div>
102
- <div className="contact-phone">
103
- <PhoneOutlined className="info-icon" />
104
- <span className="phone-text">
105
- {contact.phone__c || '未填写手机号'}
106
- </span>
107
- </div>
108
- </div>
109
- </div>
110
- </Card>
111
- </Col>
112
- );
113
- }
114
-
115
- render() {
116
- const { title } = this.props;
117
- const { contactList, loading, error } = this.state;
118
- const curAmisData = this.props.data || {};
119
- const systemInfo = curAmisData.__NeoSystemInfo || {};
120
-
121
- return (
122
- <div className="contact-card-list-container">
123
- <div className="card-list-header">
124
- <div className="header-content">
125
- <h3 className="header-title">
126
- {title || '联系人卡片列表'}
127
- {systemInfo.tenantName ? `【${systemInfo.tenantName}】` : ''}
128
- </h3>
129
- <Button
130
- type="primary"
131
- icon={<ReloadOutlined />}
132
- onClick={this.loadContactData}
133
- loading={loading}
134
- className="refresh-button"
135
- size="small"
136
- >
137
- 刷新
138
- </Button>
139
- </div>
140
- </div>
141
-
142
- <div className="card-list-content">
143
- <Spin spinning={loading} tip="加载联系人数据中...">
144
- {error ? (
145
- <div className="error-container">
146
- <Empty
147
- image={Empty.PRESENTED_IMAGE_SIMPLE}
148
- description={
149
- <div>
150
- <div style={{ color: '#ff4d4f', marginBottom: 8 }}>
151
- {error}
152
- </div>
153
- <button
154
- className="retry-button"
155
- onClick={this.loadContactData}
156
- >
157
- 重新加载
158
- </button>
159
- </div>
160
- }
161
- />
162
- </div>
163
- ) : contactList.length === 0 ? (
164
- <Empty
165
- image={Empty.PRESENTED_IMAGE_SIMPLE}
166
- description="暂无联系人数据"
167
- />
168
- ) : (
169
- <Row gutter={[16, 16]}>
170
- {contactList.map((contact, index) =>
171
- this.renderContactCard(contact, index),
172
- )}
173
- </Row>
174
- )}
175
- </Spin>
176
- </div>
177
- </div>
178
- );
179
- }
180
- }
@@ -1,50 +0,0 @@
1
- /**
2
- * @file 联系人卡片列表组件对接编辑器的描述文件
3
- */
4
- export class ContactCardListModel {
5
- /**
6
- * cmpType 为自定义组件名称,用于标识组件的唯一性
7
- * 在构建时根据当前组件目录名称自动生成
8
- */
9
- // cmpType: string = 'contact-card-list';
10
-
11
- // 组件名称,用于设置在编辑器左侧组件面板中展示的名称
12
- label: string = '联系人卡片列表';
13
-
14
- // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
- description: string = '展示联系人信息的卡片列表组件,支持姓名和手机号展示';
16
-
17
- // 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示(可设置多个分类标签)
18
- // tags: string[] = ['自定义组件'];
19
-
20
- // 组件图标,用于设置在编辑器左侧组件面板中展示的图标
21
- iconSrc: string = 'https://custom-widgets.bj.bcebos.com/card-list.svg';
22
-
23
- // 初次插入页面的默认属性数据
24
- defaultComProps = {
25
- title: '联系人卡片列表',
26
- label: '联系人卡片列表',
27
- };
28
-
29
- /**
30
- * 组件面板配置,用于生成编辑器右侧属性配置面板内容
31
- */
32
- propsSchema = [
33
- {
34
- type: 'textarea',
35
- name: 'title',
36
- label: '组件标题',
37
- value: '联系人卡片列表',
38
- placeholder: '请输入组件标题',
39
- },
40
- ];
41
-
42
- // 支持 函数式写法:propsSchemaCreator,com 为组件实例。优先级比 propsSchema 高
43
- /*
44
- propsSchemaCreator = (com: any) => {
45
- return [];
46
- };
47
- */
48
- }
49
-
50
- export default ContactCardListModel;