@teamix/pro 1.4.8 → 1.4.9
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/pro.js +28 -27
- package/dist/pro.min.js +1 -1
- package/es/actions/dialog.d.ts +5 -1
- package/es/actions/dialog.js +18 -11
- package/es/form/ProForm/index.js +1 -1
- package/es/index.d.ts +1 -1
- package/es/index.js +1 -1
- package/es/table/components/Filter/index.js +9 -15
- package/lib/actions/dialog.d.ts +5 -1
- package/lib/actions/dialog.js +17 -10
- package/lib/form/ProForm/index.js +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/table/components/Filter/index.js +9 -15
- package/package.json +1 -1
package/dist/pro.js
CHANGED
@@ -76326,7 +76326,7 @@ function useDialogTableAction(action, context) {
|
|
76326
76326
|
/* harmony import */ var _base__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(54842);
|
76327
76327
|
/* harmony import */ var _request__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(67096);
|
76328
76328
|
/* harmony import */ var _utils__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(95983);
|
76329
|
-
var _excluded = ["trigger", "url", "customRequest", "method", "params", "data", "extendParams", "successMsg", "errorMsg", "formatParams", "formatResult", "onSuccess", "onError"],
|
76329
|
+
var _excluded = ["trigger", "url", "customRequest", "method", "params", "data", "extendParams", "successMsg", "errorMsg", "formatParams", "formatResult", "onSuccess", "onError", "onOk", "onCancel"],
|
76330
76330
|
_excluded2 = ["title", "content", "component", "schema", "onFinish", "dialogType", "dialogQuickShowType", "messageType", "popType", "beforeRequest", "onTrigger", "link", "beforeContent", "afterContent", "message", "footerDescription", "footerAlign", "className"];
|
76331
76331
|
|
76332
76332
|
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); }
|
@@ -76361,7 +76361,9 @@ var FooterForm = function FooterForm(props) {
|
|
76361
76361
|
var schema = props.schema,
|
76362
76362
|
context = props.context,
|
76363
76363
|
formRef = props.formRef;
|
76364
|
-
var form = (0,
|
76364
|
+
var form = (0,react__WEBPACK_IMPORTED_MODULE_0__.useMemo)(function () {
|
76365
|
+
return (0,_form__WEBPACK_IMPORTED_MODULE_6__/* .createForm */ .Np)();
|
76366
|
+
}, []);
|
76365
76367
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
76366
76368
|
formRef.current = form;
|
76367
76369
|
}, []);
|
@@ -76404,6 +76406,8 @@ function useDialogAction(action, actionContext, hasForm) {
|
|
76404
76406
|
formatResult = action.formatResult,
|
76405
76407
|
onSuccess = action.onSuccess,
|
76406
76408
|
onError = action.onError,
|
76409
|
+
propsOnOk = action.onOk,
|
76410
|
+
propsOnCancel = action.onCancel,
|
76407
76411
|
others = _objectWithoutPropertiesLoose(action, _excluded);
|
76408
76412
|
|
76409
76413
|
var _getTargetValue = (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_5__.getTargetValue)(others, context),
|
@@ -76484,33 +76488,34 @@ function useDialogAction(action, actionContext, hasForm) {
|
|
76484
76488
|
|
76485
76489
|
case 6:
|
76486
76490
|
onFinish && onFinish();
|
76491
|
+
propsOnOk && propsOnOk(context);
|
76487
76492
|
resolve(true);
|
76488
|
-
_context.next =
|
76493
|
+
_context.next = 19;
|
76489
76494
|
break;
|
76490
76495
|
|
76491
|
-
case
|
76492
|
-
_context.prev =
|
76496
|
+
case 11:
|
76497
|
+
_context.prev = 11;
|
76493
76498
|
_context.t0 = _context["catch"](2);
|
76494
76499
|
setLoading(false); // 如果 beforeRequest 中返回了 false 并且不是 dialog-form,则直接关闭弹窗
|
76495
76500
|
|
76496
76501
|
if (!(beforeRequest && !hasForm)) {
|
76497
|
-
_context.next =
|
76502
|
+
_context.next = 17;
|
76498
76503
|
break;
|
76499
76504
|
}
|
76500
76505
|
|
76501
76506
|
resolve(true);
|
76502
76507
|
return _context.abrupt("return");
|
76503
76508
|
|
76504
|
-
case
|
76509
|
+
case 17:
|
76505
76510
|
resolve(false);
|
76506
76511
|
return _context.abrupt("return");
|
76507
76512
|
|
76508
|
-
case
|
76513
|
+
case 19:
|
76509
76514
|
case "end":
|
76510
76515
|
return _context.stop();
|
76511
76516
|
}
|
76512
76517
|
}
|
76513
|
-
}, _callee, null, [[2,
|
76518
|
+
}, _callee, null, [[2, 11]]);
|
76514
76519
|
}));
|
76515
76520
|
|
76516
76521
|
return function (_x) {
|
@@ -76533,7 +76538,9 @@ function useDialogAction(action, actionContext, hasForm) {
|
|
76533
76538
|
});
|
76534
76539
|
var dialogContent = Component ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(Component, (0,_utils__WEBPACK_IMPORTED_MODULE_10__/* .addContext */ .F)(componentProps, dialogContext)) : addContextForReactNode(content, dialogContext);
|
76535
76540
|
|
76536
|
-
var quickShowProps = _extends((_extends2 = {}, _extends2["" + (isPop ? 'onConfirm' : 'onOk')] = onOk, _extends2.
|
76541
|
+
var quickShowProps = _extends((_extends2 = {}, _extends2["" + (isPop ? 'onConfirm' : 'onOk')] = onOk, _extends2.onCancel = function onCancel() {
|
76542
|
+
propsOnCancel && propsOnCancel(context);
|
76543
|
+
}, _extends2.title = addContextForReactNode(title, dialogContext), _extends2.content = /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, beforeContent && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
76537
76544
|
className: "teamix-pro-dialog-before-content"
|
76538
76545
|
}, addContextForReactNode(beforeContent, dialogContext)), message && /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
|
76539
76546
|
className: "teamix-pro-dialog-message"
|
@@ -79999,7 +80006,7 @@ var ProForm = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.memo)(function
|
|
79999
80006
|
});
|
80000
80007
|
});
|
80001
80008
|
}
|
80002
|
-
}, [onChange]);
|
80009
|
+
}, [onChange, form]);
|
80003
80010
|
(0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
|
80004
80011
|
// 配置国际化
|
80005
80012
|
(0,_formily_core__WEBPACK_IMPORTED_MODULE_2__.setValidateLanguage)((0,_teamix_utils__WEBPACK_IMPORTED_MODULE_1__.getLanguage)() || 'zh-cn');
|
@@ -82379,7 +82386,7 @@ if (!((_window = window) != null && _window.TEAMIXPRO_WITHOUT_ICON)) {
|
|
82379
82386
|
|
82380
82387
|
|
82381
82388
|
|
82382
|
-
var version = '1.4.
|
82389
|
+
var version = '1.4.9';
|
82383
82390
|
|
82384
82391
|
|
82385
82392
|
/***/ }),
|
@@ -87189,7 +87196,7 @@ var Filter = function Filter(props) {
|
|
87189
87196
|
btn: true
|
87190
87197
|
}),
|
87191
87198
|
onClick: function onClick() {
|
87192
|
-
var _actionRef$current2, _actionRef$current$ge5, _actionRef$current3, _actionRef$current3$g, _actionRef$current4, _extends2;
|
87199
|
+
var _actionRef$current2, _actionRef$current$ge5, _actionRef$current3, _actionRef$current3$g, _actionRef$current4, _extends2, _actionRef$current5, _actionRef$current6, _actionRef$current6$r, _actionRef$current7, _actionRef$current8;
|
87193
87200
|
|
87194
87201
|
(_actionRef$current2 = actionRef.current) == null ? void 0 : _actionRef$current2.filterDataSource == null ? void 0 : _actionRef$current2.filterDataSource(column.dataIndex); // 先获取此列的param
|
87195
87202
|
|
@@ -87208,24 +87215,18 @@ var Filter = function Filter(props) {
|
|
87208
87215
|
rules: selected,
|
87209
87216
|
params: param
|
87210
87217
|
}, _extends2)));
|
87218
|
+
var targetPageKey = 'currentPage';
|
87219
|
+
var pageInfo = (_actionRef$current5 = actionRef.current) == null ? void 0 : _actionRef$current5.pageInfo;
|
87211
87220
|
|
87212
|
-
if (
|
87213
|
-
|
87221
|
+
if (pageInfo && pageInfo != null && pageInfo.targetPageKey) {
|
87222
|
+
targetPageKey = pageInfo == null ? void 0 : pageInfo.targetPageKey;
|
87223
|
+
} // 发送请求
|
87214
87224
|
|
87215
|
-
var targetPageKey = 'currentPage';
|
87216
|
-
var pageInfo = (_actionRef$current5 = actionRef.current) == null ? void 0 : _actionRef$current5.pageInfo;
|
87217
87225
|
|
87218
|
-
|
87219
|
-
|
87220
|
-
} // 发送请求
|
87221
|
-
|
87222
|
-
|
87223
|
-
(_actionRef$current6 = actionRef.current) == null ? void 0 : _actionRef$current6.request == null ? void 0 : _actionRef$current6.request((_actionRef$current6$r = {}, _actionRef$current6$r[targetPageKey] = 1, _actionRef$current6$r));
|
87224
|
-
(_actionRef$current7 = actionRef.current) == null ? void 0 : _actionRef$current7.resetPage == null ? void 0 : _actionRef$current7.resetPage(); // 清空表格选择
|
87225
|
-
|
87226
|
-
(_actionRef$current8 = actionRef.current) == null ? void 0 : _actionRef$current8.clearRowSelection == null ? void 0 : _actionRef$current8.clearRowSelection();
|
87227
|
-
}
|
87226
|
+
(_actionRef$current6 = actionRef.current) == null ? void 0 : _actionRef$current6.request == null ? void 0 : _actionRef$current6.request((_actionRef$current6$r = {}, _actionRef$current6$r[targetPageKey] = 1, _actionRef$current6$r));
|
87227
|
+
(_actionRef$current7 = actionRef.current) == null ? void 0 : _actionRef$current7.resetPage == null ? void 0 : _actionRef$current7.resetPage(); // 清空表格选择
|
87228
87228
|
|
87229
|
+
(_actionRef$current8 = actionRef.current) == null ? void 0 : _actionRef$current8.clearRowSelection == null ? void 0 : _actionRef$current8.clearRowSelection();
|
87229
87230
|
setVisible(false);
|
87230
87231
|
}
|
87231
87232
|
}, (0,_teamix_utils__WEBPACK_IMPORTED_MODULE_3__.getMessage)('ok')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_alicloudfe_components__WEBPACK_IMPORTED_MODULE_2__.Button, {
|