neo-cmp-cli 1.8.21 → 1.8.22
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.
- package/README.md +1 -1
- package/package.json +1 -1
- package/template/antd-custom-cmp-template/package.json +1 -1
- package/template/echarts-custom-cmp-template/package.json +1 -1
- package/template/empty-custom-cmp-template/package.json +1 -1
- package/template/neo-custom-cmp-template/package.json +1 -1
- package/template/neo-custom-cmp-template/src/components/{entityForm → entityForm_c}/index.tsx +14 -1
- package/template/neo-custom-cmp-template/src/components/{entityForm → entityForm_c}/model.ts +22 -1
- package/template/react-custom-cmp-template/package.json +1 -1
- package/template/react-ts-custom-cmp-template/package.json +1 -1
- package/template/vue2-custom-cmp-template/package.json +1 -1
- package/test/deprecate-versions.js +1 -1
- /package/template/neo-custom-cmp-template/src/components/{entityForm → entityForm_c}/README.md +0 -0
- /package/template/neo-custom-cmp-template/src/components/{entityForm → entityForm_c}/style.scss +0 -0
package/README.md
CHANGED
|
@@ -393,7 +393,7 @@ const result = await customApi.run({
|
|
|
393
393
|
| lodash | ^4.17.21 |
|
|
394
394
|
| neo-ui-component-web | ^1.0.0 |
|
|
395
395
|
| neo-ui-common | ^1.0.0 |
|
|
396
|
-
| neo-open-api | ^1.1.
|
|
396
|
+
| neo-open-api | ^1.1.9 |
|
|
397
397
|
| amis | ^1.1.5 |
|
|
398
398
|
|
|
399
399
|
> **注意**:自定义组件中请使用依赖包支持的版本,如版本不匹配运行时可能出现异常。
|
package/package.json
CHANGED
package/template/neo-custom-cmp-template/src/components/{entityForm → entityForm_c}/index.tsx
RENAMED
|
@@ -23,11 +23,13 @@ import {
|
|
|
23
23
|
ReloadOutlined,
|
|
24
24
|
CheckCircleOutlined,
|
|
25
25
|
} from '@ant-design/icons';
|
|
26
|
-
import moment from 'moment';
|
|
27
26
|
// @ts-ignore
|
|
28
27
|
import { xObject } from 'neo-open-api'; // Neo Open API
|
|
29
28
|
// @ts-ignore
|
|
30
29
|
import isEqual from 'lodash/isEqual';
|
|
30
|
+
// 引入 neo-ui-common / aop
|
|
31
|
+
// @ts-ignore
|
|
32
|
+
import { aop } from 'neo-ui-common';
|
|
31
33
|
import './style.scss';
|
|
32
34
|
|
|
33
35
|
const { Option } = Select;
|
|
@@ -228,6 +230,14 @@ export default class EntityForm extends React.PureComponent<
|
|
|
228
230
|
}
|
|
229
231
|
}
|
|
230
232
|
|
|
233
|
+
/**
|
|
234
|
+
* 表单提交事件
|
|
235
|
+
*/
|
|
236
|
+
@aop
|
|
237
|
+
submit() {
|
|
238
|
+
console.log('触发了表单提交事件:', this.props);
|
|
239
|
+
}
|
|
240
|
+
|
|
231
241
|
/**
|
|
232
242
|
* 处理表单提交
|
|
233
243
|
* 执行新增操作
|
|
@@ -295,6 +305,9 @@ export default class EntityForm extends React.PureComponent<
|
|
|
295
305
|
message.error('创建失败');
|
|
296
306
|
this.setState({ submitting: false });
|
|
297
307
|
}
|
|
308
|
+
|
|
309
|
+
// 触发表单提交事件
|
|
310
|
+
this.submit();
|
|
298
311
|
});
|
|
299
312
|
}
|
|
300
313
|
|
package/template/neo-custom-cmp-template/src/components/{entityForm → entityForm_c}/model.ts
RENAMED
|
@@ -33,7 +33,9 @@ export class EntityFormModel {
|
|
|
33
33
|
* customPage: 6 自定义页面
|
|
34
34
|
* bizPage: 7 业务页面
|
|
35
35
|
*/
|
|
36
|
-
|
|
36
|
+
targetPage: string[] = ['all'];
|
|
37
|
+
|
|
38
|
+
enableDuplicate: boolean = true;
|
|
37
39
|
|
|
38
40
|
/** 组件图标,用于设置在编辑器左侧组件面板中展示的图标 */
|
|
39
41
|
iconUrl: string = 'https://custom-widgets.bj.bcebos.com/custom-form.svg';
|
|
@@ -49,6 +51,25 @@ export class EntityFormModel {
|
|
|
49
51
|
},
|
|
50
52
|
};
|
|
51
53
|
|
|
54
|
+
/**
|
|
55
|
+
* 声明当前组件会触发的所有事件
|
|
56
|
+
*/
|
|
57
|
+
events = [
|
|
58
|
+
{
|
|
59
|
+
helpText: '点击页签后触发该事件',
|
|
60
|
+
apiKey: 'onChange',
|
|
61
|
+
description: '点击页签触发该事件',
|
|
62
|
+
label: '页签切换后',
|
|
63
|
+
// cmpKeyIdentifier: '',
|
|
64
|
+
// helpTextKey: '',
|
|
65
|
+
// eventCategory: 2,
|
|
66
|
+
// pageType: 1,
|
|
67
|
+
// targetDevice: 1,
|
|
68
|
+
// eventParams: '[{"apiKey":"eventParam","children":[{"apiKey":"target","label":"组件名称","type":"string"},{"apiKey":"cmp","label":"组件实例","type":"Object"},{"apiKey":"data","children":[{"apiKey":"tabKey","label":"页签key","type":"string"}],"label":"数据","type":"Object"}],"label":"事件入参","type":"Object"}]',
|
|
69
|
+
// labelKey: 'XdMDNeoEvent.NeoTabContainer.onChange'
|
|
70
|
+
}
|
|
71
|
+
];
|
|
72
|
+
|
|
52
73
|
/**
|
|
53
74
|
* 组件属性配置模式
|
|
54
75
|
* 支持静态配置:propsSchema,优先级比 propsSchemaCreator 低
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { execSync } = require('child_process');
|
|
2
2
|
|
|
3
3
|
// 所有需要废弃的版本
|
|
4
|
-
const versionsToDeprecate = ["1.8.15", "1.8.17", "1.8.18"];
|
|
4
|
+
const versionsToDeprecate = ["1.8.15", "1.8.17", "1.8.18", "1.8.19", "1.8.20", "1.8.21"];
|
|
5
5
|
|
|
6
6
|
const packageName = 'neo-cmp-cli';
|
|
7
7
|
const deprecateMessage = '此版本为开发中版本(存在 bug),请升级到最新版本。';
|
/package/template/neo-custom-cmp-template/src/components/{entityForm → entityForm_c}/README.md
RENAMED
|
File without changes
|
/package/template/neo-custom-cmp-template/src/components/{entityForm → entityForm_c}/style.scss
RENAMED
|
File without changes
|