@guo514360255/antd-lib 1.4.6 → 1.4.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.
@@ -21,6 +21,7 @@ import React, { forwardRef, useEffect, useImperativeHandle, useRef, useState } f
21
21
  import CustomDetailModal from "../CustomDetailModal";
22
22
  import "./index.less";
23
23
  var CustomTable = /*#__PURE__*/forwardRef(function (props, ref) {
24
+ var _columns$filter;
24
25
  var _props$isIndex = props.isIndex,
25
26
  isIndex = _props$isIndex === void 0 ? true : _props$isIndex,
26
27
  _props$isDelete = props.isDelete,
@@ -162,7 +163,7 @@ var CustomTable = /*#__PURE__*/forwardRef(function (props, ref) {
162
163
  return _ref3.apply(this, arguments);
163
164
  };
164
165
  }();
165
- var _openModal = function openModal() {
166
+ var openModal = function openModal() {
166
167
  var _formModalRef$current;
167
168
  var record = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
168
169
  // @ts-ignore
@@ -174,13 +175,12 @@ var CustomTable = /*#__PURE__*/forwardRef(function (props, ref) {
174
175
  var _actionRef$current2;
175
176
  (_actionRef$current2 = actionRef.current) === null || _actionRef$current2 === void 0 || _actionRef$current2.reload();
176
177
  },
177
- openModal: function openModal() {
178
- var data = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
179
- _openModal(data);
180
- }
178
+ openModal: openModal
181
179
  };
182
180
  });
183
- var totalWidth = columns === null || columns === void 0 ? void 0 : columns.reduce(function (sum, col) {
181
+ var totalWidth = columns === null || columns === void 0 || (_columns$filter = columns.filter(function (item) {
182
+ return !item.hideInTable;
183
+ })) === null || _columns$filter === void 0 ? void 0 : _columns$filter.reduce(function (sum, col) {
184
184
  return sum + (col.width || 100);
185
185
  }, 0);
186
186
  var handleColumns = function handleColumns() {
@@ -249,7 +249,7 @@ var CustomTable = /*#__PURE__*/forwardRef(function (props, ref) {
249
249
  }, "\u8BE6\u60C5"), isUpdate && /*#__PURE__*/React.createElement(Button, {
250
250
  type: "link",
251
251
  onClick: function onClick() {
252
- return _openModal(record);
252
+ return openModal(record);
253
253
  }
254
254
  }, "\u7F16\u8F91"), isDelete && /*#__PURE__*/React.createElement(Popconfirm, {
255
255
  title: "\u786E\u5B9A\u5220\u9664\u5F53\u524D\u6570\u636E\uFF1F",
@@ -392,7 +392,7 @@ var CustomTable = /*#__PURE__*/forwardRef(function (props, ref) {
392
392
  // @ts-ignore
393
393
  ,
394
394
  onClick: function onClick() {
395
- return _openModal({});
395
+ return openModal({});
396
396
  }
397
397
  }, createText || '创建')] : []));
398
398
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@guo514360255/antd-lib",
3
- "version": "1.4.6",
3
+ "version": "1.4.8",
4
4
  "description": "react design 5 lib",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",