neo-cmp-cli 1.13.19 → 1.13.20

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 (29) hide show
  1. package/README.md +206 -609
  2. package/dist/neo/neoRequire.js +1 -1
  3. package/dist/package.json.js +1 -1
  4. package/package.json +1 -2
  5. package/template/asset-manage-template/package.json +2 -2
  6. package/template/echarts-custom-cmp-template/package.json +1 -1
  7. package/template/empty-custom-cmp-template/package.json +2 -2
  8. package/template/neo-bi-cmps/package.json +2 -2
  9. package/template/neo-custom-cmp-template/package.json +2 -2
  10. package/template/neo-custom-cmp-template/src/components/customApi__c/README.md +90 -0
  11. package/template/neo-custom-cmp-template/src/components/customApi__c/index.tsx +184 -0
  12. package/template/neo-custom-cmp-template/src/components/customApi__c/model.ts +53 -0
  13. package/template/neo-custom-cmp-template/src/components/customApi__c/style.scss +116 -0
  14. package/template/neo-custom-cmp-template/src/components/entityTable__c/index.tsx +5 -1
  15. package/template/neo-custom-cmp-template/src/components/simpleCmp__c/index.tsx +4 -1
  16. package/template/neo-h5-cmps/neo.config.js +1 -1
  17. package/template/neo-h5-cmps/package.json +2 -2
  18. package/template/neo-h5-cmps/src/components/entityList__c/index.tsx +0 -1
  19. package/template/neo-order-cmps/package.json +1 -1
  20. package/template/neo-pipeline-cmps/package.json +1 -1
  21. package/template/neo-pipeline-cmps/src/components/showHealthResult__c/index.tsx +2 -1
  22. package/template/neo-web-entity-grid/package.json +1 -1
  23. package/template/neo-web-form/package.json +2 -2
  24. package/template/react-custom-cmp-template/package.json +1 -1
  25. package/docs/H5/347/253/257 NeoEntityList /344/275/277/347/224/250/350/257/264/346/230/216.md" +0 -293
  26. package/docs/Web/347/253/257 NeoEntityGrid /344/275/277/347/224/250/350/257/264/346/230/216.md" +0 -1206
  27. package/docs//345/217/257/347/224/250/345/261/236/346/200/247/351/205/215/347/275/256/351/241/271.md +0 -801
  28. package/docs//351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243/forward.zip +0 -0
  29. package/docs//351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243//350/207/252/345/256/232/344/271/211API:/351/200/232/347/224/250/344/273/243/347/220/206/346/216/245/345/217/243/344/275/277/347/224/250/350/257/264/346/230/216.md +0 -13
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash");var e,n;exports.__require=function(){if(n)return e;n=1;const s=o,m={react:"^16.13.1","react-dom":"^16.13.1",mobx:"^6.3.0","mobx-react":"^7.0.0","mobx-state-tree":"^5.4.0",axios:"^1.7.0",classnames:"^2.3.2",qs:"^6.11.0",lodash:"^4.17.23",amis:"^1.1.5","neo-ui-component-web":"^1.0.0","neo-ui-component-h5":"^1.0.0","neo-ui-common":"^1.0.0"};return e={initNeoRequire:()=>{window.neoRequire||(window.neoRequire=o=>window.__NeoCommonModules[o]||window[o])},addNeoCommonModules:o=>{if(window.__NeoCommonModules||(window.__NeoCommonModules={}),isPlainObject(o)){Object.keys(o).forEach(e=>{const n=o[e],s=window.__NeoCommonModules[e];if(!Object.isFrozen(s)&&s&&Object.keys(s).length<3)try{window.__NeoCommonModules[e]=Object.assign(s,n),void 0!==n.__esModule&&(window.__NeoCommonModules[e].__esModule=n.__esModule),void 0!==n.default&&(window.__NeoCommonModules[e].default=n.default)}catch(o){console.warn(`window.__NeoCommonModules[${e}] Object.assign error:`,o),window.__NeoCommonModules[e]=n}else window.__NeoCommonModules[e]=n})}},addNeoRemoteDeps:o=>{window.__NeoCommonModules||(window.__NeoCommonModules={}),window.__NeoCommonModules.__neoRemoteDeps||(window.__NeoCommonModules.__neoRemoteDeps={}),s.isPlainObject(o)&&(window.__NeoCommonModules.__neoRemoteDeps=Object.assign(window.__NeoCommonModules.__neoRemoteDeps,o))},getExternalsByNeoCommonModules:o=>{const e={};return Object.keys(m).forEach(o=>{e[o]=`commonjs ${o}`}),o&&o.length>0&&o.forEach(o=>{e[o]=`commonjs ${o}`}),e}}};
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("lodash");var e,n;exports.__require=function(){if(n)return e;n=1;const s=o,d={react:"^16.13.1","react-dom":"^16.13.1",mobx:"^6.3.0","mobx-react":"^7.0.0","mobx-state-tree":"^5.4.0",axios:"^1.7.0",classnames:"^2.3.2",qs:"^6.11.0",lodash:"^4.17.23",amis:"^1.1.5",antd:"4.9.4","antd-mobile":"2.3.4","@ant-design/icons":"^4.8.0","neo-ui-component-web":"^1.0.0","neo-ui-component-h5":"^1.0.0","neo-ui-common":"^1.0.0"};return e={initNeoRequire:()=>{window.neoRequire||(window.neoRequire=o=>window.__NeoCommonModules[o]||window[o])},addNeoCommonModules:o=>{if(window.__NeoCommonModules||(window.__NeoCommonModules={}),isPlainObject(o)){Object.keys(o).forEach(e=>{const n=o[e],s=window.__NeoCommonModules[e];if(!Object.isFrozen(s)&&s&&Object.keys(s).length<3)try{window.__NeoCommonModules[e]=Object.assign(s,n),void 0!==n.__esModule&&(window.__NeoCommonModules[e].__esModule=n.__esModule),void 0!==n.default&&(window.__NeoCommonModules[e].default=n.default)}catch(o){console.warn(`window.__NeoCommonModules[${e}] Object.assign error:`,o),window.__NeoCommonModules[e]=n}else window.__NeoCommonModules[e]=n})}},addNeoRemoteDeps:o=>{window.__NeoCommonModules||(window.__NeoCommonModules={}),window.__NeoCommonModules.__neoRemoteDeps||(window.__NeoCommonModules.__neoRemoteDeps={}),s.isPlainObject(o)&&(window.__NeoCommonModules.__neoRemoteDeps=Object.assign(window.__NeoCommonModules.__neoRemoteDeps,o))},getExternalsByNeoCommonModules:o=>{const e={};return Object.keys(d).forEach(o=>{e[o]=`commonjs ${o}`}),o&&o.length>0&&o.forEach(o=>{e[o]=`commonjs ${o}`}),e}}};
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.13.19";const o={version:e};exports.default=o,exports.version=e;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var e="1.13.20";const o={version:e};exports.default=o,exports.version=e;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-cmp-cli",
3
- "version": "1.13.19",
3
+ "version": "1.13.20",
4
4
  "description": "Neo 自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -19,7 +19,6 @@
