neo-cmp-cli 1.13.22 → 1.13.23

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 (83) hide show
  1. package/README.md +3 -0
  2. package/package.json +1 -1
  3. package/template/antd-custom-cmp-template/package.json +1 -1
  4. package/template/antd-custom-cmp-template/src/components/dataDashboard__c/model.ts +1 -1
  5. package/template/antd-custom-cmp-template/src/components/dataDashboard__c/style.scss +11 -11
  6. package/template/antd-custom-cmp-template/src/components/searchWidget__c/model.ts +1 -1
  7. package/template/asset-manage-template/package.json +1 -1
  8. package/template/asset-manage-template/src/components/assetManage__c/style.scss +4 -4
  9. package/template/asset-manage-template/src/components/bidList__c/style.scss +2 -2
  10. package/template/asset-manage-template/src/components/bidPackage__c/style.scss +2 -2
  11. package/template/echarts-custom-cmp-template/package.json +1 -1
  12. package/template/echarts-custom-cmp-template/src/components/chartWidget__c/model.ts +1 -1
  13. package/template/echarts-custom-cmp-template/src/components/chartWidget__c/style.scss +1 -1
  14. package/template/empty-custom-cmp-template/package.json +1 -1
  15. package/template/map-custom-cmp-template/package.json +1 -1
  16. package/template/map-custom-cmp-template/src/components/mapWidget__c/model.ts +1 -1
  17. package/template/map-custom-cmp-template/src/components/mapWidget__c/style.scss +2 -2
  18. package/template/neo-bi-cmps/package.json +1 -1
  19. package/template/neo-bi-cmps/public/demo.html +10 -10
  20. package/template/neo-bi-cmps/src/components/filterBar__c/model.ts +2 -1
  21. package/template/neo-bi-cmps/src/components/targetNumber__c/index.tsx +13 -8
  22. package/template/neo-bi-cmps/src/components/targetNumber__c/model.ts +10 -4
  23. package/template/neo-bi-cmps/src/components/targetNumber__c/style.scss +13 -5
  24. package/template/neo-custom-cmp-template/package.json +1 -1
  25. package/template/neo-custom-cmp-template/src/components/customApi__c/model.ts +1 -1
  26. package/template/neo-custom-cmp-template/src/components/customApi__c/style.scss +5 -3
  27. package/template/neo-custom-cmp-template/src/components/entityDetail__c/index.tsx +25 -54
  28. package/template/neo-custom-cmp-template/src/components/entityDetail__c/model.ts +1 -1
  29. package/template/neo-custom-cmp-template/src/components/entityDetail__c/style.scss +111 -68
  30. package/template/neo-custom-cmp-template/src/components/entityForm__c/index.tsx +0 -1
  31. package/template/neo-custom-cmp-template/src/components/entityForm__c/model.ts +1 -1
  32. package/template/neo-custom-cmp-template/src/components/entityTable__c/index.tsx +0 -1
  33. package/template/neo-custom-cmp-template/src/components/entityTable__c/model.ts +11 -11
  34. package/template/neo-custom-cmp-template/src/components/entityTable__c/style.scss +4 -4
  35. package/template/neo-custom-cmp-template/src/components/simpleCmp__c/index.tsx +2 -2
  36. package/template/neo-custom-cmp-template/src/components/simpleCmp__c/model.ts +1 -1
  37. package/template/neo-h5-cmps/package.json +1 -1
  38. package/template/neo-h5-cmps/src/components/chatPage__c/model.ts +1 -1
  39. package/template/neo-h5-cmps/src/components/entityList__c/model.ts +1 -1
  40. package/template/neo-h5-cmps/src/components/entityTabs__c/model.ts +2 -2
  41. package/template/neo-h5-cmps/src/components/entityTabs__c/style.scss +15 -6
  42. package/template/neo-h5-cmps/src/components/globalSearchInput__c/model.ts +1 -1
  43. package/template/neo-h5-cmps/src/components/openChatPageBtn__c/model.ts +1 -1
  44. package/template/neo-order-cmps/src/components/entityInfoCard__c/index.tsx +4 -12
  45. package/template/neo-order-cmps/src/components/entityInfoCard__c/model.ts +3 -3
  46. package/template/neo-order-cmps/src/components/entityInfoCard__c/style.scss +6 -5
  47. package/template/neo-order-cmps/src/components/simpleTable__c/index.tsx +71 -20
  48. package/template/neo-order-cmps/src/components/simpleTable__c/model.ts +15 -11
  49. package/template/neo-order-cmps/src/components/simpleTable__c/style.scss +39 -29
  50. package/template/neo-pipeline-cmps/package.json +1 -1
  51. package/template/neo-pipeline-cmps/public/demo.html +10 -10
  52. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/style.scss +1 -1
  53. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/style.scss +1 -1
  54. package/template/neo-pipeline-cmps/src/components/simpleTable__c/common.scss +3 -3
  55. package/template/neo-pipeline-cmps/src/components/simpleTable__c/style.scss +2 -2
  56. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/style.scss +1 -1
  57. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/style.scss +2 -2
  58. package/template/neo-web-entity-grid/package.json +1 -1
  59. package/template/neo-web-entity-grid/src/components/createForm__c/model.ts +1 -1
  60. package/template/neo-web-entity-grid/src/components/entityGrid2__c/model.ts +1 -1
  61. package/template/neo-web-entity-grid/src/components/entityGrid3__c/model.ts +1 -1
  62. package/template/neo-web-entity-grid/src/components/entityGrid4__c/model.ts +1 -1
  63. package/template/neo-web-entity-grid/src/components/entityGrid__c/model.ts +1 -1
  64. package/template/neo-web-entity-grid/src/components/searchForm__c/model.ts +1 -1
  65. package/template/neo-web-form/package.json +1 -1
  66. package/template/neo-web-form/src/components/batchAddTable__c/model.ts +1 -1
  67. package/template/neo-web-form/src/components/batchAddTable__c/tableModal.scss +1 -1
  68. package/template/neo-web-form/src/components/listSummary__c/model.ts +1 -1
  69. package/template/neo-web-form/src/components/listSummary__c/style.scss +2 -2
  70. package/template/react-custom-cmp-template/package.json +1 -1
  71. package/template/react-custom-cmp-template/src/components/infoCard__c/model.js +1 -1
  72. package/template/react-ts-custom-cmp-template/package.json +1 -1
  73. package/template/react-ts-custom-cmp-template/src/components/listWidget__c/model.ts +1 -1
  74. package/template/react-ts-custom-cmp-template/src/components/listWidget__c/style.scss +1 -1
  75. package/template/vue2-custom-cmp-template/package.json +1 -1
  76. package/template/vue2-custom-cmp-template/src/components/vueInfoCard__c/model.js +1 -1
  77. package/template/antd-custom-cmp-template/src/components/infoCard__c/index.tsx +0 -89
  78. package/template/antd-custom-cmp-template/src/components/infoCard__c/model.ts +0 -76
  79. package/template/antd-custom-cmp-template/src/components/infoCard__c/style.scss +0 -105
  80. package/template/neo-custom-cmp-template/src/components/entityCardList__c/README.md +0 -61
  81. package/template/neo-custom-cmp-template/src/components/entityCardList__c/index.tsx +0 -226
  82. package/template/neo-custom-cmp-template/src/components/entityCardList__c/model.ts +0 -89
  83. package/template/neo-custom-cmp-template/src/components/entityCardList__c/style.scss +0 -260
