@teamix/pro 1.3.9 → 1.3.10
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/dist/pro.js +45 -54
- package/dist/pro.min.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/info/components/baseInfo/index.js +6 -14
- package/es/info/typing.d.ts +0 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/info/components/baseInfo/index.js +6 -14
- package/lib/info/typing.d.ts +0 -1
- package/package.json +1 -1
package/es/index.d.ts
CHANGED
@@ -26,5 +26,5 @@ export * from './table';
|
|
26
26
|
export * from './sidebar';
|
27
27
|
export * from './utils';
|
28
28
|
export * from './timeline';
|
29
|
-
declare const version = "1.3.
|
29
|
+
declare const version = "1.3.10";
|
30
30
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils, };
|
package/es/index.js
CHANGED
@@ -31,6 +31,6 @@ export * from './sidebar';
|
|
31
31
|
export * from './utils'; // export * from './sidebar';
|
32
32
|
|
33
33
|
export * from './timeline';
|
34
|
-
var version = '1.3.
|
34
|
+
var version = '1.3.10';
|
35
35
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, // ProLayout,
|
36
36
|
ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils };
|
@@ -26,33 +26,23 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
26
26
|
var formItemLayout = JSON.parse(JSON.stringify(defaultLayout.formItemLayout)); // 自定义布局
|
27
27
|
|
28
28
|
if (layout) {
|
29
|
-
var _layout$labelCol, _layout$wrapperCol
|
29
|
+
var _layout$labelCol, _layout$wrapperCol;
|
30
30
|
|
31
31
|
var labelCol = (_layout$labelCol = layout === null || layout === void 0 ? void 0 : layout.labelCol) !== null && _layout$labelCol !== void 0 ? _layout$labelCol : defaultLayout.formItemLayout.labelCol;
|
32
32
|
var wrapperCol = (_layout$wrapperCol = layout === null || layout === void 0 ? void 0 : layout.wrapperCol) !== null && _layout$wrapperCol !== void 0 ? _layout$wrapperCol : defaultLayout.formItemLayout.wrapperCol;
|
33
|
-
var span = (_layout$span = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span !== void 0 ? _layout$span : defaultLayout.span;
|
34
|
-
|
35
|
-
if ((layout === null || layout === void 0 ? void 0 : layout.colNum) && layout.colNum > 0 && layout.colNum <= 4) {
|
36
|
-
span = 24 / layout.colNum;
|
37
|
-
}
|
38
|
-
|
39
|
-
formItemLayout.span = span;
|
40
33
|
formItemLayout.labelCol = labelCol;
|
41
34
|
formItemLayout.wrapperCol = wrapperCol;
|
42
35
|
}
|
43
36
|
|
44
|
-
var newSpan = formItemLayout.span;
|
45
37
|
var newLabelSpan = formItemLayout.labelCol.span;
|
46
38
|
var newWrapperSpan = formItemLayout.wrapperCol.span; // 计算合并列情况。label与wrapper需要重新计算
|
47
39
|
|
48
40
|
if (colspan) {
|
49
|
-
newSpan = newSpan * (colspan !== null && colspan !== void 0 ? colspan : 1);
|
50
41
|
newLabelSpan = newLabelSpan / colspan;
|
51
42
|
newWrapperSpan = newWrapperSpan + (formItemLayout.labelCol.span - newLabelSpan);
|
52
43
|
}
|
53
44
|
|
54
45
|
var newFormItemLayout = {
|
55
|
-
span: newSpan,
|
56
46
|
labelCol: {
|
57
47
|
span: newLabelSpan
|
58
48
|
},
|
@@ -65,10 +55,12 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
65
55
|
|
66
56
|
var renderContent = function renderContent() {
|
67
57
|
return columns.map(function (item, index) {
|
68
|
-
var
|
58
|
+
var _layout$span, _layout$span2, _item$title, _item$valueType, _ref, _item$colSpan;
|
69
59
|
|
60
|
+
var span = item.colSpan ? defaultLayout.span * item.colSpan : defaultLayout.span;
|
61
|
+
var layoutSpan = item.colSpan ? ((_layout$span = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span !== void 0 ? _layout$span : span) * item.colSpan : (_layout$span2 = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span2 !== void 0 ? _layout$span2 : span;
|
70
62
|
return /*#__PURE__*/React.createElement(Col, {
|
71
|
-
span:
|
63
|
+
span: layoutSpan,
|
72
64
|
key: index
|
73
65
|
}, /*#__PURE__*/React.createElement(ProInfoItem, {
|
74
66
|
label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
|
@@ -84,7 +76,7 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
84
76
|
context: context,
|
85
77
|
props: item.props
|
86
78
|
}),
|
87
|
-
baseInfoLayout: getFormItemLayout((_item$
|
79
|
+
baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
|
88
80
|
tooltip: item.tooltip,
|
89
81
|
tooltipIcon: item.tooltipIcon
|
90
82
|
}));
|
package/es/info/typing.d.ts
CHANGED
@@ -135,7 +135,6 @@ export declare type ProInfoProps = {
|
|
135
135
|
export declare type IProHeaderInfoItem = {};
|
136
136
|
export declare type BaseInfoLayoutProps = ProBaseInfoLayoutProps;
|
137
137
|
export declare type ProBaseInfoLayoutProps = {
|
138
|
-
colNum?: number;
|
139
138
|
span?: number;
|
140
139
|
labelCol?: {
|
141
140
|
span: number;
|
package/lib/index.d.ts
CHANGED
@@ -26,5 +26,5 @@ export * from './table';
|
|
26
26
|
export * from './sidebar';
|
27
27
|
export * from './utils';
|
28
28
|
export * from './timeline';
|
29
|
-
declare const version = "1.3.
|
29
|
+
declare const version = "1.3.10";
|
30
30
|
export { version, ProAction, ProCard, ProField, ProForm, ProInfo, ProPageContainer, ProPageHeader, ProSkeleton, ProTable, ProSidebar, ProTimeline, hooks, nocode, templates, utils, };
|
package/lib/index.js
CHANGED
@@ -45,33 +45,23 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
45
45
|
var formItemLayout = JSON.parse(JSON.stringify(defaultLayout.formItemLayout)); // 自定义布局
|
46
46
|
|
47
47
|
if (layout) {
|
48
|
-
var _layout$labelCol, _layout$wrapperCol
|
48
|
+
var _layout$labelCol, _layout$wrapperCol;
|
49
49
|
|
50
50
|
var labelCol = (_layout$labelCol = layout === null || layout === void 0 ? void 0 : layout.labelCol) !== null && _layout$labelCol !== void 0 ? _layout$labelCol : defaultLayout.formItemLayout.labelCol;
|
51
51
|
var wrapperCol = (_layout$wrapperCol = layout === null || layout === void 0 ? void 0 : layout.wrapperCol) !== null && _layout$wrapperCol !== void 0 ? _layout$wrapperCol : defaultLayout.formItemLayout.wrapperCol;
|
52
|
-
var span = (_layout$span = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span !== void 0 ? _layout$span : defaultLayout.span;
|
53
|
-
|
54
|
-
if ((layout === null || layout === void 0 ? void 0 : layout.colNum) && layout.colNum > 0 && layout.colNum <= 4) {
|
55
|
-
span = 24 / layout.colNum;
|
56
|
-
}
|
57
|
-
|
58
|
-
formItemLayout.span = span;
|
59
52
|
formItemLayout.labelCol = labelCol;
|
60
53
|
formItemLayout.wrapperCol = wrapperCol;
|
61
54
|
}
|
62
55
|
|
63
|
-
var newSpan = formItemLayout.span;
|
64
56
|
var newLabelSpan = formItemLayout.labelCol.span;
|
65
57
|
var newWrapperSpan = formItemLayout.wrapperCol.span; // 计算合并列情况。label与wrapper需要重新计算
|
66
58
|
|
67
59
|
if (colspan) {
|
68
|
-
newSpan = newSpan * (colspan !== null && colspan !== void 0 ? colspan : 1);
|
69
60
|
newLabelSpan = newLabelSpan / colspan;
|
70
61
|
newWrapperSpan = newWrapperSpan + (formItemLayout.labelCol.span - newLabelSpan);
|
71
62
|
}
|
72
63
|
|
73
64
|
var newFormItemLayout = {
|
74
|
-
span: newSpan,
|
75
65
|
labelCol: {
|
76
66
|
span: newLabelSpan
|
77
67
|
},
|
@@ -84,10 +74,12 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
84
74
|
|
85
75
|
var renderContent = function renderContent() {
|
86
76
|
return columns.map(function (item, index) {
|
87
|
-
var
|
77
|
+
var _layout$span, _layout$span2, _item$title, _item$valueType, _ref, _item$colSpan;
|
88
78
|
|
79
|
+
var span = item.colSpan ? defaultLayout.span * item.colSpan : defaultLayout.span;
|
80
|
+
var layoutSpan = item.colSpan ? ((_layout$span = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span !== void 0 ? _layout$span : span) * item.colSpan : (_layout$span2 = layout === null || layout === void 0 ? void 0 : layout.span) !== null && _layout$span2 !== void 0 ? _layout$span2 : span;
|
89
81
|
return /*#__PURE__*/_react.default.createElement(Col, {
|
90
|
-
span:
|
82
|
+
span: layoutSpan,
|
91
83
|
key: index
|
92
84
|
}, /*#__PURE__*/_react.default.createElement(_ProInfoItem.default, {
|
93
85
|
label: (_item$title = item === null || item === void 0 ? void 0 : item.title) !== null && _item$title !== void 0 ? _item$title : '',
|
@@ -103,7 +95,7 @@ var ProBaseInfo = function ProBaseInfo(props) {
|
|
103
95
|
context: context,
|
104
96
|
props: item.props
|
105
97
|
}),
|
106
|
-
baseInfoLayout: getFormItemLayout((_item$
|
98
|
+
baseInfoLayout: getFormItemLayout((_item$colSpan = item === null || item === void 0 ? void 0 : item.colSpan) !== null && _item$colSpan !== void 0 ? _item$colSpan : 0),
|
107
99
|
tooltip: item.tooltip,
|
108
100
|
tooltipIcon: item.tooltipIcon
|
109
101
|
}));
|
package/lib/info/typing.d.ts
CHANGED
@@ -135,7 +135,6 @@ export declare type ProInfoProps = {
|
|
135
135
|
export declare type IProHeaderInfoItem = {};
|
136
136
|
export declare type BaseInfoLayoutProps = ProBaseInfoLayoutProps;
|
137
137
|
export declare type ProBaseInfoLayoutProps = {
|
138
|
-
colNum?: number;
|
139
138
|
span?: number;
|
140
139
|
labelCol?: {
|
141
140
|
span: number;
|