neo-cmp-cli 1.2.18 → 1.2.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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-cmp-cli",
3
- "version": "1.2.18",
3
+ "version": "1.2.20",
4
4
  "description": "前端脚手架:自定义组件开发工具,支持react 和 vue2.0技术栈。",
5
5
  "keywords": [
6
6
  "neo-cli",
@@ -17,7 +17,9 @@ const NeoCommonModules = {
17
17
  qs: '^6.11.0',
18
18
  lodash: '^4.17.21',
19
19
  'neo-ui-component-web': '^1.0.0',
20
- 'neo-ui-common': '^1.0.0'
20
+ 'neo-ui-common': '^1.0.0',
21
+ 'neo-open-api': '^1.0.11',
22
+ amis: '^1.1.5',
21
23
  };
22
24
 
23
25
  // 根据 Neo 共享出来的依赖模块,获取 externals 配置
@@ -29,7 +29,8 @@ const neoSharedDeps = {
29
29
  moment: '^2.25.3',
30
30
  lodash: '^4.17.21',
31
31
  'react-dnd': '^11.1.3',
32
- classnames: '^2.3.2'
32
+ classnames: '^2.3.2',
33
+ 'neo-open-api': '^1.0.11'
33
34
  };
34
35
 
35
36
  const MFPlugins = [
@@ -37,7 +37,7 @@
37
37
  "url": "https://github.com/wibetter/antd-custom-cmp-template/issues"
38
38
  },
39
39
  "dependencies": {
40
- "neo-register": "^1.0.2",
40
+ "neo-register": "^1.0.3",
41
41
  "antd": "4.9.4",
42
42
  "react": "^16.9.0",
43
43
  "react-dom": "^16.9.0"
@@ -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.2.18",
50
+ "neo-cmp-cli": "^1.2.19",
51
51
  "husky": "^4.2.5",
52
52
  "lint-staged": "^10.2.9",
53
53
  "prettier": "^2.0.5"
@@ -38,7 +38,7 @@
38
38
  "url": "https://github.com/wibetter/neo-custom-cmp-template/issues"
39
39
  },
40
40
  "dependencies": {
41
- "neo-register": "^1.0.2",
41
+ "neo-register": "^1.0.3",
42
42
  "react": "^16.9.0",
43
43
  "react-dom": "^16.9.0",
44
44
  "axios": "^0.27.2",
@@ -51,7 +51,7 @@
51
51
  "@types/react": "^16.9.11",
52
52
  "@types/react-dom": "^16.9.15",
53
53
  "@types/axios": "^0.14.0",
54
- "neo-cmp-cli": "^1.2.18",
54
+ "neo-cmp-cli": "^1.2.19",
55
55
  "husky": "^4.2.5",
56
56
  "lint-staged": "^10.2.9",
57
57
  "prettier": "^2.0.5"
@@ -37,7 +37,7 @@
37
37
  "url": "https://github.com/wibetter/echarts-custom-cmp-template/issues"
38
38
  },
39
39
  "dependencies": {
40
- "neo-register": "^1.0.2",
40
+ "neo-register": "^1.0.3",
41
41
  "react": "^16.9.0",
42
42
  "react-dom": "^16.9.0",
43
43
  "echarts": "^5.5.1"
@@ -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.2.18",
50
+ "neo-cmp-cli": "^1.2.19",
51
51
  "husky": "^4.2.5",
52
52
  "lint-staged": "^10.2.9",
53
53
  "prettier": "^2.0.5",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "neo-custom-cmp-template",
3
- "version": "1.1.6",
3
+ "version": "1.1.6.beta1",
4
4
  "description": "neo自定义组件模板(react&ts技术栈)",
5
5
  "keywords": [
6
6
  "自定义组件模板",
@@ -38,7 +38,7 @@
38
38
  "url": "https://github.com/wibetter/neo-custom-cmp-template/issues"
39
39
  },
40
40
  "dependencies": {
41
- "neo-register": "^1.0.2",
41
+ "neo-register": "^1.0.3",
42
42
  "react": "^16.9.0",
43
43
  "react-dom": "^16.9.0",
44
44
  "axios": "^0.27.2",
@@ -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.2.18",
55
+ "neo-cmp-cli": "^1.2.19",
56
56
  "husky": "^4.2.5",
57
57
  "lint-staged": "^10.2.9",
58
58
  "prettier": "^2.0.5"
@@ -173,21 +173,4 @@ npm run preview --cmpType=entity-detail
173
173
 
174
174
  # 构建组件
175
175
  npm run build
176
- ```
177
-
178
- ## 更新日志
179
-
180
- ### v1.1.0 (2024-12-19)
181
-
182
- - **重大更新**:重构属性结构,使用 `xObjectDetailApi` 对象替代分离的 `xObjectApiKey` 和 `objectId` 属性
183
- - 优化组件属性配置,提供更清晰的数据结构
184
- - 更新编辑器配置,支持 `xObjectDetailApi` 类型的属性配置
185
- - 保持向后兼容性,现有功能完全保留
186
-
187
- ### v1.0.0 (2024-09-30)
188
-
189
- - 初始版本发布
190
- - 支持基础的实体数据详情展示
191
- - 支持多列布局配置
192
- - 支持字段类型识别和格式化
193
- - 支持响应式布局
176
+ ```
@@ -33,6 +33,7 @@ interface EntityDetailProps {
33
33
  columnCount?: number;
34
34
  showTitle?: boolean;
35
35
  data?: any;
36
+ entityData?: any;
36
37
  }
37
38
 
38
39
  interface FieldDescription {
@@ -98,7 +99,7 @@ export default class EntityDetail extends React.PureComponent<
98
99
  async loadFieldDescriptions() {
99
100
  const { xObjectDetailApi } = this.props || {};
100
101
 
101
- // 方式一:直接从 props.xObjectDetailApi 中获取字段描述
102
+ // 方式一:直接从 props.xObjectDetailApi 中获取字段描述(当开启「自动获取数据」时可用)
102
103
  if (xObjectDetailApi && xObjectDetailApi.fieldDescList) {
103
104
  this.setState({ fieldDescriptions: xObjectDetailApi.fieldDescList });
104
105
  }
@@ -122,6 +123,14 @@ export default class EntityDetail extends React.PureComponent<
122
123
  const xObjectDetailApi: any = this.props.xObjectDetailApi || {};
123
124
  if (!xObjectDetailApi.xObjectApiKey || !xObjectDetailApi.objectId) return;
124
125
 
126
+ // 方式一:直接从 props 中取实体数据源相关数据
127
+ const { entityData: detailData } = this.props;
128
+ if (detailData) {
129
+ this.setState({ detailData });
130
+ }
131
+
132
+ /*
133
+ // 方式一:使用 Neo Open API SDK 获取详情数据
125
134
  this.setState({ loading: true, error: null });
126
135
 
127
136
  try {
@@ -145,6 +154,7 @@ export default class EntityDetail extends React.PureComponent<
145
154
  loading: false,
146
155
  });
147
156
  }
157
+ */
148
158
  }
149
159
 
150
160
  getFieldLabel(apiKey: string): string {
@@ -89,12 +89,4 @@ import XObjectTable from './components/xobject-table';
89
89
  1. **添加字段类型支持**:在 `renderForm()` 方法中添加新的字段类型
90
90
  2. **自定义操作列**:修改 `generateColumns()` 方法中的操作列配置
91
91
  3. **添加批量操作**:扩展表格功能支持批量删除等操作
92
- 4. **自定义样式**:修改 `style.scss` 文件定制组件外观
93
-
94
- ## 更新日志
95
-
96
- ### v1.0.0
97
- - 初始版本发布
98
- - 支持基础的增删改查功能
99
- - 支持动态列生成
100
- - 支持属性配置面板
92
+ 4. **自定义样式**:修改 `style.scss` 文件定制组件外观
@@ -37,14 +37,14 @@
37
37
  "url": "https://github.com/wibetter/react-custom-cmp-template/issues"
38
38
  },
39
39
  "dependencies": {
40
- "neo-register": "^1.0.2",
40
+ "neo-register": "^1.0.3",
41
41
  "react": "^16.9.0",
42
42
  "react-dom": "^16.9.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.2.18",
47
+ "neo-cmp-cli": "^1.2.19",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5"
@@ -37,7 +37,7 @@
37
37
  "url": "https://github.com/wibetter/react-ts-custom-cmp-template/issues"
38
38
  },
39
39
  "dependencies": {
40
- "neo-register": "^1.0.2",
40
+ "neo-register": "^1.0.3",
41
41
  "react": "^16.9.0",
42
42
  "react-dom": "^16.9.0"
43
43
  },
@@ -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.2.18",
49
+ "neo-cmp-cli": "^1.2.19",
50
50
  "husky": "^4.2.5",
51
51
  "lint-staged": "^10.2.9",
52
52
  "prettier": "^2.0.5"
@@ -37,14 +37,14 @@
37
37
  "url": "https://github.com/wibetter/vue2-custom-cmp-template/issues"
38
38
  },
39
39
  "dependencies": {
40
- "neo-register": "^1.0.2",
40
+ "neo-register": "^1.0.3",
41
41
  "vue": "^2.6.14",
42
42
  "element-ui": "^2.15.12"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@commitlint/cli": "^8.3.5",
46
46
  "@commitlint/config-conventional": "^9.1.1",
47
- "neo-cmp-cli": "^1.2.18",
47
+ "neo-cmp-cli": "^1.2.19",
48
48
  "husky": "^4.2.5",
49
49
  "lint-staged": "^10.2.9",
50
50
  "prettier": "^2.0.5",