19
19
  "files": [
20
20
  "bin/*",
21
21
  "dist/*",
22
- "docs/*",
23
22
  "template/*"
24
23
  ],
25
24
  "husky": {
@@ -41,7 +41,7 @@
41
41
  "axios": "^1.7.0",
42
42
  "antd": "4.9.4",
43
43
  "lodash": "^4.17.21",
44
- "neo-open-api": "^1.2.7",
44
+ "neo-open-api": "^1.2.9",
45
45
  "tslib": "2.3.0",
46
46
  "echarts": "^5.5.1",
47
47
  "moment": "^2.30.1"
@@ -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.17",
55
+ "neo-cmp-cli": "^1.13.20",
56
56
  "husky": "^4.2.5",
57
57
  "lint-staged": "^10.2.9",
58
58
  "prettier": "^2.0.5",
@@ -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.18",
51
+ "neo-cmp-cli": "^1.13.20",
52
52
  "husky": "^4.2.5",
53
53
  "lint-staged": "^10.2.9",
54
54
  "prettier": "^2.0.5",
@@ -34,14 +34,14 @@
34
34
  "react": "^16.9.0",
35
35
  "react-dom": "^16.9.0",
36
36
  "antd": "4.9.4",
37
- "neo-open-api": "^1.2.7"
37
+ "neo-open-api": "^1.2.9"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@commitlint/cli": "^18.0.0",
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.17",
44
+ "neo-cmp-cli": "^1.13.20",
45
45
  "husky": "^4.2.5",
46
46
  "lint-staged": "^10.2.9",
47
47
  "prettier": "^2.0.5"
@@ -38,7 +38,7 @@
38
38
  "echarts": "^5.6.0",
39
39
  "lodash": "^4.17.21",
40
40
  "moment": "^2.30.1",
41
- "neo-open-api": "^1.2.7",
41
+ "neo-open-api": "^1.2.8",
42
42
  "neo-register": "^1.1.3",
43
43
  "react": "^16.9.0",
44
44
  "react-dom": "^16.9.0",
@@ -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.18",
56
+ "neo-cmp-cli": "^1.13.20",
57
57
  "prettier": "^2.0.5"
58
58
  },
