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 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.6 |
396
+ | neo-open-api | ^1.1.9 |
397
397
  | amis | ^1.1.5 |
398
398
 
399
399
  > **注意**:自定义组件中请使用依赖包支持的版本,如版本不匹配运行时可能出现异常。
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-cmp-cli",
3
- "version": "1.8.21",
3
+ "version": "1.8.22",
4
4
  "description": "Neo 自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -48,7 +48,7 @@
48
48
  "@commitlint/config-conventional": "^9.1.1",
49
49
  "@types/react": "^16.9.11",
50
50
  "@types/react-dom": "^16.9.15",
51
- "neo-cmp-cli": "^1.8.20",
51
+ "neo-cmp-cli": "^1.8.22",
52
52
  "husky": "^4.2.5",
53
53
  "lint-staged": "^10.2.9",
54
54
  "prettier": "^2.0.5"
@@ -48,7 +48,7 @@
48
48
  "@commitlint/config-conventional": "^9.1.1",
49
49
  "@types/react": "^16.9.11",
50
50
  "@types/react-dom": "^16.9.15",
51
- "neo-cmp-cli": "^1.8.20",
51
+ "neo-cmp-cli": "^1.8.22",
52
52
  "husky": "^4.2.5",
53
53
  "lint-staged": "^10.2.9",
54
54
  "prettier": "^2.0.5",
@@ -46,7 +46,7 @@
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
47
  "@types/react": "^16.9.11",
48
48
  "@types/react-dom": "^16.9.15",
49
- "neo-cmp-cli": "^1.8.20",
49
+ "neo-cmp-cli": "^1.8.22",
50
50
  "husky": "^4.2.5",
51
51
  "lint-staged": "^10.2.9",
52
52
  "prettier": "^2.0.5"
@@ -54,7 +54,7 @@
54
54
  "@types/react": "^16.9.11",
55
55
  "@types/react-dom": "^16.9.15",
56
56
  "@types/axios": "^0.14.0",
57
- "neo-cmp-cli": "^1.8.20",
57
+ "neo-cmp-cli": "^1.8.22",
58
58
  "husky": "^4.2.5",
59
59
  "lint-staged": "^10.2.9",
60
60
  "prettier": "^2.0.5"
@@ -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
 
@@ -33,7 +33,9 @@ export class EntityFormModel {
33
33
  * customPage: 6 自定义页面
34
34
  * bizPage: 7 业务页面
35
35
  */
36
- // targetPage: string[] = ['customPage'];
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 低
@@ -45,7 +45,7 @@
45
45
  "devDependencies": {
46
46
  "@commitlint/cli": "^8.3.5",
47
47
  "@commitlint/config-conventional": "^9.1.1",
48
- "neo-cmp-cli": "^1.8.20",
48
+ "neo-cmp-cli": "^1.8.22",
49
49
  "husky": "^4.2.5",
50
50
  "lint-staged": "^10.2.9",
51
51
  "prettier": "^2.0.5"
@@ -47,7 +47,7 @@
47
47
  "@commitlint/config-conventional": "^9.1.1",
48
48
  "@types/react": "^16.9.11",
49
49
  "@types/react-dom": "^16.9.15",
50
- "neo-cmp-cli": "^1.8.20",
50
+ "neo-cmp-cli": "^1.8.22",
51
51
  "husky": "^4.2.5",
52
52
  "lint-staged": "^10.2.9",
53
53
  "prettier": "^2.0.5"
@@ -45,7 +45,7 @@
45
45
  "devDependencies": {
46
46
  "@commitlint/cli": "^8.3.5",
47
47
  "@commitlint/config-conventional": "^9.1.1",
48
- "neo-cmp-cli": "^1.8.20",
48
+ "neo-cmp-cli": "^1.8.22",
49
49
  "husky": "^4.2.5",
50
50
  "lint-staged": "^10.2.9",
51
51
  "prettier": "^2.0.5",
@@ -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),请升级到最新版本。';