neo-cmp-cli 1.13.17 → 1.13.19

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 (91) hide show
  1. package/README.md +23 -3
  2. package/dist/index2.js +1 -1
  3. package/dist/neo/env.js +1 -1
  4. package/dist/neo/pushCmp.js +1 -1
  5. package/dist/package.json.js +1 -1
  6. package/package.json +3 -2
  7. package/template/asset-manage-template/docs/README.md +1 -232
  8. package/template/echarts-custom-cmp-template/package.json +1 -1
  9. package/template/neo-bi-cmps/package.json +1 -1
  10. package/template/neo-bi-cmps/src/components/filterBar__c/common.scss +1 -1
  11. package/template/neo-bi-cmps/src/components/filterBar__c/index.tsx +18 -10
  12. package/template/neo-bi-cmps/src/components/filterBar__c/model.ts +8 -2
  13. package/template/neo-bi-cmps/src/components/targetNumber__c/model.ts +1 -1
  14. package/template/neo-bi-cmps/src/utils/common.ts +18 -20
  15. package/template/neo-bi-cmps/src/utils/filter2chartFilter.ts +4 -6
  16. package/template/neo-bi-cmps/src/utils/pipelineFunnel.ts +4 -2
  17. package/template/neo-bi-cmps/src/utils/simpleTable.tsx +21 -16
  18. package/template/neo-custom-cmp-template/docs/README.md +0 -231
  19. package/template/neo-custom-cmp-template/package.json +1 -1
  20. package/template/neo-h5-cmps/src/components/entityList__c/index.tsx +1 -2
  21. package/template/neo-h5-cmps/src/components/entityTabs__c/index.tsx +1 -1
  22. package/template/neo-h5-cmps/src/components/globalSearchInput__c/index.tsx +1 -1
  23. package/template/neo-h5-cmps/src/components/openChatPageBtn__c/index.tsx +1 -2
  24. package/template/neo-pipeline-cmps/neo.config.js +11 -0
  25. package/template/neo-pipeline-cmps/src/assets/css/common.scss +16 -16
  26. package/template/neo-pipeline-cmps/src/assets/css/mixin.scss +5 -5
  27. package/template/neo-pipeline-cmps/src/components/filterBar__c/README.md +9 -9
  28. package/template/neo-pipeline-cmps/src/components/filterBar__c/common.scss +5 -5
  29. package/template/neo-pipeline-cmps/src/components/filterBar__c/index.tsx +47 -46
  30. package/template/neo-pipeline-cmps/src/components/filterBar__c/model.ts +22 -12
  31. package/template/neo-pipeline-cmps/src/components/filterBar__c/style.scss +1 -1
  32. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/README.md +17 -17
  33. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/index.tsx +24 -22
  34. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/model.ts +31 -18
  35. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/reset.scss +4 -0
  36. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/index.tsx +33 -26
  37. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/model.ts +9 -9
  38. package/template/neo-pipeline-cmps/src/components/simpleTable__c/README.md +53 -54
  39. package/template/neo-pipeline-cmps/src/components/simpleTable__c/common.scss +5 -5
  40. package/template/neo-pipeline-cmps/src/components/simpleTable__c/index.tsx +70 -68
  41. package/template/neo-pipeline-cmps/src/components/simpleTable__c/model.ts +41 -41
  42. package/template/neo-pipeline-cmps/src/components/simpleTable__c/style.scss +2 -3
  43. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/README.md +15 -15
  44. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/index.tsx +35 -33
  45. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/model.ts +29 -16
  46. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/README.md +18 -18
  47. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/index.tsx +20 -20
  48. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/model.ts +34 -19
  49. package/template/neo-pipeline-cmps/src/utils/common.ts +14 -14
  50. package/template/neo-pipeline-cmps/src/utils/filter2chartFilter.ts +21 -23
  51. package/template/neo-pipeline-cmps/src/utils/filterBar.ts +14 -14
  52. package/template/neo-pipeline-cmps/src/utils/pipelineFunnel.ts +5 -5
  53. package/template/neo-pipeline-cmps/src/utils/queryByCustomSQL.ts +26 -22
  54. package/template/neo-pipeline-cmps/src/utils/requestDebounce.ts +3 -3
  55. package/template/neo-pipeline-cmps/src/utils/simpleTable.tsx +31 -26
  56. package/template/neo-pipeline-cmps/src/utils/stageSwitch.ts +1 -1
  57. package/template/neo-pipeline-cmps/src/utils/stageTimeChart.ts +5 -5
  58. package/template/neo-pipeline-cmps/src/utils/targetNumber.ts +2 -2
  59. package/template/neo-web-entity-grid/src/components/createForm__c/index.tsx +271 -259
  60. package/template/neo-web-entity-grid/src/components/createForm__c/model.ts +17 -3
  61. package/template/neo-web-entity-grid/src/components/createForm__c/resetAntd.scss +0 -1
  62. package/template/neo-web-entity-grid/src/components/createForm__c/style.scss +1 -1
  63. package/template/neo-web-entity-grid/src/components/entityGrid2__c/index.tsx +5 -1
  64. package/template/neo-web-entity-grid/src/components/entityGrid2__c/model.ts +4 -3
  65. package/template/neo-web-entity-grid/src/components/entityGrid3__c/index.tsx +1 -1
  66. package/template/neo-web-entity-grid/src/components/searchForm__c/index.tsx +4 -3
  67. package/template/neo-web-entity-grid/src/components/searchForm__c/model.ts +9 -4
  68. package/template/neo-web-entity-grid/src/components/searchForm__c/style.scss +2 -1
  69. package/template/neo-web-form/package.json +1 -1
  70. package/template/neo-web-form/src/components/batchAddTable__c/index.tsx +179 -59
  71. package/template/neo-web-form/src/components/batchAddTable__c/model.ts +12 -14
  72. package/template/neo-web-form/src/components/listSummary__c/index.tsx +6 -5
  73. package/template/react-custom-cmp-template/package.json +1 -1
  74. package/template/asset-manage-template/src/utils/axiosFetcher.ts +0 -37
  75. package/template/asset-manage-template/src/utils/queryObjectData.ts +0 -112
  76. package/template/asset-manage-template/src/utils/xobjects.ts +0 -162
  77. package/template/neo-custom-cmp-template/src/utils/axiosFetcher.ts +0 -37
  78. package/template/neo-custom-cmp-template/src/utils/queryObjectData.ts +0 -112
  79. package/template/neo-custom-cmp-template/src/utils/xobjects.ts +0 -162
  80. package/template/neo-h5-cmps/src/utils/axiosFetcher.ts +0 -37
  81. package/template/neo-h5-cmps/src/utils/queryObjectData.ts +0 -112
  82. package/template/neo-h5-cmps/src/utils/xobjects.ts +0 -167
  83. package/template/neo-order-cmps/src/utils/axiosFetcher.ts +0 -37
  84. package/template/neo-order-cmps/src/utils/queryObjectData.ts +0 -112
  85. package/template/neo-order-cmps/src/utils/xobjects.ts +0 -162
  86. package/template/neo-web-entity-grid/src/utils/axiosFetcher.ts +0 -37
  87. package/template/neo-web-entity-grid/src/utils/queryObjectData.ts +0 -112
  88. package/template/neo-web-entity-grid/src/utils/xobjects.ts +0 -167
  89. package/template/neo-web-form/src/utils/axiosFetcher.ts +0 -37
  90. package/template/neo-web-form/src/utils/queryObjectData.ts +0 -112
  91. package/template/neo-web-form/src/utils/xobjects.ts +0 -167
