neo-cmp-cli 1.2.18 → 1.2.19
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 +1 -1
- package/src/neo/neoRequire.js +3 -1
- package/src/neo/webpack.mf.js +2 -1
- package/src/template/antd-custom-cmp-template/package.json +1 -1
- package/src/template/develop/neo-custom-cmp-template/package.json +1 -1
- package/src/template/echarts-custom-cmp-template/package.json +1 -1
- package/src/template/neo-custom-cmp-template/package.json +2 -2
- package/src/template/neo-custom-cmp-template/src/components/entity-detail/index.tsx +10 -0
- package/src/template/react-custom-cmp-template/package.json +1 -1
- package/src/template/react-ts-custom-cmp-template/package.json +1 -1
- package/src/template/vue2-custom-cmp-template/package.json +1 -1
package/package.json
CHANGED
package/src/neo/neoRequire.js
CHANGED
|
@@ -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 配置
|
package/src/neo/webpack.mf.js
CHANGED
|
@@ -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
|
"自定义组件模板",
|
|
@@ -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.
|
|
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"
|
|
@@ -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 {
|
|
@@ -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 {
|