neo-cmp-cli 1.1.7 → 1.1.9

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 (65) hide show
  1. package/package.json +1 -1
  2. package/src/cmpUtils/createCommonModulesCode.js +61 -0
  3. package/src/cmpUtils/getCmpPreview.js +3 -1
  4. package/src/module/index.js +15 -0
  5. package/src/module/main.js +35 -12
  6. package/src/module/neoInitByCopy.js +12 -0
  7. package/src/neo/neoRequire.js +14 -2
  8. package/src/template/antd-custom-cmp-template/.prettierrc.js +12 -0
  9. package/src/template/antd-custom-cmp-template/README.md +47 -0
  10. package/src/template/antd-custom-cmp-template/commitlint.config.js +59 -0
  11. package/src/template/antd-custom-cmp-template/neo.config.js +115 -0
  12. package/src/template/antd-custom-cmp-template/package.json +59 -0
  13. package/src/template/antd-custom-cmp-template/public/css/base.css +283 -0
  14. package/src/template/antd-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
  15. package/src/template/antd-custom-cmp-template/public/template.html +13 -0
  16. package/src/template/antd-custom-cmp-template/src/assets/css/common.scss +127 -0
  17. package/src/template/antd-custom-cmp-template/src/assets/css/mixin.scss +47 -0
  18. package/src/template/antd-custom-cmp-template/src/components/data-dashboard/README.md +39 -0
  19. package/src/template/antd-custom-cmp-template/src/components/data-dashboard/index.tsx +462 -0
  20. package/src/template/antd-custom-cmp-template/src/components/data-dashboard/model.ts +76 -0
  21. package/src/template/antd-custom-cmp-template/src/components/data-dashboard/style.scss +1667 -0
  22. package/src/template/antd-custom-cmp-template/src/components/info-card/index.tsx +72 -0
  23. package/src/template/antd-custom-cmp-template/src/components/info-card/model.ts +78 -0
  24. package/src/template/antd-custom-cmp-template/src/components/info-card/style.scss +105 -0
  25. package/src/template/antd-custom-cmp-template/tsconfig.json +68 -0
  26. package/src/template/echarts-custom-cmp-template/.prettierrc.js +12 -0
  27. package/src/template/echarts-custom-cmp-template/README.md +91 -0
  28. package/src/template/echarts-custom-cmp-template/commitlint.config.js +59 -0
  29. package/src/template/echarts-custom-cmp-template/neo.config.js +117 -0
  30. package/src/template/echarts-custom-cmp-template/package.json +60 -0
  31. package/src/template/echarts-custom-cmp-template/public/css/base.css +283 -0
  32. package/src/template/echarts-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
  33. package/src/template/echarts-custom-cmp-template/public/template.html +13 -0
  34. package/src/template/echarts-custom-cmp-template/src/assets/css/common.scss +127 -0
  35. package/src/template/echarts-custom-cmp-template/src/assets/css/mixin.scss +47 -0
  36. package/src/template/echarts-custom-cmp-template/src/components/chart-widget/README.md +186 -0
  37. package/src/template/echarts-custom-cmp-template/src/components/chart-widget/index.tsx +724 -0
  38. package/src/template/echarts-custom-cmp-template/src/components/chart-widget/model.ts +153 -0
  39. package/src/template/echarts-custom-cmp-template/src/components/chart-widget/style.scss +209 -0
  40. package/src/template/echarts-custom-cmp-template/src/components/info-card/index.tsx +69 -0
  41. package/src/template/echarts-custom-cmp-template/src/components/info-card/model.ts +78 -0
  42. package/src/template/echarts-custom-cmp-template/src/components/info-card/style.scss +105 -0
  43. package/src/template/echarts-custom-cmp-template/tsconfig.json +68 -0
  44. package/src/template/neo-custom-cmp-template/.prettierrc.js +12 -0
  45. package/src/template/neo-custom-cmp-template/README.md +47 -0
  46. package/src/template/neo-custom-cmp-template/commitlint.config.js +59 -0
  47. package/src/template/neo-custom-cmp-template/neo.config.js +109 -0
  48. package/src/template/neo-custom-cmp-template/package.json +60 -0
  49. package/src/template/neo-custom-cmp-template/public/css/base.css +283 -0
  50. package/src/template/neo-custom-cmp-template/public/scripts/app/bluebird.js +6679 -0
  51. package/src/template/neo-custom-cmp-template/public/template.html +13 -0
  52. package/src/template/neo-custom-cmp-template/src/assets/css/common.scss +127 -0
  53. package/src/template/neo-custom-cmp-template/src/assets/css/mixin.scss +47 -0
  54. package/src/template/neo-custom-cmp-template/src/components/info-card/index.tsx +69 -0
  55. package/src/template/neo-custom-cmp-template/src/components/info-card/model.ts +78 -0
  56. package/src/template/neo-custom-cmp-template/src/components/info-card/style.scss +105 -0
  57. package/src/template/neo-custom-cmp-template/src/components/neo-entity-grid/README.md +128 -0
  58. package/src/template/neo-custom-cmp-template/src/components/neo-entity-grid/index.tsx +295 -0
  59. package/src/template/neo-custom-cmp-template/src/components/neo-entity-grid/model.ts +94 -0
  60. package/src/template/neo-custom-cmp-template/src/components/neo-entity-grid/style.scss +127 -0
  61. package/src/template/neo-custom-cmp-template/tsconfig.json +68 -0
  62. package/src/template/react-custom-cmp-template/package.json +1 -1
  63. package/src/template/react-ts-custom-cmp-template/package.json +1 -2
  64. package/src/template/react-ts-custom-cmp-template/src/components/info-card/index.tsx +1 -4
  65. package/src/template/vue2-custom-cmp-template/package.json +1 -1
