@titaui/pc 1.9.96 → 1.9.97
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.
|
@@ -23,6 +23,8 @@ require("rc-table/assets/index.css");
|
|
|
23
23
|
|
|
24
24
|
require("./index.css");
|
|
25
25
|
|
|
26
|
+
var _excluded = ["prefixCls", "columns", "tableData", "tableLayout", "total", "rowSelection", "pageNum", "setPageNum", "disablePagination", "pageSize", "setPageSize", "id", "setTableXScroll"];
|
|
27
|
+
|
|
26
28
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
27
29
|
|
|
28
30
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
@@ -31,6 +33,8 @@ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj &&
|
|
|
31
33
|
|
|
32
34
|
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
33
35
|
|
|
36
|
+
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
37
|
+
|
|
34
38
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
35
39
|
|
|
36
40
|
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
@@ -51,6 +55,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
51
55
|
|
|
52
56
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
53
57
|
|
|
58
|
+
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
59
|
+
|
|
60
|
+
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
61
|
+
|
|
54
62
|
var preCls = "tita-pc";
|
|
55
63
|
|
|
56
64
|
var initTableData = function initTableData(tableData) {
|
|
@@ -79,7 +87,8 @@ function _default(props) {
|
|
|
79
87
|
setPageSize = props.setPageSize,
|
|
80
88
|
_props$id = props.id,
|
|
81
89
|
id = _props$id === void 0 ? "" : _props$id,
|
|
82
|
-
setTableXScroll = props.setTableXScroll
|
|
90
|
+
setTableXScroll = props.setTableXScroll,
|
|
91
|
+
restProps = _objectWithoutProperties(props, _excluded);
|
|
83
92
|
|
|
84
93
|
var _useState = (0, _react.useState)(function () {
|
|
85
94
|
return initTableData(tableData);
|
|
@@ -232,14 +241,14 @@ function _default(props) {
|
|
|
232
241
|
if (!tableData || !tableData.length) return null;
|
|
233
242
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
234
243
|
className: (0, _classnames["default"])("".concat(preCls, "__table"))
|
|
235
|
-
}, /*#__PURE__*/_react["default"].createElement(_rcTable["default"], {
|
|
244
|
+
}, /*#__PURE__*/_react["default"].createElement(_rcTable["default"], _extends({
|
|
236
245
|
id: id,
|
|
237
246
|
className: (0, _classnames["default"])("".concat(preCls, "__table")),
|
|
238
247
|
prefixCls: prefixCls || "rc-table",
|
|
239
248
|
columns: getColumns(),
|
|
240
249
|
data: tdata,
|
|
241
250
|
tableLayout: tableLayout || "auto"
|
|
242
|
-
}), !disablePagination && /*#__PURE__*/_react["default"].createElement("div", {
|
|
251
|
+
}, restProps)), !disablePagination && /*#__PURE__*/_react["default"].createElement("div", {
|
|
243
252
|
className: (0, _classnames["default"])("".concat(preCls, "__table-pagination"))
|
|
244
253
|
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
245
254
|
className: (0, _classnames["default"])("".concat(preCls, "__table-pagination-left"))
|
package/package.json
CHANGED
|
@@ -36,6 +36,7 @@ export default function (props) {
|
|
|
36
36
|
setPageSize,
|
|
37
37
|
id = "",
|
|
38
38
|
setTableXScroll,
|
|
39
|
+
...restProps
|
|
39
40
|
} = props;
|
|
40
41
|
|
|
41
42
|
const [tdata, setTdata] = useState(() => initTableData(tableData));
|
|
@@ -165,6 +166,7 @@ export default function (props) {
|
|
|
165
166
|
columns={getColumns()}
|
|
166
167
|
data={tdata}
|
|
167
168
|
tableLayout={tableLayout || "auto"}
|
|
169
|
+
{...restProps}
|
|
168
170
|
/>
|
|
169
171
|
{!disablePagination
|
|
170
172
|
&& (
|