neo-cmp-cli 1.13.21 → 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 (158) hide show
  1. package/README.md +3 -0
  2. package/dist/_virtual/array-set2.js +1 -0
  3. package/dist/_virtual/base64-vlq2.js +1 -0
  4. package/dist/_virtual/base642.js +1 -0
  5. package/dist/_virtual/binary-search2.js +1 -0
  6. package/dist/_virtual/mapping-list2.js +1 -0
  7. package/dist/_virtual/picocolors.js +1 -0
  8. package/dist/_virtual/quick-sort2.js +1 -0
  9. package/dist/_virtual/source-map-consumer2.js +1 -0
  10. package/dist/_virtual/source-map-generator2.js +1 -0
  11. package/dist/_virtual/source-map2.js +1 -0
  12. package/dist/_virtual/source-node2.js +1 -0
  13. package/dist/_virtual/symbols.js +1 -0
  14. package/dist/_virtual/util2.js +1 -0
  15. package/dist/loaders/component-scope-style-loader2.js +1 -1
  16. package/dist/node_modules/nanoid/non-secure/index.js +1 -0
  17. package/dist/node_modules/picocolors/picocolors.js +1 -0
  18. package/dist/node_modules/postcss/lib/at-rule.js +1 -0
  19. package/dist/node_modules/postcss/lib/comment.js +1 -0
  20. package/dist/node_modules/postcss/lib/container.js +1 -0
  21. package/dist/node_modules/postcss/lib/css-syntax-error.js +1 -0
  22. package/dist/node_modules/postcss/lib/declaration.js +1 -0
  23. package/dist/node_modules/postcss/lib/document.js +1 -0
  24. package/dist/node_modules/postcss/lib/fromJSON.js +1 -0
  25. package/dist/node_modules/postcss/lib/input.js +1 -0
  26. package/dist/node_modules/postcss/lib/lazy-result.js +1 -0
  27. package/dist/node_modules/postcss/lib/list.js +1 -0
  28. package/dist/node_modules/postcss/lib/map-generator.js +1 -0
  29. package/dist/node_modules/postcss/lib/no-work-result.js +1 -0
  30. package/dist/node_modules/postcss/lib/node.js +1 -0
  31. package/dist/node_modules/postcss/lib/parse.js +1 -0
  32. package/dist/node_modules/postcss/lib/parser.js +1 -0
  33. package/dist/node_modules/postcss/lib/postcss.js +1 -0
  34. package/dist/node_modules/postcss/lib/previous-map.js +1 -0
  35. package/dist/node_modules/postcss/lib/processor.js +1 -0
  36. package/dist/node_modules/postcss/lib/result.js +1 -0
  37. package/dist/node_modules/postcss/lib/root.js +1 -0
  38. package/dist/node_modules/postcss/lib/rule.js +1 -0
  39. package/dist/node_modules/postcss/lib/stringifier.js +1 -0
  40. package/dist/node_modules/postcss/lib/stringify.js +1 -0
  41. package/dist/node_modules/postcss/lib/symbols.js +1 -0
  42. package/dist/node_modules/postcss/lib/terminal-highlight.js +1 -0
  43. package/dist/node_modules/postcss/lib/tokenize.js +1 -0
  44. package/dist/node_modules/postcss/lib/warn-once.js +1 -0
  45. package/dist/node_modules/postcss/lib/warning.js +1 -0
  46. package/dist/node_modules/source-map/lib/array-set.js +1 -1
  47. package/dist/node_modules/source-map/lib/base64-vlq.js +1 -1
  48. package/dist/node_modules/source-map/lib/base64.js +1 -1
  49. package/dist/node_modules/source-map/lib/binary-search.js +1 -1
  50. package/dist/node_modules/source-map/lib/mapping-list.js +1 -1
  51. package/dist/node_modules/source-map/lib/quick-sort.js +1 -1
  52. package/dist/node_modules/source-map/lib/source-map-consumer.js +1 -1
  53. package/dist/node_modules/source-map/lib/source-map-generator.js +1 -1
  54. package/dist/node_modules/source-map/lib/source-node.js +1 -1
  55. package/dist/node_modules/source-map/lib/util.js +1 -1
  56. package/dist/node_modules/source-map/source-map.js +1 -1
  57. package/dist/node_modules/source-map-js/lib/array-set.js +1 -0
  58. package/dist/node_modules/source-map-js/lib/base64-vlq.js +1 -0
  59. package/dist/node_modules/source-map-js/lib/base64.js +1 -0
  60. package/dist/node_modules/source-map-js/lib/binary-search.js +1 -0
  61. package/dist/node_modules/source-map-js/lib/mapping-list.js +1 -0
  62. package/dist/node_modules/source-map-js/lib/quick-sort.js +1 -0
  63. package/dist/node_modules/source-map-js/lib/source-map-consumer.js +1 -0
  64. package/dist/node_modules/source-map-js/lib/source-map-generator.js +1 -0
  65. package/dist/node_modules/source-map-js/lib/source-node.js +1 -0
  66. package/dist/node_modules/source-map-js/lib/util.js +1 -0
  67. package/dist/node_modules/source-map-js/source-map.js +1 -0
  68. package/dist/package.json.js +1 -1
  69. package/package.json +7 -5
  70. package/template/antd-custom-cmp-template/package.json +1 -1
  71. package/template/antd-custom-cmp-template/src/components/dataDashboard__c/model.ts +1 -1
  72. package/template/antd-custom-cmp-template/src/components/dataDashboard__c/style.scss +11 -11
  73. package/template/antd-custom-cmp-template/src/components/searchWidget__c/model.ts +1 -1
  74. package/template/asset-manage-template/package.json +1 -1
  75. package/template/asset-manage-template/src/components/assetManage__c/style.scss +4 -4
  76. package/template/asset-manage-template/src/components/bidList__c/style.scss +2 -2
  77. package/template/asset-manage-template/src/components/bidPackage__c/style.scss +2 -2
  78. package/template/echarts-custom-cmp-template/package.json +1 -1
  79. package/template/echarts-custom-cmp-template/src/components/chartWidget__c/model.ts +1 -1
  80. package/template/echarts-custom-cmp-template/src/components/chartWidget__c/style.scss +1 -1
  81. package/template/empty-custom-cmp-template/package.json +1 -1
  82. package/template/map-custom-cmp-template/package.json +1 -1
  83. package/template/map-custom-cmp-template/src/components/mapWidget__c/model.ts +1 -1
  84. package/template/map-custom-cmp-template/src/components/mapWidget__c/style.scss +2 -2
  85. package/template/neo-bi-cmps/package.json +1 -1
  86. package/template/neo-bi-cmps/public/demo.html +10 -10
  87. package/template/neo-bi-cmps/src/components/filterBar__c/model.ts +2 -1
  88. package/template/neo-bi-cmps/src/components/targetNumber__c/index.tsx +13 -8
  89. package/template/neo-bi-cmps/src/components/targetNumber__c/model.ts +10 -4
  90. package/template/neo-bi-cmps/src/components/targetNumber__c/style.scss +13 -5
  91. package/template/neo-custom-cmp-template/CODEBUDDY.md +92 -0
  92. package/template/neo-custom-cmp-template/package.json +1 -1
  93. package/template/neo-custom-cmp-template/src/components/customApi__c/index.tsx +8 -4
  94. package/template/neo-custom-cmp-template/src/components/customApi__c/model.ts +1 -1
  95. package/template/neo-custom-cmp-template/src/components/customApi__c/style.scss +25 -20
  96. package/template/neo-custom-cmp-template/src/components/entityDetail__c/index.tsx +26 -55
  97. package/template/neo-custom-cmp-template/src/components/entityDetail__c/model.ts +1 -1
  98. package/template/neo-custom-cmp-template/src/components/entityDetail__c/style.scss +155 -100
  99. package/template/neo-custom-cmp-template/src/components/entityForm__c/index.tsx +0 -1
  100. package/template/neo-custom-cmp-template/src/components/entityForm__c/model.ts +11 -3
  101. package/template/neo-custom-cmp-template/src/components/entityForm__c/style.scss +1 -1
  102. package/template/neo-custom-cmp-template/src/components/entityTable__c/index.tsx +10 -9
  103. package/template/neo-custom-cmp-template/src/components/entityTable__c/model.ts +12 -3
  104. package/template/neo-custom-cmp-template/src/components/entityTable__c/style.scss +171 -116
  105. package/template/neo-custom-cmp-template/src/components/simpleCmp__c/index.tsx +3 -3
  106. package/template/neo-custom-cmp-template/src/components/simpleCmp__c/model.ts +1 -1
  107. package/template/neo-custom-cmp-template/src/components/simpleCmp__c/style.scss +94 -13
  108. package/template/neo-h5-cmps/package.json +1 -1
  109. package/template/neo-h5-cmps/src/components/chatPage__c/model.ts +1 -1
  110. package/template/neo-h5-cmps/src/components/entityList__c/model.ts +1 -1
  111. package/template/neo-h5-cmps/src/components/entityTabs__c/model.ts +2 -2
  112. package/template/neo-h5-cmps/src/components/entityTabs__c/style.scss +15 -6
  113. package/template/neo-h5-cmps/src/components/globalSearchInput__c/model.ts +1 -1
  114. package/template/neo-h5-cmps/src/components/openChatPageBtn__c/model.ts +1 -1
  115. package/template/neo-order-cmps/package.json +1 -1
  116. package/template/neo-order-cmps/src/components/entityInfoCard__c/index.tsx +4 -12
  117. package/template/neo-order-cmps/src/components/entityInfoCard__c/model.ts +3 -3
  118. package/template/neo-order-cmps/src/components/entityInfoCard__c/style.scss +6 -5
  119. package/template/neo-order-cmps/src/components/simpleTable__c/index.tsx +71 -20
  120. package/template/neo-order-cmps/src/components/simpleTable__c/model.ts +15 -11
  121. package/template/neo-order-cmps/src/components/simpleTable__c/style.scss +39 -29
  122. package/template/neo-pipeline-cmps/package.json +1 -1
  123. package/template/neo-pipeline-cmps/public/demo.html +10 -10
  124. package/template/neo-pipeline-cmps/src/components/pipelineFunnel__c/style.scss +1 -1
  125. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/style.scss +1 -1
  126. package/template/neo-pipeline-cmps/src/components/simpleTable__c/common.scss +3 -3
  127. package/template/neo-pipeline-cmps/src/components/simpleTable__c/style.scss +2 -2
  128. package/template/neo-pipeline-cmps/src/components/stageSwitch__c/style.scss +1 -1
  129. package/template/neo-pipeline-cmps/src/components/stageTimeChart__c/style.scss +2 -2
  130. package/template/neo-web-entity-grid/package.json +1 -1
  131. package/template/neo-web-entity-grid/src/components/createForm__c/model.ts +1 -1
  132. package/template/neo-web-entity-grid/src/components/entityGrid2__c/model.ts +2 -2
  133. package/template/neo-web-entity-grid/src/components/entityGrid2__c/style.scss +1 -5
  134. package/template/neo-web-entity-grid/src/components/entityGrid3__c/model.ts +3 -1
  135. package/template/neo-web-entity-grid/src/components/entityGrid3__c/style.scss +1 -6
  136. package/template/neo-web-entity-grid/src/components/entityGrid4__c/model.ts +1 -1
  137. package/template/neo-web-entity-grid/src/components/entityGrid__c/model.ts +1 -1
  138. package/template/neo-web-entity-grid/src/components/entityGrid__c/style.scss +1 -6
  139. package/template/neo-web-entity-grid/src/components/searchForm__c/model.ts +11 -3
  140. package/template/neo-web-form/package.json +1 -1
  141. package/template/neo-web-form/src/components/batchAddTable__c/model.ts +1 -1
  142. package/template/neo-web-form/src/components/batchAddTable__c/tableModal.scss +1 -1
  143. package/template/neo-web-form/src/components/listSummary__c/model.ts +1 -1
  144. package/template/neo-web-form/src/components/listSummary__c/style.scss +2 -2
  145. package/template/react-custom-cmp-template/package.json +1 -1
  146. package/template/react-custom-cmp-template/src/components/infoCard__c/model.js +1 -1
  147. package/template/react-ts-custom-cmp-template/package.json +1 -1
  148. package/template/react-ts-custom-cmp-template/src/components/listWidget__c/model.ts +1 -1
  149. package/template/react-ts-custom-cmp-template/src/components/listWidget__c/style.scss +1 -1
  150. package/template/vue2-custom-cmp-template/package.json +1 -1
  151. package/template/vue2-custom-cmp-template/src/components/vueInfoCard__c/model.js +1 -1
  152. package/template/antd-custom-cmp-template/src/components/infoCard__c/index.tsx +0 -89
  153. package/template/antd-custom-cmp-template/src/components/infoCard__c/model.ts +0 -76
  154. package/template/antd-custom-cmp-template/src/components/infoCard__c/style.scss +0 -105
  155. package/template/neo-custom-cmp-template/src/components/entityCardList__c/README.md +0 -61
  156. package/template/neo-custom-cmp-template/src/components/entityCardList__c/index.tsx +0 -225
  157. package/template/neo-custom-cmp-template/src/components/entityCardList__c/model.ts +0 -81
  158. package/template/neo-custom-cmp-template/src/components/entityCardList__c/style.scss +0 -260
