@xatlas/rainbow-core 2.2.8 → 2.2.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/core.common.js +51 -14
- package/dist/core.common.js.map +1 -1
- package/dist/core.umd.js +51 -14
- 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
|
@@ -4596,33 +4596,70 @@ function base_toPrimitive(t, r) { if ("object" != base_typeof(t) || !t) return t
|
|
|
4596
4596
|
}, _callee10);
|
|
4597
4597
|
}))();
|
|
4598
4598
|
},
|
|
4599
|
-
|
|
4599
|
+
// 跳转至新窗口
|
|
4600
|
+
handleBlank: function handleBlank(action) {
|
|
4600
4601
|
var _this9 = this;
|
|
4601
|
-
|
|
4602
|
+
this.$confirm({
|
|
4603
|
+
title: action.name,
|
|
4604
|
+
content: "\u786E\u8BA4\u5BF9\u9009\u5B9A\u7684\u6570\u636E\u8FDB\u884C\u3010".concat(action.name, "\u3011\u64CD\u4F5C?"),
|
|
4605
|
+
okText: '确定',
|
|
4606
|
+
cancelText: '取消',
|
|
4607
|
+
onOk: function () {
|
|
4608
|
+
var _onOk2 = base_asyncToGenerator( /*#__PURE__*/base_regeneratorRuntime().mark(function _callee11() {
|
|
4609
|
+
var path, res;
|
|
4610
|
+
return base_regeneratorRuntime().wrap(function _callee11$(_context11) {
|
|
4611
|
+
while (1) switch (_context11.prev = _context11.next) {
|
|
4612
|
+
case 0:
|
|
4613
|
+
path = action.key ? "".concat(_this9.pageKey, "/").concat(action.key) : action.id;
|
|
4614
|
+
_context11.next = 3;
|
|
4615
|
+
return _this9.$api[action.method.toLowerCase() || 'post']("api/".concat(path), _this9.actionModel || _this9.selections[0]);
|
|
4616
|
+
case 3:
|
|
4617
|
+
res = _context11.sent;
|
|
4618
|
+
if (res.data.status === 200) {
|
|
4619
|
+
window.open(res.data.data.openNewUrl, '_blank');
|
|
4620
|
+
} else {
|
|
4621
|
+
_this9.$message.error(res.data.content);
|
|
4622
|
+
}
|
|
4623
|
+
case 5:
|
|
4624
|
+
case "end":
|
|
4625
|
+
return _context11.stop();
|
|
4626
|
+
}
|
|
4627
|
+
}, _callee11);
|
|
4628
|
+
}));
|
|
4629
|
+
function onOk() {
|
|
4630
|
+
return _onOk2.apply(this, arguments);
|
|
4631
|
+
}
|
|
4632
|
+
return onOk;
|
|
4633
|
+
}()
|
|
4634
|
+
});
|
|
4635
|
+
},
|
|
4636
|
+
handleRefresh: function handleRefresh() {
|
|
4637
|
+
var _this10 = this;
|
|
4638
|
+
return base_asyncToGenerator( /*#__PURE__*/base_regeneratorRuntime().mark(function _callee12() {
|
|
4602
4639
|
var data, code;
|
|
4603
|
-
return base_regeneratorRuntime().wrap(function
|
|
4604
|
-
while (1) switch (
|
|
4640
|
+
return base_regeneratorRuntime().wrap(function _callee12$(_context12) {
|
|
4641
|
+
while (1) switch (_context12.prev = _context12.next) {
|
|
4605
4642
|
case 0:
|
|
4606
|
-
if (!
|
|
4607
|
-
|
|
4643
|
+
if (!_this10.load) {
|
|
4644
|
+
_context12.next = 7;
|
|
4608
4645
|
break;
|
|
4609
4646
|
}
|
|
4610
|
-
|
|
4611
|
-
return
|
|
4647
|
+
_context12.next = 3;
|
|
4648
|
+
return _this10.load();
|
|
4612
4649
|
case 3:
|
|
4613
|
-
data =
|
|
4614
|
-
|
|
4615
|
-
return flushed('refresh',
|
|
4650
|
+
data = _context12.sent;
|
|
4651
|
+
_context12.next = 6;
|
|
4652
|
+
return flushed('refresh', _this10);
|
|
4616
4653
|
case 6:
|
|
4617
4654
|
if (data instanceof Error) {
|
|
4618
4655
|
code = data.response.data.code;
|
|
4619
|
-
code === 404 &&
|
|
4656
|
+
code === 404 && _this10.handleBack();
|
|
4620
4657
|
}
|
|
4621
4658
|
case 7:
|
|
4622
4659
|
case "end":
|
|
4623
|
-
return
|
|
4660
|
+
return _context12.stop();
|
|
4624
4661
|
}
|
|
4625
|
-
},
|
|
4662
|
+
}, _callee12);
|
|
4626
4663
|
}))();
|
|
4627
4664
|
},
|
|
4628
4665
|
handleBack: function handleBack() {
|