@fle-ui/plus-table 1.2.4 → 1.2.6
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/index.js +10 -6
- package/es/utils/common.d.ts +1 -0
- package/es/utils/common.js +12 -1
- package/lib/index.js +10 -6
- package/lib/utils/common.d.ts +1 -0
- package/lib/utils/common.js +13 -1
- package/package.json +2 -2
package/es/index.js
CHANGED
|
@@ -32,6 +32,7 @@ import { ProTable } from '@ant-design/pro-components';
|
|
|
32
32
|
import FormRender from './FormSearch/index';
|
|
33
33
|
import { BarsOutlined } from '@ant-design/icons';
|
|
34
34
|
import './FormSearch/index.less';
|
|
35
|
+
import { simulateClick } from './utils/common';
|
|
35
36
|
var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
36
37
|
var _otherProps$scroll;
|
|
37
38
|
var mode = props.mode,
|
|
@@ -121,7 +122,7 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
121
122
|
case 0:
|
|
122
123
|
newObj = {}; // 保存列设置的操作
|
|
123
124
|
if (!props.updateSetting) {
|
|
124
|
-
_context2.next =
|
|
125
|
+
_context2.next = 6;
|
|
125
126
|
break;
|
|
126
127
|
}
|
|
127
128
|
for (key in columnsStateMap) {
|
|
@@ -132,6 +133,8 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
132
133
|
_context2.next = 5;
|
|
133
134
|
return props.updateSetting(newObj);
|
|
134
135
|
case 5:
|
|
136
|
+
simulateClick();
|
|
137
|
+
case 6:
|
|
135
138
|
case "end":
|
|
136
139
|
return _context2.stop();
|
|
137
140
|
}
|
|
@@ -280,14 +283,15 @@ var PlusTable = /*#__PURE__*/forwardRef(function (props, ref) {
|
|
|
280
283
|
}();
|
|
281
284
|
return /*#__PURE__*/React.createElement("div", {
|
|
282
285
|
className: "page_plustable__body"
|
|
283
|
-
}, /*#__PURE__*/React.createElement(ProTable, _extends({
|
|
284
|
-
// 公共配置 大家都有的
|
|
285
|
-
pagination: pagination,
|
|
286
|
-
actionRef: actionRef,
|
|
287
|
-
formRef: searchRef,
|
|
286
|
+
}, /*#__PURE__*/React.createElement(ProTable, _extends({
|
|
288
287
|
scroll: {
|
|
289
288
|
x: (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$scroll = otherProps.scroll) === null || _otherProps$scroll === void 0 ? void 0 : _otherProps$scroll.x) || 1300
|
|
290
289
|
}
|
|
290
|
+
}, otherProps, {
|
|
291
|
+
// 公共配置 大家都有的
|
|
292
|
+
pagination: pagination,
|
|
293
|
+
actionRef: actionRef,
|
|
294
|
+
formRef: searchRef
|
|
291
295
|
// 根据用户自定义的配置 如果配置了高级筛选就有这个配置
|
|
292
296
|
,
|
|
293
297
|
search: (action === null || action === void 0 ? void 0 : action.includes('advancedFilter')) ? {
|
package/es/utils/common.d.ts
CHANGED
package/es/utils/common.js
CHANGED
|
@@ -28,4 +28,15 @@ export var parseQueryString = function parseQueryString() {
|
|
|
28
28
|
_iterator.f();
|
|
29
29
|
}
|
|
30
30
|
return params;
|
|
31
|
-
};
|
|
31
|
+
};
|
|
32
|
+
export function simulateClick() {
|
|
33
|
+
var element = document.elementFromPoint(0, 0);
|
|
34
|
+
var mouseEvent = new MouseEvent('mousedown', {
|
|
35
|
+
bubbles: true,
|
|
36
|
+
cancelable: true,
|
|
37
|
+
view: window,
|
|
38
|
+
clientX: 0,
|
|
39
|
+
clientY: 0
|
|
40
|
+
});
|
|
41
|
+
element === null || element === void 0 ? void 0 : element.dispatchEvent(mouseEvent);
|
|
42
|
+
}
|
package/lib/index.js
CHANGED
|
@@ -11,6 +11,7 @@ var _antd = require("antd");
|
|
|
11
11
|
var _index = _interopRequireDefault(require("./FormSearch/index"));
|
|
12
12
|
var _icons = require("@ant-design/icons");
|
|
13
13
|
require("./FormSearch/index.less");
|
|
14
|
+
var _common = require("./utils/common");
|
|
14
15
|
var _excluded = ["mode", "columns", "hasShowFull", "request", "pagination", "formRef", "actionRef", "defaultColumnsState", "options", "action"];
|
|
15
16
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
17
|
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
|
|
@@ -121,7 +122,7 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
121
122
|
case 0:
|
|
122
123
|
newObj = {}; // 保存列设置的操作
|
|
123
124
|
if (!props.updateSetting) {
|
|
124
|
-
_context2.next =
|
|
125
|
+
_context2.next = 6;
|
|
125
126
|
break;
|
|
126
127
|
}
|
|
127
128
|
for (key in columnsStateMap) {
|
|
@@ -132,6 +133,8 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
132
133
|
_context2.next = 5;
|
|
133
134
|
return props.updateSetting(newObj);
|
|
134
135
|
case 5:
|
|
136
|
+
(0, _common.simulateClick)();
|
|
137
|
+
case 6:
|
|
135
138
|
case "end":
|
|
136
139
|
return _context2.stop();
|
|
137
140
|
}
|
|
@@ -280,14 +283,15 @@ var PlusTable = /*#__PURE__*/(0, _react.forwardRef)(function (props, ref) {
|
|
|
280
283
|
}();
|
|
281
284
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
282
285
|
className: "page_plustable__body"
|
|
283
|
-
}, /*#__PURE__*/_react.default.createElement(_proComponents.ProTable, _extends({
|
|
284
|
-
// 公共配置 大家都有的
|
|
285
|
-
pagination: pagination,
|
|
286
|
-
actionRef: actionRef,
|
|
287
|
-
formRef: searchRef,
|
|
286
|
+
}, /*#__PURE__*/_react.default.createElement(_proComponents.ProTable, _extends({
|
|
288
287
|
scroll: {
|
|
289
288
|
x: (otherProps === null || otherProps === void 0 ? void 0 : (_otherProps$scroll = otherProps.scroll) === null || _otherProps$scroll === void 0 ? void 0 : _otherProps$scroll.x) || 1300
|
|
290
289
|
}
|
|
290
|
+
}, otherProps, {
|
|
291
|
+
// 公共配置 大家都有的
|
|
292
|
+
pagination: pagination,
|
|
293
|
+
actionRef: actionRef,
|
|
294
|
+
formRef: searchRef
|
|
291
295
|
// 根据用户自定义的配置 如果配置了高级筛选就有这个配置
|
|
292
296
|
,
|
|
293
297
|
search: (action === null || action === void 0 ? void 0 : action.includes('advancedFilter')) ? {
|
package/lib/utils/common.d.ts
CHANGED
package/lib/utils/common.js
CHANGED
|
@@ -4,6 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.showTime = exports.showMoney = exports.parseQueryString = void 0;
|
|
7
|
+
exports.simulateClick = simulateClick;
|
|
7
8
|
var _dayjs = _interopRequireDefault(require("dayjs"));
|
|
8
9
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
10
|
function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike && o && typeof o.length === "number") { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it.return != null) it.return(); } finally { if (didErr) throw err; } } }; }
|
|
@@ -35,4 +36,15 @@ var parseQueryString = exports.parseQueryString = function parseQueryString() {
|
|
|
35
36
|
_iterator.f();
|
|
36
37
|
}
|
|
37
38
|
return params;
|
|
38
|
-
};
|
|
39
|
+
};
|
|
40
|
+
function simulateClick() {
|
|
41
|
+
var element = document.elementFromPoint(0, 0);
|
|
42
|
+
var mouseEvent = new MouseEvent('mousedown', {
|
|
43
|
+
bubbles: true,
|
|
44
|
+
cancelable: true,
|
|
45
|
+
view: window,
|
|
46
|
+
clientX: 0,
|
|
47
|
+
clientY: 0
|
|
48
|
+
});
|
|
49
|
+
element === null || element === void 0 ? void 0 : element.dispatchEvent(mouseEvent);
|
|
50
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fle-ui/plus-table",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.6",
|
|
4
4
|
"description": "@fle-ui/plus-table",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"fle-ui",
|
|
@@ -46,5 +46,5 @@
|
|
|
46
46
|
"@ant-design/pro-components": "^2.7.0",
|
|
47
47
|
"dayjs": "^1.11.10"
|
|
48
48
|
},
|
|
49
|
-
"gitHead": "
|
|
49
|
+
"gitHead": "389aabf9f99405522b7ccd25657694ec9c847541"
|
|
50
50
|
}
|