@@ -1,6 +1,7 @@
1
1
  export class PipelineFunnelModel {
2
- label: string = 'Pipeline漏斗图';
3
- description: string = '展示销售管道的漏斗转化情况,直观显示各阶段金额和数量';
2
+ label: string = 'Pipeline Funnel Chart';
3
+ description: string =
4
+ 'Displays the funnel conversion of the sales pipeline, visually showing amount and count at each stage';
4
5
  iconUrl: string = 'https://custom-widgets.bj.bcebos.com/funnel.svg';
5
6
  targetPage: string[] = ['all'];
6
7
  targetDevice: string = 'all';
@@ -10,35 +11,47 @@ export class PipelineFunnelModel {
10
11
  viewId: '4264464770007375',
11
12
  viewType: 'sync',
12
13
  showAiButton: true,
13
- /** true 时层宽按阶段顺序递减(经典形状),层高度按各阶段金额占比;默认 false,层宽按真实金额 */
14
+ /** When true, layer width decreases with stage order (classic shape), layer height proportional to amount; default false, layer width proportional to actual amount */
14
15
  useClassicFunnelShape: false,
15
16
  };
16
17
 
17
18
  events = [
18
19
  {
19
20
  apiKey: 'onActiveStageChange',
20
- label: '点击阶段触发',
21
+ label: 'Triggered on stage click',
21
22
  helpText:
22
- '点击漏斗阶段触发;事件参数含 activeStage(当前激活阶段)',
23
- eventParams:
24
- '[{"apiKey":"eventParam","children":[{"apiKey":"activeStage","label":"当前激活阶段","type":"String"}],"label":"事件入参","type":"Object"}]',
23
+ 'Triggered when clicking a funnel stage; event params include activeStage (current active stage)',
24
+ eventParams: [
25
+ {
26
+ apiKey: 'eventParam',
27
+ children: [
28
+ {
29
+ apiKey: 'activeStage',
30
+ label: 'Current active stage',
31
+ type: 'String',
32
+ },
33
+ ],
34
+ label: 'Event parameters',
35
+ type: 'Object',
36
+ },
37
+ ],
25
38
  },
26
39
  ];
27
40
 
28
41
  functions = [
29
42
  {
30
43
  apiKey: 'refreshData',
31
- label: '刷新数据',
32
- helpTextKey: '重新请求 queryDataTask 刷新漏斗图数据',
44
+ label: 'Refresh data',
45
+ helpTextKey: 'Re-request queryDataTask to refresh funnel chart data',
33
46
  },
34
47
  {
35
48
  apiKey: 'setFilter',
36
- label: '设置过滤条件',
37
- helpTextKey: '设置报表组件的 filter 并重新拉取数据',
49
+ label: 'Set filter conditions',
50
+ helpTextKey: 'Set the report component filter and re-fetch data',
38
51
  funcInParams: [
39
52
  {
40
53
  apiKey: 'filter',
41
- label: '过滤条件',
54
+ label: 'Filter conditions',
42
55
  type: 'Object',
43
56
  required: false,
44
57
  },
@@ -50,26 +63,26 @@ export class PipelineFunnelModel {
50
63
  {
51
64
  type: 'panelInput',
52
65
  name: 'title',
53
- label: '标题',
66
+ label: 'Title',
54
67
  },
55
68
  {
56
69
  type: 'panelInput',
57
70
  name: 'viewId',
58
- label: '视图 ID',
71
+ label: 'View ID',
59
72
  },
60
73
  {
61
74
  type: 'panelInput',
62
75
  name: 'viewType',
63
- label: '视图类型(请求 type',
76
+ label: 'View type (request type)',
64
77
  },
65
78
  {
66
79
  type: 'panelSelect',
67
80
  name: 'useClassicFunnelShape',
68
- label: '漏斗形状',
81
+ label: 'Funnel shape',
69
82
  value: false,
70
83
  options: [
71
- { label: '按真实金额设置漏斗形状', value: false },
72
- { label: '经典漏斗(层高按数值大小)', value: true },
84
+ { label: 'Shape based on actual amount', value: false },
85
+ { label: 'Classic funnel (layer height by value)', value: true },
73
86
  ],
74
87
  clearable: false,
75
88
  },
@@ -0,0 +1,4 @@
1
+ // 隐藏 AI icon
2
+ .nav-ai-container {
3
+ display: none;
4
+ }
@@ -1,6 +1,6 @@
1
1
  /**
2
- * @file 商机健康度评估结果展示
3
- * @description 调用 /rest/ai/v2.0/agent/apps/health_assessment/get_health_assessment_result,展示 assessmentConclusion 摘要与基于 assessmentDimension ECharts 雷达图
2
+ * @file Opportunity Health Assessment Result Display
3
+ * @description Calls /rest/ai/v2.0/agent/apps/health_assessment/get_health_assessment_result, displays assessmentConclusion summary and ECharts radar chart based on assessmentDimension
4
4
  */
5
5
  import * as React from 'react';
6
6
  import * as echarts from 'echarts';
@@ -17,9 +17,9 @@ const HEALTH_ASSESSMENT_URL =
17
17
  export type HealthScoreRow = { name: string; score: number };
18
18
 
19
19
  interface ShowHealthResultProps {
20
- /** 实体 API Key,对应请求体 object_api_key */
20
+ /** Entity API Key, corresponding to request body object_api_key */
21
21
  xObjectApiKey?: string;
22
- /** 业务数据 ID,对应请求体 data_id */
22
+ /** Business data ID, corresponding to request body data_id */
23
23
  id?: string;
24
24
  className?: string;
25
25
  style?: React.CSSProperties;
@@ -60,12 +60,7 @@ function parseSummaryFromConclusion(conclusion: unknown): string {
60
60
  .map((x: any) => {
61
61
  if (!x || typeof x !== 'object') return '';
62
62
  return (
63
- x.summary ??
64
- x.conclusion ??
65
- x.desc ??
66
- x.description ??
67
- x.remark ??
68
- ''
63
+ x.summary ?? x.conclusion ?? x.desc ?? x.description ?? x.remark ?? ''
69
64
  );
70
65
  })
71
66
  .filter((s: string) => String(s).trim());
@@ -81,10 +76,12 @@ function parseSummaryFromConclusion(conclusion: unknown): string {
81
76
  }
82
77
 
83
78
  /**
84
- * 雷达图仅使用接口字段 assessmentDimension,且须为 { name, score }[]
85
- * 不读取 conclusion、不解析其它键名(如 label / value / items 包装等)。
79
+ * Radar chart only uses the API field assessmentDimension, which must be { name, score }[].
80
+ * Does not read conclusion or parse other key names (such as label / value / items wrappers).
86
81
  */
87
- function scoreRowsFromAssessmentDimension(dimension: unknown): HealthScoreRow[] {
82
+ function scoreRowsFromAssessmentDimension(
83
+ dimension: unknown,
84
+ ): HealthScoreRow[] {
88
85
  if (!Array.isArray(dimension)) return [];
89
86
  const rows: HealthScoreRow[] = [];
90
87
  for (const item of dimension) {
@@ -107,8 +104,8 @@ function scoreRowsFromAssessmentDimension(dimension: unknown): HealthScoreRow[]
107
104
  }
108
105
 
109
106
  /**
110
- * 雷达轴外圈文案:不再做6 字截断;英文尽量按词折行,无空格(如中文)按固定宽度折行。
111
- * 行数过多时仅在最后一行末尾加省略号,其余行尽量完整展示。
107
+ * Radar axis outer label: no 6-character truncation; English wraps by word, non-spaced text (e.g. Chinese) wraps at fixed width.
108
+ * When too many lines, only the last line gets an ellipsis, other lines are shown as completely as possible.
112
109
  */
113
110
  function wrapRadarAxisName(
114
111
  text: string,
@@ -159,7 +156,9 @@ function wrapRadarAxisName(
159
156
  return [...head, last].join('\n');
160
157
  }
161
158
 
162
- function buildHealthRadarOption(items: HealthScoreRow[]): echarts.EChartsOption {
159
+ function buildHealthRadarOption(
160
+ items: HealthScoreRow[],
161
+ ): echarts.EChartsOption {
163
162
  if (!items.length) {
164
163
  return {
165
164
  graphic: [
@@ -168,7 +167,7 @@ function buildHealthRadarOption(items: HealthScoreRow[]): echarts.EChartsOption
168
167
  left: 'center',
169
168
  top: 'middle',
170
169
  style: {
171
- text: '暂无雷达图维度数据',
170
+ text: 'No radar chart dimension data available',
172
171
  fill: '#999',
173
172
  fontSize: 12,
174
173
  },
@@ -177,7 +176,7 @@ function buildHealthRadarOption(items: HealthScoreRow[]): echarts.EChartsOption
177
176
  };
178
177
  }
179
178
 
180
- // 每轴单独上限,避免多轴共用 max 导致低分维度挤在中间;健康分常见 0100
179
+ // Each axis has its own max to avoid low-score dimensions being squeezed; health scores are typically 0-100
181
180
  const indicator = items.map((i) => ({
182
181
  name: i.name,
183
182
  max: Math.max(10, i.score, 1),
@@ -213,7 +212,7 @@ function buildHealthRadarOption(items: HealthScoreRow[]): echarts.EChartsOption
213
212
  data: [
214
213
  {
215
214
  value: items.map((i) => i.score),
216
- name: '健康度',
215
+ name: 'Health Score',
217
216
  areaStyle: {
218
217
  color: 'rgba(99,102,241,0.2)',
219
218
  },
@@ -231,7 +230,10 @@ function buildHealthRadarOption(items: HealthScoreRow[]): echarts.EChartsOption
231
230
  };
232
231
  }
233
232
 
234
- class ShowHealthResult extends BaseCmp<ShowHealthResultProps, ShowHealthResultState> {
233
+ class ShowHealthResult extends BaseCmp<
234
+ ShowHealthResultProps,
235
+ ShowHealthResultState
236
+ > {
235
237
  private radarChartRef = React.createRef<HTMLDivElement>();
236
238
 
237
239
  private radarChartInstance: echarts.ECharts | null = null;
@@ -378,11 +380,11 @@ class ShowHealthResult extends BaseCmp<ShowHealthResultProps, ShowHealthResultSt
378
380
  },
379
381
  );
380
382
  } catch (e: any) {
381
- console.error('showHealthResult 健康度接口失败:', e);
383
+ console.error('showHealthResult health assessment API failed:', e);
382
384
  this.setState(
383
385
  {
384
386
  loading: false,
385
- error: e?.message || '请求失败',
387
+ error: e?.message || 'Request failed',
386
388
  summaryText: '',
387
389
  scoreRows: [],
388
390
  },
@@ -406,13 +408,16 @@ class ShowHealthResult extends BaseCmp<ShowHealthResultProps, ShowHealthResultSt
406
408
  <div
407
409
  className={`showHealthResult__c ${className || ''}`}
408
410
  style={style}
411
+ data-time="2026.4.17 01"
409
412
  >
410
413
  {loading && (
411
414
  <div className="showHealthResult__c__loading" aria-busy="true">
412
415
  <span className="showHealthResult__c__loadingDot" />
413
416
  <span className="showHealthResult__c__loadingDot" />
414
417
  <span className="showHealthResult__c__loadingDot" />
415
- <span className="showHealthResult__c__loadingText">正在获取健康度评估…</span>
418
+ <span className="showHealthResult__c__loadingText">
419
+ Fetching health assessment...
420
+ </span>
416
421
  </div>
417
422
  )}
418
423
 
@@ -423,7 +428,7 @@ class ShowHealthResult extends BaseCmp<ShowHealthResultProps, ShowHealthResultSt
423
428
  >
424
429
  <div className="showHealthResult__c__placeholderBody">
425
430
  <div className="showHealthResult__c__placeholderTitle">
426
- 暂时无法获取评估结果
431
+ Unable to retrieve assessment results at this time
427
432
  </div>
428
433
  <div className="showHealthResult__c__placeholderMsg">{error}</div>
429
434
  </div>
@@ -434,10 +439,12 @@ class ShowHealthResult extends BaseCmp<ShowHealthResultProps, ShowHealthResultSt
434
439
  <div className="showHealthResult__c__placeholder showHealthResult__c__placeholder--empty">
435
440
  <div className="showHealthResult__c__placeholderBody">
436
441
  <div className="showHealthResult__c__placeholderTitle">
437
- 暂无评估数据
442
+ No assessment data available
438
443
  </div>
439
444
  <div className="showHealthResult__c__placeholderHint">
440
- 当前记录可能尚未生成健康度结论,请稍后重试或检查数据是否完整。
445
+ The current record may not have generated a health assessment
446
+ conclusion yet. Please try again later or check if the data is
447
+ complete.
441
448
  </div>
442
449
  </div>
443
450
  </div>
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @file 商机健康度评估结果展示 编辑器 model
2
+ * @file Opportunity Health Assessment Result Display - Editor model
3
3
  */
4
4
  export class ShowHealthResultModel {
5
- label: string = '健康度信息展示';
5
+ label: string = 'Health Score Display';
6
6
 
7
7
  description: string =
8
- '调用健康度评估接口,展示结论摘要与雷达图';
8
+ 'Calls the health assessment API to display conclusion summary and radar chart';
9
9
 
10
10
  iconUrl: string = 'https://custom-widgets.bj.bcebos.com/detail.svg';
11
11
 
@@ -21,8 +21,8 @@ export class ShowHealthResultModel {
21
21
  functions = [
22
22
  {
23
23
  apiKey: 'refreshData',
24
- label: '刷新健康度数据',
25
- helpTextKey: '重新请求健康度评估接口',
24
+ label: 'Refresh health data',
25
+ helpTextKey: 'Re-request the health assessment API',
26
26
  },
27
27
  ];
28
28
 
@@ -30,14 +30,14 @@ export class ShowHealthResultModel {
30
30
  {
31
31
  type: 'panelInput',
32
32
  name: 'xObjectApiKey',
33
- label: '实体 keyxObjectApiKey',
34
- placeholder: '例如 opportunity',
33
+ label: 'Entity key (xObjectApiKey)',
34
+ placeholder: 'e.g. opportunity',
35
35
  },
36
36
  {
37
37
  type: 'panelInput',
38
38
  name: 'id',
39
- label: '业务数据 IDdata_id',
40
- placeholder: '业务记录主键',
39
+ label: 'Business data ID (data_id)',
40
+ placeholder: 'Business record primary key',
41
41
  },
42
42
  ];
43
43
  }
@@ -1,39 +1,39 @@
1
- # XObject 数据表格组件(简化版)
1
+ # XObject Data Table Component (Simplified)
2
2
 
3
- 基于 XObject 的数据表格组件,仅支持数据展示,表格列根据 `xObject.getDesc` 返回的 fields 动态生成。
4
- 备注:使用 Neo Open API SDKneo-open-api 提供的方法实现数据对象的查询操作。
3
+ An XObject-based data table component that only supports data display. Table columns are dynamically generated based on fields returned by `xObject.getDesc`.
4
+ Note: Uses methods provided by the Neo Open API SDK (neo-open-api) to implement data object query operations.
5
5
 
6
- ## 功能特性
6
+ ## Features
7
7
 
8
- - 📊 **动态表格列**:根据 XObject 字段描述自动生成表格列
9
- - 🔍 **数据展示**:支持展示 XObject 实体数据
10
- - 🎨 **响应式设计**:适配不同屏幕尺寸
11
- - ⚙️ **属性配置**:支持通过编辑器配置组件属性
8
+ - **Dynamic Table Columns**: Automatically generates table columns based on XObject field descriptions
9
+ - **Data Display**: Supports displaying XObject entity data
10
+ - **Responsive Design**: Adapts to different screen sizes
11
+ - **Property Configuration**: Supports configuring component properties through the editor
12
12
 
13
- ## 组件属性
13
+ ## Component Properties
14
14
 
15
- | 属性名 | 类型 | 默认值 | 说明 |
16
- |--------|------|--------|------|
17
- | title | string | '数据表格' | 表格标题 |
18
- | xObjectDataApi | object | - | 实体数据源配置 |
19
- | xObjectDataApi.xObjectApiKey | string | '' | 数据对象的 API Key |
20
- | xObjectDataApi.fields | string[] | [] | 要显示的字段列表 |
15
+ | Property | Type | Default | Description |
16
+ |----------|------|---------|-------------|
17
+ | title | string | 'Data Table' | Table title |
18
+ | xObjectDataApi | object | - | Entity data source configuration |
19
+ | xObjectDataApi.xObjectApiKey | string | '' | Data object API Key |
20
+ | xObjectDataApi.fields | string[] | [] | List of fields to display |
21
21
 
22
- ## 使用方法
22
+ ## Usage
23
23
 
24
- ### 1. 在编辑器中使用
24
+ ### 1. Using in the Editor
25
25
 
26
- 1. 从组件面板拖拽 "实体数据表格(简化版)" 组件到页面
27
- 2. 在右侧属性面板中选择要操作的数据对象
28
- 3. 配置要显示的字段(可选)
29
- 4. 保存并预览
26
+ 1. Drag the "Entity Data Table (Simplified)" component from the component panel to the page
27
+ 2. Select the data object to operate on in the right property panel
28
+ 3. Configure the fields to display (optional)
29
+ 4. Save and preview
30
30
 
31
- ### 2. 代码中使用
31
+ ### 2. Using in Code
32
32
 
33
33
  ```tsx
34
34
  import SimpleTable from './components/simpleTable__c';
35
35
 
36
- // 使用组件
36
+ // Use the component
37
37
  <SimpleTable
38
38
  xObjectDataApi={{
39
39
  xObjectApiKey: 'customContact__c',
@@ -42,49 +42,48 @@ import SimpleTable from './components/simpleTable__c';
42
42
  />
43
43
  ```
44
44
 
45
- ## 技术实现
45
+ ## Technical Implementation
46
46
 
47
- ### 核心依赖
47
+ ### Core Dependencies
48
48
 
49
- - **Ant Design**:UI 组件库
50
- - **React**:前端框架
51
- - **TypeScript**:类型支持
49
+ - **Ant Design**: UI component library
50
+ - **React**: Frontend framework
51
+ - **TypeScript**: Type support
52
52
 
53
- ### 数据流程
53
+ ### Data Flow
54
54
 
55
- 1. **初始化**:组件挂载时获取字段描述
56
- 2. **列生成**:根据字段描述动态生成表格列
57
- 3. **数据加载**:使用 `xObject.query` 获取数据列表
55
+ 1. **Initialization**: Fetches field descriptions when the component mounts
56
+ 2. **Column Generation**: Dynamically generates table columns based on field descriptions
57
+ 3. **Data Loading**: Uses `xObject.query` to fetch data list
58
58
 
59
- ## 样式定制
59
+ ## Style Customization
60
60
 
61
- 组件提供了完整的 SCSS 样式文件,支持以下定制:
61
+ The component provides complete SCSS style files, supporting the following customizations:
62
62
 
63
- - 表格样式(边框、悬停效果等)
64
- - 响应式设计(移动端适配)
63
+ - Table styles (borders, hover effects, etc.)
64
+ - Responsive design (mobile adaptation)
65
65
 
66
- ## 注意事项
66
+ ## Notes
67
67
 
68
- 1. **权限要求**:确保用户有对应 XObject 的读取权限
69
- 2. **字段类型**:支持所有基础字段类型的展示
70
- 3. **错误处理**:组件内置了完善的错误处理和用户提示
68
+ 1. **Permission Requirements**: Ensure the user has read access to the corresponding XObject
69
+ 2. **Field Types**: Supports display of all basic field types
70
+ 3. **Error Handling**: The component has built-in comprehensive error handling and user prompts
71
71
 
72
- ## 与完整版组件的区别
72
+ ## Differences from Full Version
73
73
 
74
- 本简化版组件相比完整版 `entityTable__c` 组件:
74
+ This simplified version compared to the full `entityTable__c` component:
75
75
 
76
- - **不支持新增**:移除了新增记录功能
77
- - **不支持编辑**:移除了编辑记录功能
78
- - **不支持删除**:移除了删除记录功能
79
- - **不支持刷新**:移除了手动刷新按钮
80
- - **不支持分页**:移除了分页功能,显示所有数据
81
- - **仅支持展示**:专注于数据展示功能
76
+ - **No Create**: Removed record creation functionality
77
+ - **No Edit**: Removed record editing functionality
78
+ - **No Delete**: Removed record deletion functionality
79
+ - **No Refresh**: Removed manual refresh button
80
+ - **No Pagination**: Removed pagination, displays all data
81
+ - **Display Only**: Focused on data display functionality
82
82
 
83
- ## 扩展开发
83
+ ## Extension Development
84
84
 
85
- 如需扩展功能,可以:
86
-
87
- 1. **添加字段类型支持**:在 `generateColumns()` 方法中添加字段格式化逻辑
88
- 2. **自定义样式**:修改 `style.scss` 文件定制组件外观
89
- 3. **添加排序功能**:扩展表格功能支持列排序
85
+ To extend functionality, you can:
90
86
 
87
+ 1. **Add Field Type Support**: Add field formatting logic in the `generateColumns()` method
88
+ 2. **Custom Styles**: Modify the `style.scss` file to customize component appearance
89
+ 3. **Add Sorting**: Extend table functionality to support column sorting
@@ -1,13 +1,13 @@
1
- // css变量
1
+ // CSS variables
2
2
  :root {
3
3
  --background-color: #f5f6fa;
4
4
  }
5
5
 
6
- // sass变量
6
+ // SASS variables
7
7
  $background-color: #f5f6fa;
8
- // 自定义公共样式
8
+ // Custom common styles
9
9
 
10
- /* AI Win Ratehover 卡片(对齐 demo.html #winRateTooltip */
10
+ /* AI Win Rate: hover card (aligned with demo.html #winRateTooltip) */
11
11
  .simpleTable-winrate-trigger {
12
12
  cursor: pointer;
13
13
  border: none !important;
@@ -31,7 +31,7 @@ $background-color: #f5f6fa;
31
31
  }
32
32
  }
33
33
 
34
- /* 健康度列 hover:内嵌 showHealthResult__c */
34
+ /* Health score column hover: embedded showHealthResult__c */
35
35
  .simpleTable-health-popover-trigger {
36
36
  cursor: pointer;
37
37
  display: inline-block;