@@ -0,0 +1,295 @@
1
+ import * as React from 'react';
2
+ // @ts-ignore
3
+ import { EntityGrid, EntityGridStore } from 'neo-ui-component-web';
4
+ // @ts-ignore
5
+ import axios from 'axios';
6
+ import './style.scss'; // 组件内容样式
7
+
8
+ interface NeoEntityGridProps {
9
+ title: string;
10
+ objectApiKey?: string;
11
+ tableType?: string;
12
+ selectionMode?: string;
13
+ data?: any;
14
+ env?: any;
15
+ showFooter?: boolean; // 是否显示 footer
16
+ showHeader?: boolean; // 是否显示 header
17
+ }
18
+
19
+ export default class NeoEntityGrid extends React.PureComponent<NeoEntityGridProps> {
20
+ private entityGridStore: any;
21
+
22
+ constructor(props: NeoEntityGridProps) {
23
+ super(props);
24
+ this.onSelectedCall = this.onSelectedCall.bind(this);
25
+ this.initStore();
26
+ }
27
+
28
+ initStore() {
29
+ const {
30
+ objectApiKey = 'account',
31
+ tableType = 'lookup',
32
+ selectionMode = 'multiple',
33
+ env,
34
+ showFooter = false,
35
+ showHeader = true,
36
+ } = this.props;
37
+ // 创建基于 axios 的 fetcher 函数
38
+ const axiosFetcher = async (options: any) => {
39
+ const url = options?.url || '';
40
+
41
+ try {
42
+ // 配置 axios 请求
43
+ const config = {
44
+ url: url.startsWith('http') ? url : `/api${url}`,
45
+ method: options?.method || 'GET',
46
+ data: options?.data || {},
47
+ headers: {
48
+ 'Content-Type': 'application/json',
49
+ ...options?.headers,
50
+ },
51
+ timeout: options?.timeout || 10000,
52
+ ...options,
53
+ };
54
+
55
+ if (config?.method === 'GET') {
56
+ config.params = options?.data || {};
57
+ }
58
+
59
+ const response = await axios(config);
60
+ return response;
61
+ } catch (error) {
62
+ console.error('Axios fetcher error:', error);
63
+ throw error;
64
+ }
65
+ };
66
+
67
+ try {
68
+ // 生成唯一的实例ID
69
+ const instanceId = `entityGrid_${objectApiKey}_${Date.now()}_${Math.random()
70
+ .toString(36)
71
+ .substr(2, 9)}`;
72
+
73
+ // 创建真正的 EntityGridStore 实例
74
+ this.entityGridStore = EntityGridStore.create({
75
+ id: instanceId,
76
+ objectApiKey,
77
+ pattern: 'pickView',
78
+ tableType,
79
+ selectionMode,
80
+ skipExt: true,
81
+ funPermission: true,
82
+ height: '100%',
83
+ className: 'neo-entity-view',
84
+ entity: {
85
+ objectId: 1,
86
+ apiKey: objectApiKey,
87
+ custom: false,
88
+ },
89
+ items: [
90
+ { apiKey: 'name', label: '名称', type: 'text' },
91
+ { apiKey: 'code', label: '编码', type: 'text' },
92
+ { apiKey: 'status', label: '状态', type: 'select' },
93
+ ],
94
+ currentPage: 1,
95
+ pageSize: 20,
96
+ totalSize: 0,
97
+ rowData: [],
98
+ selectedData: [],
99
+ selectedIds: [],
100
+ filterModel: [],
101
+ sortModel: [],
102
+ displayMode: 'list',
103
+ loading: false,
104
+ error: null,
105
+ hasPermission: true,
106
+ gridFooterVisible: false, // 控制 footer 显示
107
+ headerBottomVisible: showHeader, // 控制 header 显示
108
+ gridAmisJson: {
109
+ type: 'neoGrid',
110
+ name: 'list',
111
+ height: '100%',
112
+ },
113
+ fetcher: axiosFetcher,
114
+ env: env || {},
115
+ uniqueName: instanceId,
116
+ apiKey: objectApiKey,
117
+ // 添加其他必要的配置
118
+ requestConfig: {
119
+ url: '/api/entity/list',
120
+ method: 'POST',
121
+ data: {},
122
+ },
123
+ // 添加必要的方法
124
+ getFooterAmis: (options: any) => ({
125
+ type: 'container',
126
+ body: '分页信息',
127
+ ...options
128
+ }),
129
+ getSelectedData: () => this.entityGridStore?.selectedData || [],
130
+ setSelectedRowsId: (ids: any) => {
131
+ this.entityGridStore.selectedIds = ids;
132
+ },
133
+ getGridStatus: () => ({ loading: false, error: null }),
134
+ deselectAll: () => {
135
+ this.entityGridStore.selectedData = [];
136
+ this.entityGridStore.selectedIds = [];
137
+ },
138
+ });
139
+
140
+ console.log('EntityGridStore 创建成功:', this.entityGridStore);
141
+ } catch (error) {
142
+ console.error('EntityGridStore 创建失败:', error);
143
+ // 创建一个简单的 fallback store
144
+ this.entityGridStore = EntityGridStore.create({
145
+ id: 'fallback_store',
146
+ objectApiKey,
147
+ pattern: 'pickView',
148
+ tableType: 'lookup',
149
+ selectionMode: 'multiple',
150
+ skipExt: true,
151
+ funPermission: true,
152
+ height: '100%',
153
+ className: 'neo-entity-view',
154
+ entity: {
155
+ objectId: 1,
156
+ apiKey: objectApiKey,
157
+ custom: false,
158
+ },
159
+ items: [],
160
+ currentPage: 1,
161
+ pageSize: 20,
162
+ totalSize: 0,
163
+ rowData: [],
164
+ selectedData: [],
165
+ selectedIds: [],
166
+ filterModel: [],
167
+ sortModel: [],
168
+ displayMode: 'list',
169
+ loading: false,
170
+ error: error.message,
171
+ hasPermission: true,
172
+ gridFooterVisible: false,
173
+ headerBottomVisible: showHeader, // 控制 header 显示
174
+ gridAmisJson: {
175
+ type: 'neoGrid',
176
+ name: 'list',
177
+ height: '100%',
178
+ },
179
+ fetcher: axiosFetcher,
180
+ env: {},
181
+ uniqueName: 'fallback_store',
182
+ apiKey: this.props.objectApiKey || 'account',
183
+ requestConfig: {
184
+ url: '/api/entity/list',
185
+ method: 'POST',
186
+ data: {},
187
+ },
188
+ // 添加必要的方法
189
+ getFooterAmis: (options: any) => ({
190
+ type: 'container',
191
+ body: '分页信息',
192
+ ...options
193
+ }),
194
+ getSelectedData: () => this.entityGridStore?.selectedData || [],
195
+ setSelectedRowsId: (ids: any) => {
196
+ this.entityGridStore.selectedIds = ids;
197
+ },
198
+ getGridStatus: () => ({ loading: false, error: null }),
199
+ deselectAll: () => {
200
+ this.entityGridStore.selectedData = [];
201
+ this.entityGridStore.selectedIds = [];
202
+ },
203
+ });
204
+ }
205
+ }
206
+
207
+ onSelectedCall(item: any) {
208
+ console.log('onSelectedCall:', item);
209
+ }
210
+
211
+ componentWillUnmount() {
212
+ // 清理 store 实例
213
+ if (this.entityGridStore) {
214
+ this.entityGridStore = null;
215
+ }
216
+ }
217
+
218
+ render() {
219
+ const {
220
+ title,
221
+ objectApiKey = 'account',
222
+ tableType = 'lookup',
223
+ selectionMode = 'multiple',
224
+ showFooter = false,
225
+ showHeader = true,
226
+ ...restProps
227
+ } = this.props;
228
+ console.log('当前自定义组件:', this.props, this, this.entityGridStore);
229
+ const curAmisData = this.props.data || {};
230
+
231
+ const userInfo = curAmisData.__NeoCurrentUser;
232
+ const systemInfo = curAmisData.__NeoSystemInfo || {};
233
+
234
+ // 如果 store 创建失败,显示错误信息
235
+ if (this.entityGridStore?.error) {
236
+ return (
237
+ <div className="neo-entity-grid-container">
238
+ <div className="news-title">
239
+ {title ||
240
+ '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。'}
241
+ {systemInfo.tenantName ? `【${systemInfo.tenantName}】` : ''}
242
+ </div>
243
+ <div className="entity-grid-wrapper">
244
+ <div
245
+ style={{
246
+ padding: '20px',
247
+ textAlign: 'center',
248
+ color: '#ff4d4f',
249
+ backgroundColor: '#fff2f0',
250
+ border: '1px solid #ffccc7',
251
+ borderRadius: '4px',
252
+ }}
253
+ >
254
+ <div style={{ fontSize: '16px', marginBottom: '10px' }}>
255
+ ⚠️ 组件初始化失败
256
+ </div>
257
+ <div style={{ fontSize: '14px' }}>
258
+ 错误信息: {this.entityGridStore.error}
259
+ </div>
260
+ <div
261
+ style={{ fontSize: '12px', marginTop: '10px', color: '#666' }}
262
+ >
263
+ 请检查 neo-ui-component-web 依赖是否正确安装
264
+ </div>
265
+ </div>
266
+ </div>
267
+ </div>
268
+ );
269
+ }
270
+
271
+ return (
272
+ <div className="neo-entity-grid-container">
273
+ <div className="news-title">
274
+ {title ||
275
+ '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。'}
276
+ {systemInfo.tenantName ? `【${systemInfo.tenantName}】` : ''}
277
+ </div>
278
+ <div className="entity-grid-wrapper">
279
+ <EntityGrid
280
+ {...restProps}
281
+ pattern="pickView"
282
+ objectApiKey={objectApiKey}
283
+ name={`${objectApiKey}Picker`}
284
+ tableType={tableType}
285
+ selectionMode={selectionMode}
286
+ skipExt={true}
287
+ onSelectedCall={this.onSelectedCall}
288
+ funPermission={true}
289
+ store={this.entityGridStore}
290
+ />
291
+ </div>
292
+ </div>
293
+ );
294
+ }
295
+ }
@@ -0,0 +1,94 @@
1
+ /**
2
+ * @file 自定义组件对接编辑器的描述文件
3
+ */
4
+ export class NeoEntityGridModel {
5
+ /**
6
+ * cmpType 为自定义组件名称,用于标识组件的唯一性
7
+ * 在构建时根据当前组件目录名称自动生成
8
+ */
9
+ // cmpType: string = 'neo-entity-grid';
10
+
11
+ // 组件名称,用于设置在编辑器左侧组件面板中展示的名称
12
+ label: string = 'Neo实体表格';
13
+
14
+ // 组件描述,用于设置在编辑器左侧组件面板中展示的描述
15
+ description: string = 'Neo 实体表格组件';
16
+
17
+ // 分类标签,用于设置在编辑器左侧组件面板哪个分类中展示(可设置多个分类标签)
18
+ tags: string[] = ['自定义组件'];
19
+
20
+ // 组件图标,用于设置在编辑器左侧组件面板中展示的图标
21
+ iconSrc: string = 'https://custom-widgets.bj.bcebos.com/table.svg';
22
+ // iconSrc: string = 'https://neo-widgets.bj.bcebos.com/custom-widget.svg';
23
+ // iconSrc = 'https://neo-widgets.bj.bcebos.com/favicon.png';
24
+
25
+ // 初次插入页面的默认属性数据
26
+ defaultComProps = {
27
+ title:
28
+ '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。',
29
+ label: 'Neo实体表格',
30
+ objectApiKey: 'account',
31
+ tableType: 'list',
32
+ selectionMode: 'multiple',
33
+ showHeader: true,
34
+ };
35
+
36
+ // 设计器端预览时展示的默认数据
37
+ previewComProps = {
38
+ label: 'Neo实体表格',
39
+ };
40
+
41
+ /**
42
+ * 组件面板配置,用于生成编辑器右侧属性配置面板内容
43
+ */
44
+ propsSchema = [
45
+ {
46
+ type: 'textarea',
47
+ name: 'title',
48
+ label: '卡片title',
49
+ value:
50
+ '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。',
51
+ },
52
+ {
53
+ type: 'select',
54
+ name: 'objectApiKey',
55
+ label: '实体API Key',
56
+ value: 'account',
57
+ creatable: true,
58
+ options: [
59
+ { label: '客户', value: 'account' },
60
+ { label: '产品', value: 'product' },
61
+ { label: '商品', value: 'goods' },
62
+ { label: '联系人', value: 'contact' },
63
+ { label: '商机明细', value: 'opportunityProduct' },
64
+ { label: '合同', value: 'contract' }
65
+ ],
66
+ },
67
+ {
68
+ type: 'select',
69
+ name: 'selectionMode',
70
+ label: '选择模式',
71
+ value: 'multiple',
72
+ options: [
73
+ { label: 'single', value: 'single' },
74
+ { label: 'multiple', value: 'multiple' },
75
+ { label: 'none', value: 'none' },
76
+ ],
77
+ },
78
+ {
79
+ type: 'switch',
80
+ name: 'showHeader',
81
+ label: '显示头部',
82
+ value: true,
83
+ },
84
+ ];
85
+
86
+ // 支持 函数式写法:propsSchemaCreator,com 为组件实例。优先级比 propsSchema 高
87
+ /*
88
+ propsSchemaCreator = (com: any) => {
89
+ return [];
90
+ };
91
+ */
92
+ }
93
+
94
+ export default NeoEntityGridModel;
@@ -0,0 +1,127 @@
1
+ :root {
2
+ --padding-bottom: 12px;
3
+ }
4
+
5
+ .neo-entity-grid-container {
6
+ position: relative;
7
+ box-sizing: border-box;
8
+ height: 100%;
9
+ display: flex;
10
+ flex-direction: column;
11
+
12
+ /* border-bottom: 1px solid #ececec; */
13
+ margin: 6px 12px;
14
+ padding: 6px var(--padding-bottom);
15
+ background-color: #fff;
16
+
17
+ .news-title {
18
+ padding: 6px 0;
19
+ font-family: PingFangSC-Regular;
20
+ font-size: 16px;
21
+ line-height: 22px;
22
+ color: #5f5e5e;
23
+ flex-shrink: 0;
24
+ }
25
+
26
+ // EntityGrid 容器样式
27
+ .entity-grid-wrapper {
28
+ flex: 1;
29
+ min-height: 400px;
30
+ overflow: hidden;
31
+
32
+ // 确保表格能正确显示
33
+ .neo-entity-view {
34
+ height: 100%;
35
+
36
+ .entity-grid {
37
+ height: 100%;
38
+ display: flex;
39
+ flex-direction: column;
40
+ }
41
+ }
42
+ }
43
+
44
+ .item-imgbox {
45
+ position: relative;
46
+ height: 395px;
47
+ background: #f0f0f0;
48
+ cursor: pointer;
49
+ box-sizing: border-box;
50
+ text-align: center;
51
+ overflow: hidden;
52
+
53
+ .news-img {
54
+ width: 100%;
55
+ height: 100%;
56
+ box-sizing: border-box;
57
+ background-size: contain;
58
+ }
59
+
60
+ .img-count {
61
+ position: absolute;
62
+ top: 0;
63
+ right: 0;
64
+ padding: 6px 8px;
65
+ color: #fff;
66
+ min-width: 60px;
67
+ text-align: center;
68
+ line-height: 1.2;
69
+ background: rgb(0 0 0 / 40%);
70
+ font-size: 25px;
71
+ box-sizing: border-box;
72
+ overflow: hidden;
73
+ }
74
+
75
+ .user-info-box {
76
+ position: absolute;
77
+ top: 10px;
78
+ left: 10px;
79
+ width: 100px;
80
+ min-height: 100px;
81
+ padding: 6px 8px;
82
+ color: #fff;
83
+ min-width: 60px;
84
+ text-align: center;
85
+ line-height: 1.2;
86
+ background: rgb(0 0 0 / 40%);
87
+ font-size: 25px;
88
+ box-sizing: border-box;
89
+ overflow: hidden;
90
+ display: flex;
91
+ flex-direction: column;
92
+ align-items: center;
93
+ justify-content: center;
94
+
95
+ .user-icon {
96
+ width: 64px;
97
+ height: 64px;
98
+ border-radius: 50%;
99
+ }
100
+
101
+ .user-name {
102
+ font-size: 16px;
103
+ font-weight: 600;
104
+ margin-top: 10px;
105
+ }
106
+ }
107
+ }
108
+
109
+ .news-info {
110
+ font-family: PingFangSC-Light;
111
+ height: 28px;
112
+ box-sizing: border-box;
113
+ display: flex;
114
+ justify-content: space-between;
115
+ align-items: center;
116
+ }
117
+
118
+ .media-mark,
119
+ .cmt-num {
120
+ display: inline-block;
121
+ height: 28px;
122
+ line-height: 28px;
123
+ font-family: PingFangSC-Light;
124
+ font-size: 18px;
125
+ color: #828282;
126
+ }
127
+ }
@@ -0,0 +1,68 @@
1
+ {
2
+ "compilerOptions": {
3
+ "experimentalDecorators": true,
4
+ /* Basic Options */
5
+ "target": "esnext",
6
+ /* 指定编译之后的版本: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017','ES2018' or 'ESNEXT'. */
7
+ "module": "esnext" /* 指定要使用的模板标准: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */,
8
+ // "lib": [], /* Specify library files to be included in the compilation. */
9
+ "allowJs": false /* 指定是否允许编译JS文件,默认false,即不编译JS文件. */,
10
+ // "checkJs": true, /* 指定是否检查和报告JS文件中的错误,默认false */
11
+ "jsx": "react" /* 指定jsx代码用于的开发环境:'preserve','react-native', or 'react'. */,
12
+ "declaration": false /* 指定是否在编译的时候生成相的d.ts声明文件 */,
13
+ // "declarationMap": true, /* 指定编译时是否生成.map文件 */
14
+ // "sourceMap": true, /* 指定编译时是否生成.map文件 */
15
+ // "outFile": "./", /* 指定输出文件合并为一个文件 */
16
+ // "outDir": "dist", /* 指定输出文件夹,值为一个文件夹路径字符串,输出的文件都将放置在这个文件夹*/
17
+ // "rootDir": "src", /* 指定编译文件的根目录,编译器会在根目录查找入口文件 */
18
+ // "composite": true, /* 是否编译构建引用项目 */
19
+ // "removeComments": true, /* 指定是否将编译后的文件注释删掉,设为true的话即删除注释,默认为false */
20
+ "noEmit": false /* 不生成编译文件 */,
21
+ "importHelpers": true /* 指定是否引入tslib里的复制工具函数,默认为false */,
22
+ // "downlevelIteration": true, /* 当target为"ES5"或"ES3"时,为"for-of" "spread"和"destructuring"中的迭代器提供完全支持 */
23
+ "isolatedModules": false /* 指定是否将每个文件作为单独的模块,默认为true */,
24
+
25
+ /* Strict Type-Checking Options */
26
+ "strict": false /* 指定是否启动所有类型检查 */,
27
+ "noImplicitAny": true /* Raise error on expressions and declarations with an implied 'any' type. */,
28
+ "strictNullChecks": true /* Enable strict null checks. */,
29
+ // "strictFunctionTypes": true, /* Enable strict checking of function types. */
30
+ // "strictPropertyInitialization": true, /* Enable strict checking of property initialization in classes. */
31
+ "noImplicitThis": true /* Raise error on 'this' expressions with an implied 'any' type. */,
32
+ // "alwaysStrict": true, /* Parse in strict mode and emit "use strict" for each source file. */
33
+
34
+ /* Additional Checks */
35
+ "noUnusedLocals": false /* Report errors on unused locals. */,
36
+ // "noUnusedParameters": true, /* Report errors on unused parameters. */
37
+ "noImplicitReturns": true /* Report error when not all code paths in function return a value. */,
38
+ // "noFallthroughCasesInSwitch": true, /* Report errors for fallthrough cases in switch statement. */
39
+
40
+ /* Module Resolution Options */
41
+ "moduleResolution": "node" /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */,
42
+ "baseUrl": "./" /* Base directory to resolve non-absolute module names. */,
43
+ "paths": {
44
+ "@": ["./src"]
45
+ } /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */,
46
+ // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */
47
+ /* 指定声明文件或文件夹的路径列表,如果指定了此项,则只有在这里列出的声明文件才会被加载 */
48
+ "typeRoots": ["./@types", "./node_modules/@types"],
49
+ // "types": [], /* 指定需要包含的模块,只有在这里列出的模块的声明文件才会被加载 */
50
+ "allowSyntheticDefaultImports": true /* Allow default imports from modules with no default export. This does not affect code emit, just typechecking. */,
51
+ "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */,
52
+ // "preserveSymlinks": true, /* Do not resolve the real path of symlinks. */
53
+
54
+ /* Source Map Options */
55
+ // "sourceRoot": "./", /* Specify the location where debugger should locate TypeScript files instead of source locations. */
56
+ // "mapRoot": "./", /* Specify the location where debugger should locate map files instead of generated locations. */
57
+ // "inlineSourceMap": true, /* Emit a single file with source maps instead of having a separate file. */
58
+ // "inlineSources": true, /* Emit the source alongside the sourcemaps within a single file; requires '--inlineSourceMap' or '--sourceMap' to be set. */
59
+
60
+ /* Experimental Options */
61
+ // "experimentalDecorators": true, /* Enables experimental support for ES7 decorators. */
62
+ // "emitDecoratorMetadata": true, /* Enables experimental support for emitting type metadata for decorators. */
63
+ "forceConsistentCasingInFileNames": true /* Disallow inconsistently-cased references to the same file. */
64
+ // "suppressImplicitAnyIndexErrors": true /* Suppress --noImplicitAny errors for indexing objects lacking index signatures. See issue #1232 for more details. */
65
+ },
66
+ "include": ["src", "test"],
67
+ "exclude": ["node_modules"]
68
+ }
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.1.7",
47
+ "neo-cmp-cli": "^1.1.8",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5"
@@ -38,7 +38,6 @@
38
38
  },
