@xatlas/rainbow-core 2.2.9 → 2.3.0
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/core.common.js +20 -9
- package/dist/core.common.js.map +1 -1
- package/dist/core.umd.js +20 -9
- package/dist/core.umd.js.map +1 -1
- package/dist/core.umd.min.js +1 -1
- package/dist/core.umd.min.js.map +1 -1
- package/package.json +1 -1
package/dist/core.common.js
CHANGED
|
@@ -4469,20 +4469,22 @@ function base_toPrimitive(t, r) { if ("object" != base_typeof(t) || !t) return t
|
|
|
4469
4469
|
var _arguments2 = arguments,
|
|
4470
4470
|
_this5 = this;
|
|
4471
4471
|
return base_asyncToGenerator( /*#__PURE__*/base_regeneratorRuntime().mark(function _callee7() {
|
|
4472
|
-
var n, len, numTxt,
|
|
4472
|
+
var n, len, _this5$action$params, _this5$action$params2, _this5$action$params3, _this5$action$params4, _this5$action$params5, redirect, numTxt, saveDataParams, handleConfirmRoload, handleRedirect;
|
|
4473
4473
|
return base_regeneratorRuntime().wrap(function _callee7$(_context7) {
|
|
4474
4474
|
while (1) switch (_context7.prev = _context7.next) {
|
|
4475
4475
|
case 0:
|
|
4476
4476
|
n = _arguments2.length > 1 && _arguments2[1] !== undefined ? _arguments2[1] : 0;
|
|
4477
|
-
len = _this5.selections.length;
|
|
4477
|
+
len = _this5.selections.length; // actionAfterDriver 为动作前端后置操作,redirect 为 true 时,确定后会跳转到新的视图,视图链接字段(redirectUrl)由接口返回;
|
|
4478
|
+
// 注意:链接为“#”后面的内容;
|
|
4479
|
+
_this5$action$params = _this5.action.params, _this5$action$params2 = _this5$action$params === void 0 ? {} : _this5$action$params, _this5$action$params3 = _this5$action$params2.actionAfterDriver, _this5$action$params4 = _this5$action$params3 === void 0 ? {} : _this5$action$params3, _this5$action$params5 = _this5$action$params4.redirect, redirect = _this5$action$params5 === void 0 ? false : _this5$action$params5;
|
|
4478
4480
|
if (!(n && len > n)) {
|
|
4479
|
-
_context7.next =
|
|
4481
|
+
_context7.next = 5;
|
|
4480
4482
|
break;
|
|
4481
4483
|
}
|
|
4482
4484
|
return _context7.abrupt("return", _this5.$message.error("\u6240\u9009\u6570\u636E\u4E0D\u5141\u8BB8\u8D85\u8FC7 ".concat(n, " \u6761")));
|
|
4483
|
-
case
|
|
4485
|
+
case 5:
|
|
4484
4486
|
numTxt = len > 1 ? " ".concat(len, " \u6761") : '';
|
|
4485
|
-
|
|
4487
|
+
saveDataParams = {
|
|
4486
4488
|
method: action.method || 'post',
|
|
4487
4489
|
key: action.key,
|
|
4488
4490
|
data: _this5.selections.length ? _this5.selections : [_this5.actionModel],
|
|
@@ -4497,36 +4499,45 @@ function base_toPrimitive(t, r) { if ("object" != base_typeof(t) || !t) return t
|
|
|
4497
4499
|
}
|
|
4498
4500
|
}
|
|
4499
4501
|
};
|
|
4502
|
+
handleRedirect = function handleRedirect(data) {
|
|
4503
|
+
if (redirect && data.redirectUrl) {
|
|
4504
|
+
_this5.$router.push(data.redirectUrl);
|
|
4505
|
+
}
|
|
4506
|
+
};
|
|
4500
4507
|
_this5.$confirm({
|
|
4501
4508
|
title: action.name,
|
|
4502
4509
|
content: "\u786E\u8BA4\u5BF9\u9009\u5B9A\u7684".concat(numTxt, "\u6570\u636E\u8FDB\u884C\u3010").concat(action.name, "\u3011\u64CD\u4F5C?"),
|
|
4503
4510
|
okText: '确定',
|
|
4504
4511
|
cancelText: '取消',
|
|
4505
4512
|
onOk: action.params && action.params.sync ? function () {
|
|
4506
|
-
_this5.saveData(
|
|
4513
|
+
var data = _this5.saveData(saveDataParams);
|
|
4507
4514
|
handleConfirmRoload();
|
|
4508
4515
|
// bulk,one 动作
|
|
4509
4516
|
// 刷新数据
|
|
4510
4517
|
flushed(action, _this5);
|
|
4518
|
+
handleRedirect(data);
|
|
4511
4519
|
} : /*#__PURE__*/base_asyncToGenerator( /*#__PURE__*/base_regeneratorRuntime().mark(function _callee6() {
|
|
4520
|
+
var data;
|
|
4512
4521
|
return base_regeneratorRuntime().wrap(function _callee6$(_context6) {
|
|
4513
4522
|
while (1) switch (_context6.prev = _context6.next) {
|
|
4514
4523
|
case 0:
|
|
4515
4524
|
_context6.next = 2;
|
|
4516
|
-
return _this5.saveData(
|
|
4525
|
+
return _this5.saveData(saveDataParams);
|
|
4517
4526
|
case 2:
|
|
4527
|
+
data = _context6.sent;
|
|
4518
4528
|
handleConfirmRoload();
|
|
4519
4529
|
// bulk,one 动作
|
|
4520
4530
|
// 刷新数据
|
|
4521
4531
|
flushed(action, _this5);
|
|
4522
|
-
|
|
4532
|
+
handleRedirect(data);
|
|
4533
|
+
case 6:
|
|
4523
4534
|
case "end":
|
|
4524
4535
|
return _context6.stop();
|
|
4525
4536
|
}
|
|
4526
4537
|
}, _callee6);
|
|
4527
4538
|
}))
|
|
4528
4539
|
});
|
|
4529
|
-
case
|
|
4540
|
+
case 10:
|
|
4530
4541
|
case "end":
|
|
4531
4542
|
return _context7.stop();
|
|
4532
4543
|
}
|