@bit-sun/business-component 2.4.21 → 2.4.22
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/index.esm.js +15 -10
- package/dist/index.js +15 -10
- package/package.json +1 -1
- package/src/components/Business/DetailPageWrapper/utils.tsx +15 -11
package/dist/index.esm.js
CHANGED
|
@@ -12093,16 +12093,21 @@ var doDetailPageAction = function doDetailPageAction(config) {
|
|
|
12093
12093
|
successMessage: config === null || config === void 0 ? void 0 : config.successMessage
|
|
12094
12094
|
};
|
|
12095
12095
|
var onOk = function onOk() {
|
|
12096
|
-
|
|
12097
|
-
|
|
12098
|
-
|
|
12099
|
-
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
|
|
12103
|
-
|
|
12104
|
-
|
|
12105
|
-
|
|
12096
|
+
return new Promise(function (resolve, reject) {
|
|
12097
|
+
request$1(requestConfig).then(function (res) {
|
|
12098
|
+
resolve(res);
|
|
12099
|
+
if (config.backPath) {
|
|
12100
|
+
history.push({
|
|
12101
|
+
pathname: config.backPath
|
|
12102
|
+
});
|
|
12103
|
+
}
|
|
12104
|
+
// 是否执行成功之后的回调
|
|
12105
|
+
if (typeof config.successCb === 'function') {
|
|
12106
|
+
config.successCb(res);
|
|
12107
|
+
}
|
|
12108
|
+
}).catch(function (error) {
|
|
12109
|
+
return reject(error);
|
|
12110
|
+
});
|
|
12106
12111
|
});
|
|
12107
12112
|
};
|
|
12108
12113
|
if (config.noConfirm) {
|
package/dist/index.js
CHANGED
|
@@ -12113,16 +12113,21 @@ var doDetailPageAction = function doDetailPageAction(config) {
|
|
|
12113
12113
|
successMessage: config === null || config === void 0 ? void 0 : config.successMessage
|
|
12114
12114
|
};
|
|
12115
12115
|
var onOk = function onOk() {
|
|
12116
|
-
|
|
12117
|
-
|
|
12118
|
-
|
|
12119
|
-
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
|
|
12123
|
-
|
|
12124
|
-
|
|
12125
|
-
|
|
12116
|
+
return new Promise(function (resolve, reject) {
|
|
12117
|
+
bssula.request(requestConfig).then(function (res) {
|
|
12118
|
+
resolve(res);
|
|
12119
|
+
if (config.backPath) {
|
|
12120
|
+
umi.history.push({
|
|
12121
|
+
pathname: config.backPath
|
|
12122
|
+
});
|
|
12123
|
+
}
|
|
12124
|
+
// 是否执行成功之后的回调
|
|
12125
|
+
if (typeof config.successCb === 'function') {
|
|
12126
|
+
config.successCb(res);
|
|
12127
|
+
}
|
|
12128
|
+
}).catch(function (error) {
|
|
12129
|
+
return reject(error);
|
|
12130
|
+
});
|
|
12126
12131
|
});
|
|
12127
12132
|
};
|
|
12128
12133
|
if (config.noConfirm) {
|
package/package.json
CHANGED
|
@@ -4,6 +4,7 @@ import { Modal } from 'antd';
|
|
|
4
4
|
import { ExclamationCircleOutlined } from '@ant-design/icons';
|
|
5
5
|
import React from 'react';
|
|
6
6
|
import { history } from 'umi';
|
|
7
|
+
import { handleError } from '@/utils/requestUtils';
|
|
7
8
|
|
|
8
9
|
interface actionItem {
|
|
9
10
|
[propName: string]: any;
|
|
@@ -21,17 +22,20 @@ export const doDetailPageAction = (config: actionItem) => {
|
|
|
21
22
|
|
|
22
23
|
|
|
23
24
|
const onOk = () => {
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
25
|
+
return new Promise((resolve, reject) => {
|
|
26
|
+
request(requestConfig).then((res) => {
|
|
27
|
+
resolve(res);
|
|
28
|
+
if (config.backPath) {
|
|
29
|
+
history.push({
|
|
30
|
+
pathname: config.backPath
|
|
31
|
+
})
|
|
32
|
+
}
|
|
33
|
+
// 是否执行成功之后的回调
|
|
34
|
+
if (typeof (config.successCb) === 'function') {
|
|
35
|
+
config.successCb(res);
|
|
36
|
+
}
|
|
37
|
+
}).catch(error => reject(error));
|
|
38
|
+
})
|
|
35
39
|
};
|
|
36
40
|
|
|
37
41
|
if (config.noConfirm) {
|