linkmore-design 1.1.27-beta.7 → 1.1.27-beta.8
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/index.umd.js +20 -14
- package/dist/index.umd.min.js +1 -1
- package/dist/variables.css +1 -1
- package/es/Dropdown/style/index.css +1 -1
- package/es/Dropdown/style/variables.css +1 -1
- package/es/LmTable/Table.js +20 -14
- package/es/styles/variables.css +1 -1
- package/lib/Dropdown/style/index.css +1 -1
- package/lib/Dropdown/style/variables.css +1 -1
- package/lib/LmTable/Table.js +20 -14
- package/lib/styles/variables.css +1 -1
- package/package.json +1 -1
package/dist/variables.css
CHANGED
package/es/LmTable/Table.js
CHANGED
|
@@ -36,7 +36,7 @@ var _useGroupDataSource3 = _interopRequireDefault(require("./hooks/useGroupDataS
|
|
|
36
36
|
var _useDndItems2 = _interopRequireDefault(require("./hooks/useDndItems"));
|
|
37
37
|
var _HeaderCol = _interopRequireDefault(require("./components/HeaderCol"));
|
|
38
38
|
var _index = require("./common/index");
|
|
39
|
-
var _excluded = ["columns", "dataSource", "autoSize", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "sortOpen", "colSortOpen", "resizeable", "customCheck", "components", "rowSelection", "columnsState", "onChange", "filterChange", "tableRowType", "size", "openSheet", "editSheet", "dataChange", "openColGroup", "colGroupTitle", "openRowGroup", "rowGroupTitle", "groupWidth", "groupRowKeys", "groupColKeys", "onGroupChange", "rowStyle", "emptyProps"],
|
|
39
|
+
var _excluded = ["changeSize", "columns", "dataSource", "autoSize", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "sortOpen", "colSortOpen", "resizeable", "customCheck", "components", "rowSelection", "columnsState", "onChange", "filterChange", "tableRowType", "size", "openSheet", "editSheet", "dataChange", "openColGroup", "colGroupTitle", "openRowGroup", "rowGroupTitle", "groupWidth", "groupRowKeys", "groupColKeys", "onGroupChange", "rowStyle", "emptyProps"],
|
|
40
40
|
_excluded2 = ["className", "style"],
|
|
41
41
|
_excluded3 = ["onResize", "width", "dataIndex", "onResizeStop"];
|
|
42
42
|
var Summary = _proTable.default.Summary;
|
|
@@ -73,7 +73,8 @@ var sortDefaultColumnItem = {
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
76
|
-
var
|
|
76
|
+
var changeSize = props.changeSize,
|
|
77
|
+
customizeColumns = props.columns,
|
|
77
78
|
customizeDataSource = props.dataSource,
|
|
78
79
|
autoSize = props.autoSize,
|
|
79
80
|
rowClick = props.rowClick,
|
|
@@ -1123,6 +1124,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1123
1124
|
// 将节点方法给外部使用
|
|
1124
1125
|
_react.default.useImperativeHandle(ref, function () {
|
|
1125
1126
|
return {
|
|
1127
|
+
changeSize: changeSize,
|
|
1126
1128
|
getCheckboxRecords: function getCheckboxRecords() {
|
|
1127
1129
|
return useSelectedRows.selectedRows;
|
|
1128
1130
|
},
|
|
@@ -1258,7 +1260,10 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1258
1260
|
}, [sortOpen, resizeable, components, colSortOpen, customizeDataSource, columns, openRowGroup]);
|
|
1259
1261
|
(0, _react.useEffect)(function () {
|
|
1260
1262
|
if (autoSize && autoSize.height !== '100%') {
|
|
1261
|
-
document.querySelector('.lm_protable .ant-table-body')
|
|
1263
|
+
var dom = document.querySelector('.lm_protable .ant-table-body');
|
|
1264
|
+
if (dom) {
|
|
1265
|
+
dom.style.height = "".concat(autoSize.height, "px");
|
|
1266
|
+
}
|
|
1262
1267
|
}
|
|
1263
1268
|
}, [autoSize]);
|
|
1264
1269
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1421,17 +1426,6 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1421
1426
|
}
|
|
1422
1427
|
return h;
|
|
1423
1428
|
}, [props.hiddenPage, props.customCheck, props.columns, tableSize, footer, footerHeight, groupHeight]);
|
|
1424
|
-
var throttleSize = (0, _react.useCallback)(function () {
|
|
1425
|
-
var width = tableSize.width;
|
|
1426
|
-
return /*#__PURE__*/_react.default.createElement(ResetTable, (0, _extends2.default)({
|
|
1427
|
-
ref: defaultRef
|
|
1428
|
-
}, props, {
|
|
1429
|
-
autoSize: {
|
|
1430
|
-
height: resetHeight,
|
|
1431
|
-
width: width
|
|
1432
|
-
}
|
|
1433
|
-
}));
|
|
1434
|
-
}, [tableSize, props]);
|
|
1435
1429
|
var changeSize = function changeSize() {
|
|
1436
1430
|
if (!tableWarpRef.current) {
|
|
1437
1431
|
return;
|
|
@@ -1447,6 +1441,18 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1447
1441
|
height: typeof height === 'string' ? "calc(".concat(height, " - ").concat(value, "px)") : height - value
|
|
1448
1442
|
});
|
|
1449
1443
|
};
|
|
1444
|
+
var throttleSize = (0, _react.useCallback)(function () {
|
|
1445
|
+
var width = tableSize.width;
|
|
1446
|
+
return /*#__PURE__*/_react.default.createElement(ResetTable, (0, _extends2.default)({
|
|
1447
|
+
ref: defaultRef
|
|
1448
|
+
}, props, {
|
|
1449
|
+
changeSize: changeSize,
|
|
1450
|
+
autoSize: {
|
|
1451
|
+
height: resetHeight,
|
|
1452
|
+
width: width
|
|
1453
|
+
}
|
|
1454
|
+
}));
|
|
1455
|
+
}, [tableSize, props]);
|
|
1450
1456
|
var handResize = (0, _lodash.throttle)(changeSize, 600);
|
|
1451
1457
|
(0, _react.useEffect)(function () {
|
|
1452
1458
|
var summary = props.summary;
|
package/es/styles/variables.css
CHANGED
package/lib/LmTable/Table.js
CHANGED
|
@@ -36,7 +36,7 @@ var _useGroupDataSource3 = _interopRequireDefault(require("./hooks/useGroupDataS
|
|
|
36
36
|
var _useDndItems2 = _interopRequireDefault(require("./hooks/useDndItems"));
|
|
37
37
|
var _HeaderCol = _interopRequireDefault(require("./components/HeaderCol"));
|
|
38
38
|
var _index = require("./common/index");
|
|
39
|
-
var _excluded = ["columns", "dataSource", "autoSize", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "sortOpen", "colSortOpen", "resizeable", "customCheck", "components", "rowSelection", "columnsState", "onChange", "filterChange", "tableRowType", "size", "openSheet", "editSheet", "dataChange", "openColGroup", "colGroupTitle", "openRowGroup", "rowGroupTitle", "groupWidth", "groupRowKeys", "groupColKeys", "onGroupChange", "rowStyle", "emptyProps"],
|
|
39
|
+
var _excluded = ["changeSize", "columns", "dataSource", "autoSize", "rowClick", "onDoubleClick", "checkConfig", "summary", "pagination", "hiddenPage", "loading", "virtual", "sortOpen", "colSortOpen", "resizeable", "customCheck", "components", "rowSelection", "columnsState", "onChange", "filterChange", "tableRowType", "size", "openSheet", "editSheet", "dataChange", "openColGroup", "colGroupTitle", "openRowGroup", "rowGroupTitle", "groupWidth", "groupRowKeys", "groupColKeys", "onGroupChange", "rowStyle", "emptyProps"],
|
|
40
40
|
_excluded2 = ["className", "style"],
|
|
41
41
|
_excluded3 = ["onResize", "width", "dataIndex", "onResizeStop"];
|
|
42
42
|
var Summary = _proTable.default.Summary;
|
|
@@ -73,7 +73,8 @@ var sortDefaultColumnItem = {
|
|
|
73
73
|
}
|
|
74
74
|
};
|
|
75
75
|
var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
76
|
-
var
|
|
76
|
+
var changeSize = props.changeSize,
|
|
77
|
+
customizeColumns = props.columns,
|
|
77
78
|
customizeDataSource = props.dataSource,
|
|
78
79
|
autoSize = props.autoSize,
|
|
79
80
|
rowClick = props.rowClick,
|
|
@@ -1123,6 +1124,7 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1123
1124
|
// 将节点方法给外部使用
|
|
1124
1125
|
_react.default.useImperativeHandle(ref, function () {
|
|
1125
1126
|
return {
|
|
1127
|
+
changeSize: changeSize,
|
|
1126
1128
|
getCheckboxRecords: function getCheckboxRecords() {
|
|
1127
1129
|
return useSelectedRows.selectedRows;
|
|
1128
1130
|
},
|
|
@@ -1258,7 +1260,10 @@ var ResetTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1258
1260
|
}, [sortOpen, resizeable, components, colSortOpen, customizeDataSource, columns, openRowGroup]);
|
|
1259
1261
|
(0, _react.useEffect)(function () {
|
|
1260
1262
|
if (autoSize && autoSize.height !== '100%') {
|
|
1261
|
-
document.querySelector('.lm_protable .ant-table-body')
|
|
1263
|
+
var dom = document.querySelector('.lm_protable .ant-table-body');
|
|
1264
|
+
if (dom) {
|
|
1265
|
+
dom.style.height = "".concat(autoSize.height, "px");
|
|
1266
|
+
}
|
|
1262
1267
|
}
|
|
1263
1268
|
}, [autoSize]);
|
|
1264
1269
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
@@ -1421,17 +1426,6 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1421
1426
|
}
|
|
1422
1427
|
return h;
|
|
1423
1428
|
}, [props.hiddenPage, props.customCheck, props.columns, tableSize, footer, footerHeight, groupHeight]);
|
|
1424
|
-
var throttleSize = (0, _react.useCallback)(function () {
|
|
1425
|
-
var width = tableSize.width;
|
|
1426
|
-
return /*#__PURE__*/_react.default.createElement(ResetTable, (0, _extends2.default)({
|
|
1427
|
-
ref: defaultRef
|
|
1428
|
-
}, props, {
|
|
1429
|
-
autoSize: {
|
|
1430
|
-
height: resetHeight,
|
|
1431
|
-
width: width
|
|
1432
|
-
}
|
|
1433
|
-
}));
|
|
1434
|
-
}, [tableSize, props]);
|
|
1435
1429
|
var changeSize = function changeSize() {
|
|
1436
1430
|
if (!tableWarpRef.current) {
|
|
1437
1431
|
return;
|
|
@@ -1447,6 +1441,18 @@ var ResizeSize = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
1447
1441
|
height: typeof height === 'string' ? "calc(".concat(height, " - ").concat(value, "px)") : height - value
|
|
1448
1442
|
});
|
|
1449
1443
|
};
|
|
1444
|
+
var throttleSize = (0, _react.useCallback)(function () {
|
|
1445
|
+
var width = tableSize.width;
|
|
1446
|
+
return /*#__PURE__*/_react.default.createElement(ResetTable, (0, _extends2.default)({
|
|
1447
|
+
ref: defaultRef
|
|
1448
|
+
}, props, {
|
|
1449
|
+
changeSize: changeSize,
|
|
1450
|
+
autoSize: {
|
|
1451
|
+
height: resetHeight,
|
|
1452
|
+
width: width
|
|
1453
|
+
}
|
|
1454
|
+
}));
|
|
1455
|
+
}, [tableSize, props]);
|
|
1450
1456
|
var handResize = (0, _lodash.throttle)(changeSize, 600);
|
|
1451
1457
|
(0, _react.useEffect)(function () {
|
|
1452
1458
|
var summary = props.summary;
|
package/lib/styles/variables.css
CHANGED