@@ -1,16 +1,18 @@
1
1
  .entityInfoCard__c {
2
2
  position: relative;
3
3
  box-sizing: border-box;
4
- padding: 15px;
5
- background: #f5f5f5;
4
+ padding: 12px;
5
+ background: #fff;
6
6
  border-bottom: 1px solid #ddd;
7
7
  border-radius: 4px;
8
8
 
9
9
  .info-title {
10
10
  font-size: 16px;
11
- font-weight: 600;
12
- margin-bottom: 15px;
11
+ font-weight: 500;
13
12
  color: #333;
13
+ padding: 8px 0;
14
+ margin-bottom: 12px;
15
+ border-bottom: 1px solid #f0f0f0;
14
16
  }
15
17
 
16
18
  .info-content {
@@ -187,4 +189,3 @@
187
189
  max-height: none;
188
190
  }
189
191
  }
190
-
@@ -3,11 +3,7 @@
3
3
  * @description 基于 Neo 平台的 XObject 实体对象数据表格组件,仅支持数据展示
4
4
  */
5
5
  import * as React from 'react';
6
- import {
7
- Table,
8
- Spin,
9
- Empty,
10
- } from 'antd';
6
+ import { Table, Spin, Empty, Button } from 'antd';
11
7
  // @ts-ignore