59
59
  "overrides": {
@@ -47,7 +47,7 @@
47
47
  "axios": "^1.7.0",
48
48
  "antd": "^4.9.4",
49
49
  "lodash": "^4.17.23",
50
- "neo-open-api": "^1.2.7"
50
+ "neo-open-api": "^1.2.9"
51
51
  },
52
52
  "devDependencies": {
53
53
  "@commitlint/cli": "^18.0.0",
@@ -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.18",
58
+ "neo-cmp-cli": "^1.13.20",
59
59
  "husky": "^4.2.5",
60
60
  "lint-staged": "^10.2.9",
61
61
  "prettier": "^2.0.5"
@@ -0,0 +1,90 @@
1
+ # XObject 数据表格组件(简化版)
2
+
3
+ 基于 XObject 的数据表格组件,仅支持数据展示,表格列根据 `xObject.getDesc` 返回的 fields 动态生成。
4
+ 备注:使用 Neo Open API SDK(neo-open-api) 提供的方法实现数据对象的查询操作。
5
+
6
+ ## 功能特性
7
+
8
+ - 📊 **动态表格列**:根据 XObject 字段描述自动生成表格列
9
+ - 🔍 **数据展示**:支持展示 XObject 实体数据
10
+ - 🎨 **响应式设计**:适配不同屏幕尺寸
11
+ - ⚙️ **属性配置**:支持通过编辑器配置组件属性
12
+
13
+ ## 组件属性
14
+
15
+ | 属性名 | 类型 | 默认值 | 说明 |
16
+ |--------|------|--------|------|
17
+ | title | string | '数据表格' | 表格标题 |
18
+ | xObjectDataApi | object | - | 实体数据源配置 |
19
+ | xObjectDataApi.xObjectApiKey | string | '' | 数据对象的 API Key |
20
+ | xObjectDataApi.fields | string[] | [] | 要显示的字段列表 |
21
+
22
+ ## 使用方法
23
+
24
+ ### 1. 在编辑器中使用
25
+
26
+ 1. 从组件面板拖拽 "实体数据表格(简化版)" 组件到页面
27
+ 2. 在右侧属性面板中选择要操作的数据对象
28
+ 3. 配置要显示的字段(可选)
29
+ 4. 保存并预览
30
+
31
+ ### 2. 代码中使用
32
+
33
+ ```tsx
34
+ import SimpleTable from './components/simpleTable__c';
35
+
36
+ // 使用组件
37
+ <SimpleTable
38
+ xObjectDataApi={{
39
+ xObjectApiKey: 'customContact__c',
40
+ fields: ['name', 'phone__c'],
41
+ }}
42
+ />
43
+ ```
44
+
45
+ ## 技术实现
46
+
47
+ ### 核心依赖
48
+
49
+ - **Ant Design**:UI 组件库
50
+ - **React**:前端框架
51
+ - **TypeScript**:类型支持
52
+
53
+ ### 数据流程
54
+
55
+ 1. **初始化**:组件挂载时获取字段描述
56
+ 2. **列生成**:根据字段描述动态生成表格列
57
+ 3. **数据加载**:使用 `xObject.query` 获取数据列表
58
+
59
+ ## 样式定制
60
+
61
+ 组件提供了完整的 SCSS 样式文件,支持以下定制:
62
+
63
+ - 表格样式(边框、悬停效果等)
64
+ - 响应式设计(移动端适配)
65
+
66
+ ## 注意事项
67
+
68
+ 1. **权限要求**:确保用户有对应 XObject 的读取权限
69
+ 2. **字段类型**:支持所有基础字段类型的展示
70
+ 3. **错误处理**:组件内置了完善的错误处理和用户提示
71
+
72
+ ## 与完整版组件的区别
73
+
74
+ 本简化版组件相比完整版 `entityTable__c` 组件:
75
+
76
+ - ❌ **不支持新增**:移除了新增记录功能
77
+ - ❌ **不支持编辑**:移除了编辑记录功能
78
+ - ❌ **不支持删除**:移除了删除记录功能
79
+ - ❌ **不支持刷新**:移除了手动刷新按钮
80
+ - ❌ **不支持分页**:移除了分页功能,显示所有数据
81
+ - ✅ **仅支持展示**:专注于数据展示功能
82
+
83
+ ## 扩展开发
84
+
85
+ 如需扩展功能,可以:
86
+
87
+ 1. **添加字段类型支持**:在 `generateColumns()` 方法中添加字段格式化逻辑
88
+ 2. **自定义样式**:修改 `style.scss` 文件定制组件外观
89
+ 3. **添加排序功能**:扩展表格功能支持列排序
90
+
@@ -0,0 +1,184 @@
1
+ /**
2
+ * @file 自定义 API(通用代理)示例组件
3
+ * @description 通过平台「通用代理」自定义 API 转发请求,获取第三方列表数据并以表格展示
4
+ */
5
+ import * as React from 'react';
6
+ import { Table, Spin, Empty } from 'antd';
7
+ // @ts-ignore
8
+ import { customApi } from 'neo-open-api';
9
+ // @ts-ignore
10
+ import { BaseCmp } from 'neo-ui-common';
11
+ // @ts-ignore
12
+ import { NeoEvent } from 'neo-ui-common';
13
+ // @ts-ignore
14
+ import isEqual from 'lodash/isEqual';
15
+
16
+ import './style.scss';
17
+
18
+ const DEFAULT_POSTS_URL = 'https://jsonplaceholder.typicode.com/posts';
19
+ /**
20
+ * 其他可测试的接口
21
+ 常用列表接口(直接访问):
22
+ 文章列表:https://jsonplaceholder.typicode.com/posts
23
+ 用户列表:https://jsonplaceholder.typicode.com/users
24
+ 待办列表:https://jsonplaceholder.typicode.com/todos
25
+ 评论列表:https://jsonplaceholder.typicode.com/comments
26
+ */
27
+
28
+ interface CustomApiCmpProps {
29
+ fetchConfig?: any; // 自定义API配置
30
+ data?: any;
31
+ className?: string;
32
+ title?: string;
33
+ }
34
+
35
+ interface CustomApiCmpState {
36
+ dataSource: any[];
37
+ loading: boolean;
38
+ error: string | null;
39
+ }
40
+
41
+ const POST_COLUMNS = [
42
+ { title: '用户 ID', dataIndex: 'userId', key: 'userId', width: 88 },
43
+ { title: '标题', dataIndex: 'title', key: 'title', ellipsis: true },
44
+ { title: '正文', dataIndex: 'body', key: 'body', ellipsis: true },
45
+ ];
46
+
47
+ function normalizePostsResult(result: any): { rows: any[]; errorMsg?: string } {
48
+ if (result === null || result === undefined) {
49
+ return { rows: [], errorMsg: '接口无返回' };
50
+ }
51
+ // SDK / 通用代理有时直接将第三方响应解析为数组
52
+ if (Array.isArray(result)) {
53
+ return { rows: result };
54
+ }
55
+ if (result.status === false) {
56
+ return { rows: [], errorMsg: result.msg || '请求失败' };
57
+ }
58
+ const raw = result.data;
59
+ if (Array.isArray(raw)) {
60
+ return { rows: raw };
61
+ }
62
+ if (raw && Array.isArray(raw.records)) {
63
+ return { rows: raw.records };
64
+ }
65
+ if (raw && Array.isArray(raw.list)) {
66
+ return { rows: raw.list };
67
+ }
68
+ return { rows: [], errorMsg: '返回数据格式不是列表' };
69
+ }
70
+
71
+ export default class CustomApiCmp extends BaseCmp<
72
+ CustomApiCmpProps,
73
+ CustomApiCmpState
74
+ > {
75
+ constructor(props: CustomApiCmpProps) {
76
+ super(props);
77
+ this.state = {
78
+ dataSource: [],
79
+ loading: false,
80
+ error: null,
81
+ };
82
+ this.loadData = this.loadData.bind(this);
83
+ }
84
+
85
+ componentDidMount() {
86
+ this.loadData();
87
+ }
88
+
89
+ componentDidUpdate(prevProps: CustomApiCmpProps) {
90
+ if (!isEqual(prevProps.fetchConfig, this.props.fetchConfig)) {
91
+ this.loadData();
92
+ }
93
+ }
94
+
95
+ @NeoEvent.function
96
+ async loadData() {
97
+ const { fetchConfig } = this.props;
98
+ const targetUrl = DEFAULT_POSTS_URL;
99
+
100
+ this.setState({ loading: true, error: null });
101
+
102
+ let result: any = {};
103
+
104
+ try {
105
+ // 通过自定义API获取数据
106
+ if (fetchConfig) {
107
+ // 根据用户配置的自定义API相关数据获取数据
108
+ result = await customApi.run(fetchConfig);
109
+ const { rows, errorMsg } = normalizePostsResult(result);
110
+ if (errorMsg) {
111
+ this.setState({ dataSource: [], loading: false, error: errorMsg });
112
+ return;
113
+ }
114
+ this.setState({ dataSource: rows, loading: false, error: null });
115
+ return;
116
+ } else {
117
+ result = await customApi.run({
118
+ apiUrl: '/rest/data/v2.0/scripts/api/proxy/forward', // 平台通用接口代理
119
+ methodType: 'POST',
120
+ data: {
121
+ url: targetUrl,
122
+ method: 'GET',
123
+ data: {test: 333},
124
+ },
125
+ });
126
+ }
127
+
128
+ const { rows, errorMsg } = normalizePostsResult(result);
129
+ if (errorMsg) {
130
+ this.setState({ dataSource: [], loading: false, error: errorMsg });
131
+ return;
132
+ }
133
+ this.setState({ dataSource: rows, loading: false, error: null });
134
+ } catch (error: any) {
135
+ this.setState({
136
+ dataSource: [],
137
+ loading: false,
138
+ error: error?.message || '获取数据失败',
139
+ });
140
+ }
141
+ }
142
+
143
+ render() {
144
+ const { dataSource, loading, error } = this.state;
145
+ const { className, title: propsTitle } = this.props;
146
+ const displayTitle = propsTitle || '自定义 API 示例';
147
+
148
+ console.log('this.props:', this.props);
149
+
150
+ return (
151
+ <div className={`customApi__c ${className || ''}`}>
152
+ <div className="table-wrapper">
153
+ <div className="panel-header">
154
+ <h3>{displayTitle}</h3>
155
+ </div>
156
+ <div className="table-container">
157
+ <Spin spinning={loading} tip="加载数据中...">
158
+ {error ? (
159
+ <Empty
160
+ image={Empty.PRESENTED_IMAGE_SIMPLE}
161
+ description={
162
+ <div>
163
+ <div style={{ color: '#ff4d4f', marginBottom: 8 }}>
164
+ {error}
165
+ </div>
166
+ </div>
167
+ }
168
+ />
169
+ ) : (
170
+ <Table
171
+ columns={POST_COLUMNS}
172
+ dataSource={dataSource}
173
+ rowKey="id"
174
+ pagination={{ pageSize: 10, showSizeChanger: true }}
175
+ scroll={{ y: 'max-content' }}
176
+ />
177
+ )}
178
+ </Spin>
179
+ </div>
180
+ </div>
181
+ </div>
182
+ );
183
+ }
184
+ }
@@ -0,0 +1,53 @@
1
+ /**
2
+ * @file 自定义 API(通用代理)示例 — 编辑器描述
3
+ */
4
+ export class CustomApiCmpModel {
5
+ label: string = '自定义API示例';
6
+
7
+ description: string =
8
+ '通过通用代理 customApi.run 请求 JSONPlaceholder posts 并以表格展示';
9
+
10
+ iconUrl: string = 'https://custom-widgets.bj.bcebos.com/table.svg';
11
+
12
+ targetPage: string[] = ['all'];
13
+
14
+ targetDevice: string = 'web';
15
+
16
+ defaultComProps = {
17
+ title: '自定义 API 示例',
18
+ fetchConfig: {
19
+ apiUrl: '/rest/data/v2.0/scripts/api/proxy/forward',
20
+ methodType: 'POST',
21
+ data: {
22
+ url: 'https://jsonplaceholder.typicode.com/posts',
23
+ method: 'GET',
24
+ data: {test: 111},
25
+ },
26
+ },
27
+ };
28
+
29
+ functions = [
30
+ {
31
+ apiKey: 'loadData',
32
+ label: '刷新表格',
33
+ helpTextKey: '刷新当前表格数据',
34
+ },
35
+ ];
36
+
37
+ propsSchema = [
38
+ {
39
+ type: 'panelInput',
40
+ name: 'title',
41
+ label: '表格标题',
42
+ placeholder: '请输入表格标题',
43
+ },
44
+ {
45
+ type: 'customApi',
46
+ name: 'fetchConfig',
47
+ label: '自定义API',
48
+ description: '请选择自定义API;Data 中 Value 可填 JSON。',
49
+ },
50
+ ];
51
+ }
52
+
53
+ export default CustomApiCmpModel;
@@ -0,0 +1,116 @@
1
+ .customApi__c {
2
+ .table-wrapper {
3
+ border: 1px solid #ddd;
4
+ border-radius: 4px;
5
+ display: flex;
6
+ flex-direction: column;
7
+ overflow: hidden;
8
+ }
9
+
10
+ .panel-header {
11
+ padding: 15px;
12
+ background: #f5f5f5;
13
+ border-bottom: 1px solid #ddd;
14
+ display: flex;
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
+ }
24
+ }
25
+
26
+ .table-container {
27
+ flex: 1;
28
+ overflow-y: auto;
29
+
30
+ .ant-table {
31
+ .ant-table-thead > tr > th {
32
+ background-color: #f9f9f9;
33
+ font-weight: 600;
34
+ color: #262626;
35
+ border-bottom: 1px solid #eee;
36
+ padding: 10px;
37
+ text-align: left;
38
+ font-size: 13px;
39
+ position: sticky;
40
+ top: 0;
41
+ }
42
+
43
+ .ant-table-tbody > tr > td {
44
+ border-bottom: 1px solid #eee;
45
+ padding: 10px;
46
+ text-align: left;
47
+ font-size: 13px;
48
+ }
49
+
50
+ .ant-table-tbody > tr:hover > td {
51
+ background-color: #f5f5f5;
52
+ }
53
+ }
54
+
55
+ .ant-empty {
56
+ padding: 40px 0;
57
+
58
+ .ant-empty-description {
59
+ color: #8c8c8c;
60
+ font-size: 14px;
61
+ }
62
+ }
63
+ }
64
+
65
+ .ant-spin {
66
+ .ant-spin-dot {
67
+ font-size: 20px;
68
+ }
69
+
70
+ .ant-spin-text {
71
+ color: #8c8c8c;
72
+ font-size: 14px;
73
+ }
74
+ }
75
+
76
+ // 响应式设计
77
+ @media (max-width: 768px) {
78
+ .panel-header {
79
+ padding: 12px;
80
+
81
+ h3 {
82
+ font-size: 14px;
83
+ }
84
+ }
85
+
86
+ .table-container {
87
+ .ant-table {
88
+ .ant-table-thead > tr > th,
89
+ .ant-table-tbody > tr > td {
90
+ padding: 8px 12px;
91
+ font-size: 12px;
92
+ }
93
+ }
94
+ }
95
+ }
96
+
97
+ @media (max-width: 576px) {
98
+ .panel-header {
99
+ padding: 10px;
100
+
101
+ h3 {
102
+ font-size: 13px;
103
+ }
104
+ }
105
+
106
+ .table-container {
107
+ .ant-table {
108
+ .ant-table-thead > tr > th,
109
+ .ant-table-tbody > tr > td {
110
+ padding: 6px 8px;
111
+ font-size: 12px;
112
+ }
113
+ }
114
+ }
115
+ }
116
+ }
@@ -341,7 +341,11 @@ export default class EntityTable extends BaseCmp<
341
341
 