package/README.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  **neo-cmp-cli** 是面向 Neo 平台的自定义组件开发工具。它基于 [AKFun](https://github.com/wibetter/akfun) 的工程能力,提供项目初始化、编译构建、本地预览与热更新、多技术栈支持以及发布到 NeoCRM 等能力。
4
4
 
5
+ ## 在线使用手册
6
+ [https://neo-cmp-docs.netlify.app](https://neo-cmp-docs.netlify.app)
7
+
5
8
  ## 目录
6
9
 
7
10
  - [主要特性](#主要特性)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-cmp-cli",
3
- "version": "1.13.22",
3
+ "version": "1.13.23",
4
4
  "description": "Neo 自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -48,7 +48,7 @@
48
48
  "@commitlint/config-conventional": "^18.0.0",
49
49
  "@types/react": "^16.9.11",
50
50
  "@types/react-dom": "^16.9.15",
51
- "neo-cmp-cli": "^1.13.22",
51
+ "neo-cmp-cli": "^1.13.23",
52
52
  "husky": "^4.2.5",
53
53
  "lint-staged": "^10.2.9",
54
54
  "prettier": "^2.0.5"
@@ -12,7 +12,7 @@ export class DataDashboardModel {
12
12
  label: string = '数据仪表板';
13
13
 
14
14
  // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
- description: string = '酷炫的数据展示仪表板,支持动态数据更新和动画效果';
15
+ description: string = '使用 antd ui 组件实现的数据展示仪表板,支持动态数据更新和动画效果';
16
16
 
17
17
  // 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示
18
18
  // tags: string[] = ['自定义组件'];
@@ -473,11 +473,11 @@
473
473
  align-items: center;
474
474
  gap: var(--space-md);
475
475
  animation: gradientShift 3s ease infinite;
476
- letter-spacing: -0.02em;
476
+ letter-spacing: 0.06em;
477
477
 
478
478
  .ant-tag {
479
479
  font-size: 14px;
480
- font-weight: 600;
480
+ font-weight: 500;
481
481
  padding: 4px 12px;
482
482
  border-radius: var(--radius-full);
483
483
  border: none;
@@ -540,7 +540,7 @@
540
540
  }
541
541
 
542
542
  .user-name {
543
- font-weight: 600;
543
+ font-weight: 500;
544
544
  color: var(--primary-color);
545
545
  font-size: 16px;
546
546
  }
@@ -629,7 +629,7 @@
629
629
  .ant-statistic-title {
630
630
  color: var(--text-secondary);
631
631
  font-size: 14px;
632
- font-weight: 600;
632
+ font-weight: 500;
633
633
  margin-bottom: var(--space-sm);
634
634
  text-transform: uppercase;
635
635
  letter-spacing: 0.5px;
@@ -678,7 +678,7 @@
678
678
  var(--success-light)
679
679
  );
680
680
  border: none;
681
- font-weight: 600;
681
+ font-weight: 500;
682
682
  font-size: 12px;
683
683
  }
684
684
  }
@@ -840,7 +840,7 @@
840
840
  );
841
841
  color: white;
842
842
  border-radius: var(--radius-md);
843
- font-weight: 600;
843
+ font-weight: 500;
844
844
  padding: var(--space-sm) var(--space-lg);
845
845
  transition: all var(--duration-normal) var(--ease-in-out);
846
846
 
@@ -908,7 +908,7 @@
908
908
  .ant-tag {
909
909
  border: none;
910
910
  border-radius: var(--radius-md);
911
- font-weight: 600;
911
+ font-weight: 500;
912
912
  font-size: 12px;
913
913
  padding: var(--space-xs) var(--space-sm);
914
914
 
@@ -1115,7 +1115,7 @@
1115
1115
 
1116
1116
  .metric-name {
1117
1117
  font-size: 14px;
1118
- font-weight: 600;
1118
+ font-weight: 500;
1119
1119
  color: var(--text-primary);
1120
1120
  text-transform: uppercase;
1121
1121
  letter-spacing: 0.5px;
@@ -1249,13 +1249,13 @@
1249
1249
  background-clip: text;
1250
1250
  line-height: 1;
1251
1251
  animation: gradientShift 3s ease infinite;
1252
- letter-spacing: -0.02em;
1252
+ letter-spacing: 0.06em;
1253
1253
  }
1254
1254
 
1255
1255
  .unit {
1256
1256
  font-size: 20px;
1257
1257
  color: var(--text-secondary);
1258
- font-weight: 600;
1258
+ font-weight: 500;
1259
1259
  text-transform: uppercase;
1260
1260
  letter-spacing: 0.5px;
1261
1261
  }
@@ -1469,7 +1469,7 @@
1469
1469
 
1470
1470
  .ant-spin-text {
1471
1471
  color: var(--text-primary);
1472
- font-weight: 600;
1472
+ font-weight: 500;
1473
1473
  }
1474
1474
  }
1475
1475
  }
