linkmore-design 1.1.27-beta.4 → 1.1.27-beta.5
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/es/LmTable/Table.js
CHANGED
|
@@ -1255,6 +1255,11 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1255
1255
|
}, body)
|
|
1256
1256
|
};
|
|
1257
1257
|
}, [sortOpen, resizeable, components, colSortOpen, customizeDataSource, columns, openRowGroup]);
|
|
1258
|
+
(0, _react.useEffect)(function () {
|
|
1259
|
+
if (autoSize && autoSize.height !== '100%') {
|
|
1260
|
+
document.querySelector('.lm_protable .ant-table-body').style.height = autoSize.height + 'px';
|
|
1261
|
+
}
|
|
1262
|
+
}, [autoSize]);
|
|
1258
1263
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1259
1264
|
style: {
|
|
1260
1265
|
height: '100%',
|
|
@@ -40,6 +40,9 @@ var dfs = function dfs(dataSource, dataIndex, expression) {
|
|
|
40
40
|
average(dataSource);
|
|
41
41
|
};
|
|
42
42
|
var strategy = [{
|
|
43
|
+
value: '',
|
|
44
|
+
label: '不计算'
|
|
45
|
+
}, {
|
|
43
46
|
value: 'percent',
|
|
44
47
|
label: '百分比'
|
|
45
48
|
}, {
|
|
@@ -89,20 +92,22 @@ var CalcExpression = function CalcExpression(props) {
|
|
|
89
92
|
}
|
|
90
93
|
};
|
|
91
94
|
if (record && record._group && isShowSelect && (col === null || col === void 0 ? void 0 : col.dataIndex)) {
|
|
95
|
+
var select = Object.assign({
|
|
96
|
+
placeholder: '不计算',
|
|
97
|
+
allowClear: false,
|
|
98
|
+
size: "small",
|
|
99
|
+
bordered: false
|
|
100
|
+
}, col.expressionSelect ? col.expressionSelect : {});
|
|
92
101
|
return /*#__PURE__*/React.createElement("td", Object.assign({}, rest), /*#__PURE__*/React.createElement("div", {
|
|
93
102
|
style: {
|
|
94
103
|
display: 'flex',
|
|
95
104
|
alignItems: 'center'
|
|
96
105
|
}
|
|
97
|
-
}, /*#__PURE__*/React.createElement("span", null, record[col.dataIndex]), /*#__PURE__*/React.createElement(Select, {
|
|
106
|
+
}, /*#__PURE__*/React.createElement("span", null, record[col.dataIndex]), /*#__PURE__*/React.createElement(Select, Object.assign({
|
|
98
107
|
className: "calc-select",
|
|
99
108
|
value: record["".concat(col.dataIndex, "_exp")],
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
onChange: onChange,
|
|
103
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
104
|
-
allowClear: true
|
|
105
|
-
}, currentStrategy.map(function (item) {
|
|
109
|
+
onChange: onChange
|
|
110
|
+
}, select), currentStrategy.map(function (item) {
|
|
106
111
|
return /*#__PURE__*/React.createElement(Option, {
|
|
107
112
|
className: "calc-option",
|
|
108
113
|
value: item.value,
|
package/lib/LmTable/Table.js
CHANGED
|
@@ -1255,6 +1255,11 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1255
1255
|
}, body)
|
|
1256
1256
|
};
|
|
1257
1257
|
}, [sortOpen, resizeable, components, colSortOpen, customizeDataSource, columns, openRowGroup]);
|
|
1258
|
+
(0, _react.useEffect)(function () {
|
|
1259
|
+
if (autoSize && autoSize.height !== '100%') {
|
|
1260
|
+
document.querySelector('.lm_protable .ant-table-body').style.height = autoSize.height + 'px';
|
|
1261
|
+
}
|
|
1262
|
+
}, [autoSize]);
|
|
1258
1263
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
1259
1264
|
style: {
|
|
1260
1265
|
height: '100%',
|
|
@@ -48,6 +48,9 @@ var dfs = function dfs(dataSource, dataIndex, expression) {
|
|
|
48
48
|
average(dataSource);
|
|
49
49
|
};
|
|
50
50
|
var strategy = [{
|
|
51
|
+
value: '',
|
|
52
|
+
label: '不计算'
|
|
53
|
+
}, {
|
|
51
54
|
value: 'percent',
|
|
52
55
|
label: '百分比'
|
|
53
56
|
}, {
|
|
@@ -97,20 +100,22 @@ var CalcExpression = function CalcExpression(props) {
|
|
|
97
100
|
}
|
|
98
101
|
};
|
|
99
102
|
if (record && record._group && isShowSelect && (col === null || col === void 0 ? void 0 : col.dataIndex)) {
|
|
103
|
+
var select = Object.assign({
|
|
104
|
+
placeholder: '不计算',
|
|
105
|
+
allowClear: false,
|
|
106
|
+
size: "small",
|
|
107
|
+
bordered: false
|
|
108
|
+
}, col.expressionSelect ? col.expressionSelect : {});
|
|
100
109
|
return /*#__PURE__*/_react.default.createElement("td", Object.assign({}, rest), /*#__PURE__*/_react.default.createElement("div", {
|
|
101
110
|
style: {
|
|
102
111
|
display: 'flex',
|
|
103
112
|
alignItems: 'center'
|
|
104
113
|
}
|
|
105
|
-
}, /*#__PURE__*/_react.default.createElement("span", null, record[col.dataIndex]), /*#__PURE__*/_react.default.createElement(_Select.default, {
|
|
114
|
+
}, /*#__PURE__*/_react.default.createElement("span", null, record[col.dataIndex]), /*#__PURE__*/_react.default.createElement(_Select.default, Object.assign({
|
|
106
115
|
className: "calc-select",
|
|
107
116
|
value: record["".concat(col.dataIndex, "_exp")],
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
onChange: onChange,
|
|
111
|
-
placeholder: "\u8BF7\u9009\u62E9",
|
|
112
|
-
allowClear: true
|
|
113
|
-
}, currentStrategy.map(function (item) {
|
|
117
|
+
onChange: onChange
|
|
118
|
+
}, select), currentStrategy.map(function (item) {
|
|
114
119
|
return /*#__PURE__*/_react.default.createElement(Option, {
|
|
115
120
|
className: "calc-option",
|
|
116
121
|
value: item.value,
|