12
8
  import { xObject } from 'neo-open-api'; // Neo Open API
13
9
  // @ts-ignore
@@ -32,6 +28,8 @@ interface SimpleTableProps {
32
28
  xObjectApiKey: string;
33
29
  fields: string[];
34
30
  fieldDescList?: any[];
31
+ pageSize?: number;
32
+ page?: number;
35
33
  autoFetchData?: boolean;
36
34
  };
37
35
  /** Neo 平台传递的数据,包含系统信息等 */
@@ -80,6 +78,12 @@ interface SimpleTableState {
80
78
  loading: boolean;
81
79
  /** 错误信息 */
82
80
  error: string | null;
81
+ /** 分页信息 */
82
+ pagination: {
83
+ current: number;
84
+ pageSize: number;
85
+ total: number;
86
+ };
83
87
  }
84
88
 
85
89
  /**
@@ -92,6 +96,7 @@ export default class SimpleTable extends BaseCmp<
92
96
  > {
93
97
  constructor(props: SimpleTableProps) {
94
98
  super(props);
99
+ const { page, pageSize } = this.props.xObjectDataApi || {};
95
100
 
96
101
  // 初始化组件状态
97
102
  this.state = {
@@ -99,20 +104,26 @@ export default class SimpleTable extends BaseCmp<
99
104
  dataSource: [],
100
105
  loading: false,
101
106
  error: null,
107
+ pagination: {
108
+ current: page || 1,
109
+ pageSize: pageSize || 10,
110
+ total: 0,
111
+ },
102
112
  };
103
113
 
104
114
  // 绑定方法上下文
105
115
  this.loadData = this.loadData.bind(this);
116
+ this.handleTableChange = this.handleTableChange.bind(this);
106
117
  }
107
118
 
108
119
  componentDidMount() {
109
120
  const { xObjectDataApi } = this.props;
110
- const { xObjectApiKey } = xObjectDataApi || {};
121
+ const { xObjectApiKey, page, pageSize } = xObjectDataApi || {};
111
122
 
112
123
  if (xObjectApiKey) {
113
124
  // 初始化字段列表、加载数据
114
125
  this.loadFieldList();
115
- this.loadData();
126
+ this.loadData(page, pageSize);
116
127
  }
117
128
  }
118
129
 
@@ -121,20 +132,24 @@ export default class SimpleTable extends BaseCmp<
121
132
  * 当 xObjectApiKey 发生变化时重新加载数据
122
133
  */