342
342
  // 对象类型字段或实际值为对象时:转为字符串展示
343
343
  column.render = (value: any) => {
344
- if (value !== null && value !== undefined && typeof value === 'object') {
344
+ if (
345
+ value !== null &&
346
+ value !== undefined &&
347
+ typeof value === 'object'
348
+ ) {
345
349
  return objectValueToString(value);
346
350
  }
347
351
  return value;
@@ -16,7 +16,10 @@ interface CustomCmpStates {
16
16
  [key: string]: any;
17
17
  }
18
18
 
19
- export default class CustomCmp extends BaseCmp<CustomCmpProps, CustomCmpStates> {
19
+ export default class CustomCmp extends BaseCmp<
20
+ CustomCmpProps,
21
+ CustomCmpStates
22
+ > {
20
23
  constructor(props: CustomCmpProps) {
21
24
  super(props);
22
25
  }
@@ -41,7 +41,7 @@ module.exports = {
41
41
  resolve("./src/assets/css/common.scss"),
42
42
  resolve("./src/assets/css/mixin.scss")
43
43
  ],
44
- ignoreNodeModules: false
44
+ ignoreNodeModules: false,
45
45
  },
46
46
  linkDebug: {},
47
47
  neoConfig: {
@@ -39,7 +39,7 @@
39
39
  "axios": "^1.7.0",
40
40
  "antd-mobile": "^2.3.3",
41
41
  "lodash": "^4.17.23",
42
- "neo-open-api": "^1.2.7",
42
+ "neo-open-api": "^1.2.8",
43
43
  "tslib": "2.3.0"
44
44
  },
45
45
  "devDependencies": {
@@ -49,7 +49,7 @@
49
49
  "@types/react": "^16.9.11",
50
50
  "@types/react-dom": "^16.9.15",
51
51
  "@types/axios": "^0.14.0",
52
- "neo-cmp-cli": "^1.13.17",
52
+ "neo-cmp-cli": "^1.13.20",
53
53
  "husky": "^4.2.5",
54
54
  "lint-staged": "^10.2.9",
55
55
  "prettier": "^2.0.5"
@@ -26,7 +26,6 @@ export default class EntityListCmp extends React.PureComponent<EntityListProps>
26
26
  <NeoEntityList
27
27
  {...restProps}
28
28
  name="entityList"
29
- entityApiKey={'customContact__c'}
30
29
  onItemClickIntercept={(data: any, entity: any) => {
31
30
  // 自定义点击处理
32
31
  console.log('点击了列表项', data, entity);
@@ -39,7 +39,7 @@
39
39
  "axios": "^1.7.0",
40
40
  "antd": "^4.9.4",
41
41
  "lodash": "^4.17.23",
42
- "neo-open-api": "^1.2.7"
42
+ "neo-open-api": "^1.2.9"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^18.0.0",
@@ -38,7 +38,7 @@
38
38
  "echarts": "^5.6.0",
39
39
  "lodash": "^4.17.21",
40
40
  "moment": "^2.30.1",
41
- "neo-open-api": "^1.2.7",
41
+ "neo-open-api": "^1.2.8",
42
42
  "neo-register": "^1.1.3",
43
43
  "react": "^16.9.0",
44
44
  "react-dom": "^16.9.0",
@@ -185,6 +185,7 @@ function buildHealthRadarOption(
185
185
  return {
186
186
  tooltip: {
187
187
  trigger: 'item',
188
+ position: 'inside',
188
189
  },
189
190
  radar: {
190
191
  indicator,
@@ -212,7 +213,7 @@ function buildHealthRadarOption(
212
213
  data: [
213
214
  {
214
215
  value: items.map((i) => i.score),
215
- name: 'Health Score',
216
+ name: 'Opportunity Health',
216
217
  areaStyle: {
217
218
  color: 'rgba(99,102,241,0.2)',
218
219
  },
@@ -37,7 +37,7 @@
37
37
  "antd": "^4.9.4",
38
38
  "axios": "^1.7.0",
39
39
  "lodash": "^4.17.23",
40
- "neo-open-api": "^1.2.7",
40
+ "neo-open-api": "^1.2.9",
41
41
  "neo-register": "^1.2.0",
42
42
  "react": "^16.9.0",
43
43
  "react-dom": "^16.9.0",