39
39
  "dependencies": {
40
40
  "neo-register": "^1.0.2",
41
- "antd": "4.9.4",
42
41
  "react": "^16.9.0",
43
42
  "react-dom": "^16.9.0"
44
43
  },
@@ -47,7 +46,7 @@
47
46
  "@commitlint/config-conventional": "^9.1.1",
48
47
  "@types/react": "^16.9.11",
49
48
  "@types/react-dom": "^16.9.15",
50
- "neo-cmp-cli": "^1.1.7",
49
+ "neo-cmp-cli": "^1.1.8",
51
50
  "husky": "^4.2.5",
52
51
  "lint-staged": "^10.2.9",
53
52
  "prettier": "^2.0.5"
@@ -1,6 +1,4 @@
1
1
  import * as React from 'react';
2
- import { Avatar } from 'antd';
3
- import { UserOutlined } from '@ant-design/icons';
4
2
  import './style.scss'; // 组件内容样式
5
3
 
6
4
  interface InfoCardProps {
@@ -43,7 +41,6 @@ export default class InfoCard extends React.PureComponent<InfoCardProps> {
43
41
  {title ||
44
42
  '营销服全场景智能CRM,帮助企业搭建数字化客户经营平台,实现业绩高质量增长。'}
45
43
  {systemInfo.tenantName ? `【${systemInfo.tenantName}】` : ''}
46
- <Avatar size={64} icon={<UserOutlined />} />
47
44
  </div>
48
45
  <div className="item-imgbox">
49
46
  {userInfo && userInfo.icon && (
@@ -59,7 +56,7 @@ export default class InfoCard extends React.PureComponent<InfoCardProps> {
59
56
  {imgCount > 0 && <div className="img-count">{imgCount}</div>}
60
57
  </div>
61
58
  <div className="news-info">
62
- <div className="left media-mark">NeoCRM · 低代码平台111</div>
59
+ <div className="left media-mark">NeoCRM · 低代码平台</div>
63
60
  {commentCount && commentCount > 0 && (
64
61
  <div className="cmt-num right">
65
62
  {this.agreeDataFormat(commentCount)}评
@@ -44,7 +44,7 @@
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.1.7",
47
+ "neo-cmp-cli": "^1.1.8",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5",