@@ -12,7 +12,7 @@ export class SearchWidgetModel {
12
12
  label: string = '搜索组件';
13
13
 
14
14
  // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
- description: string = '支持搜索输入,点击回车键显示搜索内容';
15
+ description: string = '使用 antd ui 组件实现的支持搜索输入,点击回车键显示搜索内容';
16
16
 
17
17
  // 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示
18
18
  // tags: string[] = ['自定义组件'];
@@ -52,7 +52,7 @@
52
52
  "@types/react": "^16.9.11",
53
53
  "@types/react-dom": "^16.9.15",
54
54
  "@types/axios": "^0.14.0",
55
- "neo-cmp-cli": "^1.13.22",
55
+ "neo-cmp-cli": "^1.13.23",
56
56
  "husky": "^4.2.5",
57
57
  "lint-staged": "^10.2.9",
58
58
  "prettier": "^2.0.5",
@@ -38,7 +38,7 @@
38
38
 
39
39
  .header-title {
40
40
  font-size: 16px;
41
- font-weight: 600;
41
+ font-weight: 500;
42
42
  color: #262626;
43
43
  }
44
44
  }
@@ -72,7 +72,7 @@
72
72
 
73
73
  .sidebar-label {
74
74
  font-size: 11px;
75
- font-weight: 600;
75
+ font-weight: 500;
76
76
  color: #bfbfbf;
77
77
  text-transform: uppercase;
78
78
  letter-spacing: 1px;
@@ -265,7 +265,7 @@
265
265
  .card-name {
266
266
  margin: 0;
267
267
  font-size: 15px;
268
- font-weight: 600;
268
+ font-weight: 500;
269
269
  color: #262626;
270
270
  flex: 1;
271
271
  overflow: hidden;
@@ -314,7 +314,7 @@
314
314
  padding: 2px 10px;
315
315
  border-radius: 10px;
316
316
  font-size: 11px;
317
- font-weight: 600;
317
+ font-weight: 500;
318
318
  white-space: nowrap;
319
319
  flex-shrink: 0;
320
320
  }
@@ -21,7 +21,7 @@
21
21
  align-items: center;
22
22
  gap: 6px;
23
23
  font-size: 15px;
24
- font-weight: 600;
24
+ font-weight: 500;
25
25
  color: #262626;
26
26
 
27
27
  .title-icon {
@@ -152,7 +152,7 @@
152
152
 
153
153
  .meta-budget {
154
154
  color: #1890ff;
155
- font-weight: 600;
155
+ font-weight: 500;
156
156
  font-size: 13px;
157
157
  }
158
158
 
@@ -24,7 +24,7 @@
24
24
  .header-title {
25
25
  margin: 0 0 4px;
26
26
  font-size: 18px;
27
- font-weight: 600;
27
+ font-weight: 500;
28
28
  color: #262626;
29
29
  }
30
30
 
@@ -109,7 +109,7 @@
109
109
  .ant-table {
110
110
  .ant-table-thead > tr > th {
111
111
  background: #fafafa;
112
- font-weight: 600;
112
+ font-weight: 500;
113
113
  color: #262626;
114
114
  font-size: 14px;
115
115
  }
@@ -48,7 +48,7 @@
48
48
  "@commitlint/config-conventional": "^18.0.0",
49
49
  "@types/react": "^16.9.11",
50
50
  "@types/react-dom": "^16.9.15",
51
- "neo-cmp-cli": "^1.13.22",
51
+ "neo-cmp-cli": "^1.13.23",
52
52
  "husky": "^4.2.5",
53
53
  "lint-staged": "^10.2.9",
54
54
  "prettier": "^2.0.5",
@@ -13,7 +13,7 @@ export class ChartWidgetModel {
13
13
 
14
14
  // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
15
  description: string =
16
- '支持多种图表类型切换的专业图表组件,支持丰富的配置选项';
16
+ '使用 echarts 实现的图表组件,支持多种图表类型切换的专业图表组件,支持丰富的配置选项';
17
17
 
18
18
  // 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示
19
19
  // tags: string[] = ['自定义组件'];
@@ -191,7 +191,7 @@
191
191
  // 图表标题样式
192
192
  .echarts-title {
193
193
  font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
194
- font-weight: 600;
194
+ font-weight: 500;
195
195
  }
196
196
 
197
197
  // 图例样式
@@ -41,7 +41,7 @@
41
41
  "@commitlint/config-conventional": "^18.0.0",
42
42
  "@types/react": "^16.9.11",
43
43
  "@types/react-dom": "^16.9.15",
44
- "neo-cmp-cli": "^1.13.22",
44
+ "neo-cmp-cli": "^1.13.23",
45
45
  "husky": "^4.2.5",
46
46
  "lint-staged": "^10.2.9",
47
47
  "prettier": "^2.0.5"
@@ -47,7 +47,7 @@
47
47
  "@commitlint/config-conventional": "^18.0.0",
48
48
  "@types/react": "^16.9.11",
49
49
  "@types/react-dom": "^16.9.15",
50
- "neo-cmp-cli": "^1.13.22",
50
+ "neo-cmp-cli": "^1.13.23",
51
51
  "husky": "^4.2.5",
52
52
  "lint-staged": "^10.2.9",
53
53
  "prettier": "^2.0.5"
@@ -12,7 +12,7 @@ export class MapWidgetModel {
12
12
  label: string = '地图组件';
13
13
 
14
14
  // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
- description: string = '地图展示组件,支持传入经纬度或地址名称';
15
+ description: string = '使用高德地图实现的地图区域展示组件,支持传入经纬度或地址名称';
16
16
 
17
17
  // 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示
18
18
  // tags: string[] = ['自定义组件'];
@@ -14,7 +14,7 @@
14
14
  .map-widget-title {
15
15
  margin: 0 0 8px 0;
16
16
  font-size: 18px;
17
- font-weight: 600;
17
+ font-weight: 500;
18
18
  }
19
19
 
20
20
  .map-widget-address {
@@ -128,7 +128,7 @@
128
128
 
129
129
  .info-title {
130
130
  font-size: 14px;
131
- font-weight: 600;
131
+ font-weight: 500;
132
132
  color: #333;
133
133
  margin-bottom: 8px;
134
134
  }
@@ -53,7 +53,7 @@
53
53
  "@types/react-dom": "^16.9.15",
54
54
  "husky": "^4.2.5",
55
55
  "lint-staged": "^10.2.9",
56
- "neo-cmp-cli": "^1.13.22",
56
+ "neo-cmp-cli": "^1.13.23",
57
57
  "prettier": "^2.0.5"
58
58
  },
59
59
  "overrides": {
@@ -26,7 +26,7 @@
26
26
 
27
27
  h1 {
28
28
  font-size: 20px;
29
- font-weight: 600;
29
+ font-weight: 500;
30
30
  margin-bottom: 4px;
31
31
  }
32
32
 
@@ -47,7 +47,7 @@
47
47
  .tab-btn {
48
48
  padding: 10px 24px;
49
49
  font-size: 14px;
50
- font-weight: 600;
50
+ font-weight: 500;
51
51
  cursor: pointer;
52
52
  border: none;
53
53
  background: none;
@@ -124,7 +124,7 @@
124
124
 
125
125
  .stage-tab.active .stage-name {
126
126
  color: #6366f1;
127
- font-weight: 600;
127
+ font-weight: 500;
128
128
  }
129
129
 
130
130
  .stage-tab .stage-amount {
@@ -251,7 +251,7 @@
251
251
 
252
252
  .bi-chart h3 {
253
253
  font-size: 14px;
254
- font-weight: 600;
254
+ font-weight: 500;
255
255
  margin-bottom: 16px;
256
256
  }
257
257
 
@@ -275,7 +275,7 @@
275
275
  justify-content: center;
276
276
  color: #fff;
277
277
  font-size: 11px;
278
- font-weight: 600;
278
+ font-weight: 500;
279
279
  cursor: default;
280
280
  transition: opacity 0.2s;
281
281
  }
@@ -374,7 +374,7 @@
374
374
  align-items: center;
375
375
  margin-bottom: 12px;
376
376
  font-size: 13px;
377
- font-weight: 600;
377
+ font-weight: 500;
378
378
  }
379
379
 
380
380
  .calendar-nav span {
@@ -397,7 +397,7 @@
397
397
 
398
398
  .calendar-grid .day-header {
399
399
  color: #999;
400
- font-weight: 600;
400
+ font-weight: 500;
401
401
  padding: 6px 0;
402
402
  }
403
403
 
@@ -444,7 +444,7 @@
444
444
  color: #fff;
445
445
  cursor: pointer;
446
446
  font-size: 13px;
447
- font-weight: 600;
447
+ font-weight: 500;
448
448
  }
449
449
 
450
450
  .date-picker-footer button:hover {
@@ -520,7 +520,7 @@
520
520
  padding: 6px 14px;
521
521
  font-size: 11px;
522
522
  color: #999;
523
- font-weight: 600;
523
+ font-weight: 500;
524
524
  text-transform: uppercase;
525
525
  letter-spacing: 0.5px;
526
526
  }
@@ -542,7 +542,7 @@
542
542
  .owner-item.selected {
543
543
  background: #f0f0ff;
544
544
  color: #6366f1;
545
- font-weight: 600;
545
+ font-weight: 500;
546
546
  }
547
547
 
548
548
  .owner-icon {
@@ -1,6 +1,7 @@
1
1
  export class FilterBarModel {
2
2
  label: string = '筛选栏';
3
- description: string = '支持日期范围、负责人、业务类型等多维度筛选';
3
+ description: string =
4
+ '筛选工具栏,支持日期范围、负责人、业务类型等多维度筛选';
4
5
  iconUrl: string = 'https://custom-widgets.bj.bcebos.com/filter.svg';
5
6
  targetPage: string[] = ['all'];
6
7
  targetDevice: string = 'all';
@@ -35,6 +35,7 @@ interface FieldDesc {
35
35
  * 自定义样式配置接口
36
36
  */
37
37
  interface TargetNumberStyle {
38
+ headerTitle?: string;
38
39
  baseStyle?: {
39
40
  backgroundColor?: string;
40
41
  paddingMargin?: {
@@ -77,6 +78,8 @@ interface TargetNumberProps {
77
78
  entityApiKey?: EntityApiKey;
78
79
  /** 绑定的字段描述信息数组 */
79
80
  selectFieldDesc?: FieldDesc[];
81
+ /** 标题文案(与 targetNumberStyle.titleStyle 联用) */
82
+ headerTitle?: string;
80
83
  /** 自定义样式配置 */
81
84
  targetNumberStyle?: TargetNumberStyle;
82
85
  /** 数值格式化函数 */
@@ -287,7 +290,7 @@ class TargetNumber extends BaseCmp<TargetNumberProps, TargetNumberState> {
287
290
  */
288
291
  render() {
289
292
  const { targetNumbers, loading, error } = this.state;
290
- const { className, targetNumberStyle = {} } = this.props;
293
+ const { className, targetNumberStyle = {}, headerTitle } = this.props;
291
294
 
292
295
  console.log('TargetNumber:', this.props);
293
296
 
@@ -337,8 +340,8 @@ class TargetNumber extends BaseCmp<TargetNumberProps, TargetNumberState> {
337
340
  const numberTitleStyle: React.CSSProperties = {
338
341
  fontSize: numberTitleStyleConfig?.fontSize
339
342
  ? `${numberTitleStyleConfig.fontSize}px`
340
- : '14px',
341
- fontWeight: numberTitleStyleConfig?.fontWeight || 400,
343
+ : '16px',
344
+ fontWeight: numberTitleStyleConfig?.fontWeight || 500,
342
345
  color: numberTitleStyleConfig?.color || '#8c8c8c',
343
346
  };
344
347
 
@@ -348,10 +351,12 @@ class TargetNumber extends BaseCmp<TargetNumberProps, TargetNumberState> {
348
351
  fontSize:
349
352
  titleStyleConfig?.fontSize != null
350
353
  ? `${titleStyleConfig.fontSize}px`
351
- : '24px',
352
- fontWeight: titleStyleConfig?.fontWeight ?? 400,
353
- color: titleStyleConfig?.color || '#000000',
354
- backgroundColor: titleStyleConfig?.backgroundColor || '#eaf3fc',
354
+ : undefined,
355
+ fontWeight: titleStyleConfig?.fontWeight ?? 500,
356
+ color: titleStyleConfig?.color || '#1f1f1f',
357
+ ...(titleStyleConfig?.backgroundColor
358
+ ? { backgroundColor: titleStyleConfig.backgroundColor }
359
+ : {}),
355
360
  };
356
361
 
357
362
  // 渲染单个数值块
@@ -407,7 +412,7 @@ class TargetNumber extends BaseCmp<TargetNumberProps, TargetNumberState> {
407
412
  >
408
413
  {showTitle && (titleStyleConfig?.text ?? '') !== '' && (
409
414
  <div className="target-number-title" style={titleStyle}>
410
- {titleStyleConfig?.text}
415
+ {headerTitle || titleStyleConfig?.text}
411
416
  </div>
412
417
  )}
413
418
  <div className="target-number-block multiple-fields">
@@ -20,7 +20,7 @@ export class TargetNumberModel {
20
20
 
21
21
  /** 组件描述,用于设置在编辑器左侧组件面板中展示的描述 */
22
22
  description: string =
23
- '用于展示关键数值指标,支持从 XObject 实体对象获取动态数据,支持绑定多个字段进行展示';
23
+ '关键数值指标展示卡片,支持从 XObject 实体对象获取动态数据,支持绑定多个字段进行展示';
24
24
 
25
25
  /** 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示 */
26
26
  // tags: string[] = ['自定义组件'];
@@ -50,6 +50,7 @@ export class TargetNumberModel {
50
50
  /** 初次插入页面的默认属性数据 */
51
51
  defaultComProps = {
52
52
  entityApiKey: '',
53
+ headerTitle: '关键数据',
53
54
  targetNumberStyle: {
54
55
  baseStyle: {
55
56
  backgroundColor: '#ffffff',
@@ -63,9 +64,9 @@ export class TargetNumberModel {
63
64
  },
64
65
  titleStyle: {
65
66
  show: true,
66
- text: '>> 关键数据',
67
- fontSize: 18,
68
- fontWeight: 700,
67
+ text: '关键数据',
68
+ fontSize: 16,
69
+ fontWeight: 500,
69
70
  color: '#333',
70
71
  backgroundColor: '#eaf3fc',
71
72
  },
@@ -97,6 +98,11 @@ export class TargetNumberModel {
97
98
  * 定义组件在编辑器中可配置的属性
98
99
  */
99
100
  propsSchema = [
101
+ {
102
+ type: 'panelInput',
103
+ name: 'headerTitle',
104
+ label: 'Header 标题',
105
+ },
100
106
  {
101
107
  type: 'xObjectDetailApi',
102
108
  name: 'entityApiKey',
@@ -7,11 +7,19 @@
7
7
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
8
8
  margin-bottom: 12px;
9
9
 
10
- // 组件标题(根据 titleStyle.show 展示)
10
+ // 组件标题(根据 titleStyle.show 展示,具体字号等可由 inline titleStyle 覆盖)
11
11
  .target-number-title {
12
+ flex-shrink: 0;
13
+ padding: 8px 16px 8px 14px;
14
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
15
+ 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
16
+ font-size: 16px;
17
+ font-weight: 500;
12
18
  line-height: 1.4;
13
- background-color: #eaf3fc;
14
- padding: 8px 12px;
19
+ letter-spacing: 0.08em;
20
+ color: #1f1f1f;
21
+ background: linear-gradient(180deg, #fafbfd 0%, #f4f7fb 100%);
22
+ border-left: 4px solid #1677ff;
15
23
  }
16
24
 
17
25
  .target-number-block {
@@ -102,13 +110,13 @@
102
110
 
103
111
  @media (max-width: 576px) {
104
112
  padding: 8px;
105
- min-width: calc(50% - 4px);
113
+ min-width: calc(50% - 30px);
106
114
  }
107
115
  }
108
116
 
109
117
  .target-number-value {
110
118
  font-size: 32px;
111
- font-weight: 600;
119
+ font-weight: 500;
112
120
  color: #262626;
113
121
  line-height: 1.2;
114
122
  word-break: break-all;
@@ -55,7 +55,7 @@
55
55
  "@types/react": "^16.9.11",
56
56
  "@types/react-dom": "^16.9.15",
57
57
  "@types/axios": "^0.14.0",
58
- "neo-cmp-cli": "^1.13.22",
58
+ "neo-cmp-cli": "^1.13.23",
59
59
  "husky": "^4.2.5",
60
60
  "lint-staged": "^10.2.9",
61
61
  "prettier": "^2.0.5"
@@ -5,7 +5,7 @@ export class CustomApiCmpModel {
5
5
  label: string = '自定义API示例';
6
6
 
7
7
  description: string =
8
- '通过通用代理 customApi.run 请求 JSONPlaceholder posts 并以表格展示';
8
+ '通过通用代理请求外部数据接口,并以表格形式展示外部接口数据';
9
9
 
10
10
  iconUrl: string = 'https://custom-widgets.bj.bcebos.com/table.svg';
11
11
 
@@ -10,11 +10,13 @@
10
10
  }
11
11
 
12
12
  .panel-header {
13
- padding: 12px 0 8px 0;
13
+ padding: 8px 0;
14
14
  background: #fff;
15
15
  display: flex;
16
16
  justify-content: space-between;
17
17
  align-items: flex-start;
18
+ margin-bottom: 12px;
19
+ border-bottom: 1px solid #f0f0f0;
18
20
 
19
21
  .panel-header-text {
20
22
  flex: 1;
@@ -24,7 +26,7 @@
24
26
  h3 {
25
27
  margin: 0;
26
28
  font-size: 16px;
27
- font-weight: 600;
29
+ font-weight: 500;
28
30
  color: #434343;
29
31
  }
30
32
  }
@@ -36,7 +38,7 @@
36
38
  .ant-table {
37
39
  .ant-table-thead > tr > th {
38
40
  background-color: #f9f9f9;
39
- font-weight: 600;
41
+ font-weight: 500;
40
42
  color: #262626;
41
43
  border-bottom: 1px solid #eee;
42
44
  padding: 10px;