123
134
  async componentDidUpdate(prevProps: SimpleTableProps) {
124
- const { xObjectApiKey, fields } =
135
+ const { xObjectApiKey, fields, page, pageSize } =
125
136
  this.props.xObjectDataApi || {};
126
137
  const {
127
138
  xObjectApiKey: prevXObjectApiKey,
128
139
  fields: prevFields,
140
+ page: prevPage,
141
+ pageSize: prevPageSize,
129
142
  } = prevProps.xObjectDataApi || {};
130
143
  if (
131
144
  xObjectApiKey !== prevXObjectApiKey ||
132
- !isEqual(fields, prevFields)
145
+ !isEqual(fields, prevFields) ||
146
+ page !== prevPage ||
147
+ pageSize !== prevPageSize
133
148
  ) {
134
149
  if (xObjectApiKey) {
135
150
  // 先加载字段列表,等待完成后再加载数据,确保字段信息已更新
136
151
  await this.loadFieldList();
137
- this.loadData();
152
+ this.loadData(page, pageSize);
138
153
  } else {
139
154
  this.setState({
140
155
  dataSource: [],
@@ -201,23 +216,37 @@ export default class SimpleTable extends BaseCmp<
201
216
 
202
217
  /**
203
218
  * 加载表格数据
219
+ * @param page 页码,默认为 1
220
+ * @param pageSize 每页条数,默认为 10
204
221
  */
205
222
  @NeoEvent.function
206
- async loadData() {
223
+ async loadData(page = 1, pageSize = 10) {
207
224
  const { xObjectApiKey } = this.props.xObjectDataApi || {};
208
225
  if (!xObjectApiKey) return;
209
226
 
227
+ const curPage = page ?? 1;
228
+ const curPageSize = pageSize ?? 10;
229
+
210
230
  this.setState({ loading: true, error: null });
211
231
 
212
232
  try {
213
- // 获取所有字段的 API Key
214
- const result = await xObject.query(this.props.xObjectDataApi);
233
+ const result = await xObject.query({
234
+ ...this.props.xObjectDataApi,
235
+ page: curPage,
236
+ pageSize: curPageSize,
237
+ });
215
238
 
216
239
  if (result && result.status) {
217
240
  const records = result.data || [];
241
+ const totalSize = result.totalSize || 0;
218
242
 
219
243
  this.setState({
220
244
  dataSource: records,
245
+ pagination: {
246
+ current: curPage,
247
+ pageSize: curPageSize,
248
+ total: totalSize,
249
+ },
221
250
  loading: false,
222
251
  });
223
252
  } else {
@@ -234,6 +263,13 @@ export default class SimpleTable extends BaseCmp<
234
263
  }
235
264
  }
236
265
 
266
+ /**
267
+ * 处理表格分页变化
268
+ */
269
+ handleTableChange(pagination: any) {
270
+ this.loadData(pagination.current, pagination.pageSize);
271
+ }
272
+
237
273
  /**
238
274
  * 渲染组件
239
275
  * @returns 组件 JSX 元素
@@ -244,21 +280,22 @@ export default class SimpleTable extends BaseCmp<
244
280
  dataSource,
245
281
  loading,
246
282
  error,
283
+ pagination,
247
284
  } = this.state;
248
- const { className, title: propsTitle } = this.props;
285
+ const { className, title: propsTitle, data: amisData } = this.props;
249
286
  const { xObjectApiKey } = this.props.xObjectDataApi || {};
250
287
  const columns = this.generateColumns();
251
-
288
+ // const curAmisData = amisData || {};
289
+ // const systemInfo = curAmisData.__NeoSystemInfo || {};
290
+
252
291
  // 优先使用 props.title,其次使用 state.title,最后使用默认值
253
292
  const displayTitle = propsTitle || stateTitle || '数据表格';
254
293
 
255
- console.log('this.props:', this.props);
256
-
257
294
  return (
258
295
  <div className={`simpleTable__c ${className}`}>
259
296
  <div className="table-wrapper">
260
297
  <div className="panel-header">
261
- <h3>{displayTitle}</h3>
298
+ <div className="panel-header-text">{displayTitle}</div>
262
299
  </div>
263
300
  <div className="table-container">
264
301
  <Spin spinning={loading} tip="加载数据中...">
@@ -270,6 +307,14 @@ export default class SimpleTable extends BaseCmp<
270
307
  <div style={{ color: '#ff4d4f', marginBottom: 8 }}>
271
308
  {error}
272
309
  </div>
310
+ <Button
311
+ type="primary"
312
+ onClick={() =>
313
+ this.loadData(pagination.current, pagination.pageSize)
314
+ }
315
+ >
316
+ 重新加载
317
+ </Button>
273
318
  </div>
274
319
  }
275
320
  />
@@ -279,7 +324,14 @@ export default class SimpleTable extends BaseCmp<
279
324
  columns={columns}
280
325
  dataSource={dataSource}
281
326
  rowKey="id"
282
- pagination={false}
327
+ pagination={{
328
+ ...pagination,
329
+ showSizeChanger: true,
330
+ showQuickJumper: true,
331
+ showTotal: (total, range) =>
332
+ `第 ${range[0]}-${range[1]} 条/共 ${total} 条`,
333
+ }}
334
+ onChange={this.handleTableChange}
283
335
  scroll={{ x: 'max-content' }}
284
336
  />
285
337
  )}
@@ -290,4 +342,3 @@ export default class SimpleTable extends BaseCmp<
290
342
  );
291
343
  }
292
344
  }
293
-
@@ -16,7 +16,8 @@ export class SimpleTableModel {
16
16
  label: string = '实体数据表格(简化版)';
17
17
 
18
18
  /** 组件描述,用于设置在编辑器左侧组件面板中展示的描述 */
19
- description: string = '基于 XObject 的数据表格组件,仅支持数据展示,不支持增删改查操作';
19
+ description: string =
20
+ '基于 XObject 实现的数据表格组件,仅支持数据展示,不支持增删改查操作';
20
21
 
21
22
  /** 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示 */
22
23
  // tags: string[] = ['自定义组件'];
@@ -34,9 +35,9 @@ export class SimpleTableModel {
34
35
  */
35
36
  targetPage: string[] = ['all'];
36
37
 
37
- /**
38
+ /**
38
39
  * 用于设置组件支持的终端类型
39
- *
40
+ *
40
41
  * 当前 NeoCRM 平台存在的终端类型:
41
42
  * web: 网页端
42
43
  * mobile: 移动端
@@ -45,10 +46,18 @@ export class SimpleTableModel {
45
46
 
46
47
  /** 初次插入页面的默认属性数据 */
47
48
  defaultComProps = {
48
- title: '合同数据',
49
+ title: '联系人列表',
49
50
  xObjectDataApi: {
50
- xObjectApiKey: 'customContact__c',
51
- fields: ['name', 'phone__c'],
51
+ xObjectApiKey: 'contact',
52
+ fields: [
53
+ 'entityType',
54
+ 'accountId',
55
+ 'post',
56
+ 'mobile',
57
+ 'email',
58
+ 'address',
59
+ 'wxUserType',
60
+ ],
52
61
  },
53
62
  };
54
63
 
@@ -77,10 +86,6 @@ export class SimpleTableModel {
77
86
  type: 'xObjectDataApi', // 用于获取实体业务数据列表的配置项
78
87
  name: 'xObjectDataApi',
79
88
  label: '实体数据源',
80
- value: {
81
- xObjectApiKey: 'customContact__c',
82
- fields: ['name', 'phone__c'],
83
- },
84
89
  placeholder: '请选择实体数据源',
85
90
  custom: true,
86
91
  },
@@ -88,4 +93,3 @@ export class SimpleTableModel {
88
93
  }
89
94
 
90
95
  export default SimpleTableModel;
91
-
@@ -1,26 +1,27 @@
1
1
  .simpleTable__c {
2
+ background: #fff;
3
+ border-radius: 8px;
4
+
2
5
  .table-wrapper {
3
- border: 1px solid #ddd;
4
- border-radius: 4px;
6
+ padding: 8px 12px;
5
7
  display: flex;
6
8
  flex-direction: column;
7
9
  overflow: hidden;
8
10
  }
9
11
 
10
12
  .panel-header {
11
- padding: 15px;
12
- background: #f5f5f5;
13
- border-bottom: 1px solid #ddd;
13
+ background: #fff;
14
14
  display: flex;
15
15
  justify-content: space-between;
16
- align-items: center;
17
-
18
- h3 {
19
- margin: 0;
20
- font-size: 16px;
21
- font-weight: 600;
22
- color: #262626;
23
- }
16
+ align-items: flex-start;
17
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto,
18
+ 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
19
+ font-size: 16px;
20
+ font-weight: 500;
21
+ line-height: 1.4;
22
+ letter-spacing: 0.08em;
23
+ color: #1f1f1f;
24
+ padding: 8px 0;
24
25
  }
25
26
 
26
27
  .table-container {
@@ -30,7 +31,7 @@
30
31
  .ant-table {
31
32
  .ant-table-thead > tr > th {
32
33
  background-color: #f9f9f9;
33
- font-weight: 600;
34
+ font-weight: 500;
34
35
  color: #262626;
35
36
  border-bottom: 1px solid #eee;
36
37
  padding: 10px;
@@ -38,6 +39,7 @@
38
39
  font-size: 13px;
39
40
  position: sticky;
40
41
  top: 0;
42
+ z-index: 1;
41
43
  }
42
44
 
43
45
  .ant-table-tbody > tr > td {
@@ -73,15 +75,32 @@
73
75
  }
74
76
  }
75
77
 
76
- // 响应式设计
77
- @media (max-width: 768px) {
78
- .panel-header {
79
- padding: 12px;
78
+ .ant-btn {
79
+ border-radius: 4px;
80
+ font-weight: 500;
81
+ transition: all 0.3s;
80
82
 
81
- h3 {
82
- font-size: 14px;
83
+ &.ant-btn-primary {
84
+ background: #1890ff;
85
+ border-color: #1890ff;
86
+
87
+ &:hover {
88
+ background: #40a9ff;
89
+ border-color: #40a9ff;
90
+ }
91
+
92
+ &:focus {
93
+ background: #40a9ff;
94
+ border-color: #40a9ff;
83
95
  }
84
96
  }
97
+ }
98
+
99
+ @media (max-width: 768px) {
100
+ .panel-header {
101
+ flex-wrap: wrap;
102
+ gap: 8px;
103
+ }
85
104
 
86
105
  .table-container {
87
106
  .ant-table {
@@ -95,14 +114,6 @@
95
114
  }
96
115
 
97
116
  @media (max-width: 576px) {
98
- .panel-header {
99
- padding: 10px;
100
-
101
- h3 {
102
- font-size: 13px;
103
- }
104
- }
105
-
106
117
  .table-container {
107
118
  .ant-table {
108
119
  .ant-table-thead > tr > th,
@@ -114,4 +125,3 @@
114
125
  }
115
126
  }
116
127
  }
117
-
@@ -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.21",
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 {
@@ -14,7 +14,7 @@
14
14
 
15
15
  .funnel-title {
16
16
  font-size: 14px;
17
- font-weight: 600;
17
+ font-weight: 500;
18
18
  margin: 0;
19
19
  }
20
20
 
@@ -103,7 +103,7 @@
103
103
 
104
104
  &__placeholderTitle {
105
105
  font-size: 13px;
106
- font-weight: 600;
106
+ font-weight: 500;
107
107
  line-height: 1.4;
108
108
  margin-bottom: 6px;
109
109
  color: #334155;
@@ -87,7 +87,7 @@ $background-color: #f5f6fa;
87
87
  }
88
88
 
89
89
  &__baseline {
90
- font-weight: 600;
90
+ font-weight: 500;
91
91
  font-size: 12px;
92
92
  color: #888;
93
93
  margin-bottom: 10px;
@@ -104,7 +104,7 @@ $background-color: #f5f6fa;
104
104
  }
105
105
 
106
106
  &__section-title {
107
- font-weight: 600;
107
+ font-weight: 500;
108
108
  margin-bottom: 4px;
109
109
  }
110
110
 
@@ -190,6 +190,6 @@ $background-color: #f5f6fa;
190
190
 
191
191
  &__to {
192
192
  color: #ec4899;
193
- font-weight: 600;
193
+ font-weight: 500;
194
194
  }
195
195
  }
@@ -44,7 +44,7 @@
44
44
  h3 {
45
45
  margin: 0;
46
46
  font-size: 14px;
47
- font-weight: 600;
47
+ font-weight: 500;
48
48
  color: #262626;
49
49
  }
50
50
 
@@ -79,7 +79,7 @@
79
79
  .ant-table {
80
80
  .ant-table-thead > tr > th {
81
81
  background-color: #f9f9f9;
82
- font-weight: 600;
82
+ font-weight: 500;
83
83
  color: #262626;
84
84
  border-bottom: 1px solid #eee;
85
85
  padding: 10px;
@@ -42,7 +42,7 @@
42
42
 
43
43
  .stage-name {
44
44
  color: #6366f1;
45
- font-weight: 600;
45
+ font-weight: 500;
46
46
  }
47
47
  }
48
48
  }
@@ -16,7 +16,7 @@
16
16
 
17
17
  .chart-title {
18
18
  font-size: 14px;
19
- font-weight: 600;
19
+ font-weight: 500;
20
20
  margin: 0;
21
21
  }
22
22
 
@@ -99,7 +99,7 @@
99
99
  }
100
100
 
101
101
  .stage-time-value {
102
- font-weight: 600;
102
+ font-weight: 500;
103
103
  }
104
104
 
105
105
  .stage-time-bar {
@@ -52,7 +52,7 @@
52
52
  "@types/react-dom": "^16.9.15",
53
53
  "husky": "^4.2.5",
54
54
  "lint-staged": "^10.2.9",
55
- "neo-cmp-cli": "^1.13.21",
55
+ "neo-cmp-cli": "^1.13.23",
56
56
  "prettier": "^2.0.5"
57
57
  },
58
58
  "overrides": {
@@ -16,7 +16,7 @@ export class CreateFormModel {
16
16
  label: string = '新增数据表单';
17
17
 
18
18
  /** 组件描述,用于设置在编辑器左侧组件面板中展示的描述 */
19
- description: string = '基于 XObject 的对象表单组件,用于新增数据';
19
+ description: string = '用于创建实体业务数据的表单组件';
20
20
 
21
21
  /** 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示 */
22
22
  // tags: string[] = ['自定义组件'];
@@ -12,7 +12,7 @@ export class NeoEntityGridModel {
12
12
  label: string = '自定义筛选列表';
13
13
 
14
14
  // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
- description: string = '数据列表示例: 自定义表单筛选 + 大列表实时响应联动';
15
+ description: string = '基于平台 NeoEntityGrid 实现的数据列表示例: 支持自定义表单筛选 + 大列表实时响应联动';
16
16
 
17
17
  // 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示
18
18
  // tags: string[] = ['自定义组件'];
@@ -42,7 +42,7 @@ export class NeoEntityGridModel {
42
42
 
43
43
  // 初次插入页面的默认属性数据
44
44
  defaultComProps = {
45
- objectApiKey: 'customContact__c',
45
+ objectApiKey: 'account',
46
46
  funPermission: true, // 设计器添加时绕过职能权限检查,确保能正常渲染列表
47
47
  hiddenHeader: false,
48
48
  showView: true,
@@ -1,13 +1,9 @@
1
- :root {
2
- --padding-bottom: 12px;
3
- }
4
-
5
1
  .entityGrid2__c {
6
2
  position: relative;
7
3
  box-sizing: border-box;
8
4
 
9
5
  /* border-bottom: 1px solid #ececec; */
10
6
  // margin: 6px 12px;
11
- padding: 6px var(--padding-bottom);
7
+ padding: 6px 12px;
12
8
  background-color: #fff;
13
9
  }
@@ -13,7 +13,9 @@ export class NeoEntityGridModel {
13
13
 
14
14
  // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
15
  description: string =
16
- '自定义Picker列表: Picker 模式的数据选择列表,支持在其他自定义组件中使用。支持单选和多选。';
16
+ '基于平台 NeoEntityGrid 实现的自定义Picker列表: Picker 列表模式的列表数据选择器,支持在其他自定义组件中使用,支持单选和多选。不支持在页面设计器端直接使用。';
17
+
18
+ exposedToDesigner: boolean = false; // 不在设计器中显示,仅作为子组件使用
17
19
 
18
20
  // 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示
19
21
  // tags: string[] = ['自定义组件'];
@@ -1,14 +1,9 @@
1
- :root {
2
- --padding-bottom: 12px;
3
- }
4
-
5
1
  .entityGrid3__c {
6
2
  position: relative;
7
3
  box-sizing: border-box;
8
4
 
9
5
  /* border-bottom: 1px solid #ececec; */
10
- // margin: 6px 12px;
11
- padding: 6px var(--padding-bottom);
6
+ margin: 6px 12px;
12
7
  background-color: #fff;
13
8
  }
14
9