@bchr/bchr-front-lib 0.3.144 → 0.3.147
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/lib/base/layout/modal/SmartModal.js +21 -5
- package/lib/base/layout/ui_tpl/form/FormForModify.js +1 -1
- package/lib/base/layout/ui_tpl/modal/FormModifyModal.js +4 -0
- package/package.json +1 -1
- package/src/base/layout/modal/SmartModal.js +13 -8
- package/src/base/layout/ui_tpl/form/FormForModify.js +1 -1
- package/src/base/layout/ui_tpl/modal/FormModifyModal.js +4 -0
|
@@ -54,7 +54,7 @@ var SmartMessage = {
|
|
|
54
54
|
exports.SmartMessage = SmartMessage;
|
|
55
55
|
|
|
56
56
|
var showConfirm = function showConfirm(options) {
|
|
57
|
-
|
|
57
|
+
_antd.Modal.confirm({
|
|
58
58
|
centered: true,
|
|
59
59
|
title: options.title,
|
|
60
60
|
content: options.content,
|
|
@@ -64,16 +64,16 @@ var showConfirm = function showConfirm(options) {
|
|
|
64
64
|
closable: options.closable,
|
|
65
65
|
onOk: function onOk(e) {
|
|
66
66
|
options.okCallback ? options.okCallback(e) : function () {};
|
|
67
|
+
|
|
68
|
+
_antd.Modal.destroyAll();
|
|
67
69
|
},
|
|
68
70
|
onCancel: function onCancel(e) {
|
|
71
|
+
_antd.Modal.destroyAll();
|
|
72
|
+
|
|
69
73
|
options.cancelCallback ? options.cancelCallback(e) : function () {};
|
|
70
74
|
},
|
|
71
75
|
autoFocusButton: null
|
|
72
76
|
});
|
|
73
|
-
|
|
74
|
-
return /*#__PURE__*/_react["default"].createElement(_antd.ConfigProvider, {
|
|
75
|
-
locale: _zh_CN["default"]
|
|
76
|
-
}, confirmDlgHandler);
|
|
77
77
|
};
|
|
78
78
|
|
|
79
79
|
var showInfo = function showInfo(options) {
|
|
@@ -86,6 +86,8 @@ var showInfo = function showInfo(options) {
|
|
|
86
86
|
closable: options.closable,
|
|
87
87
|
onOk: function onOk(e) {
|
|
88
88
|
options.okCallback ? options.okCallback(e) : function () {};
|
|
89
|
+
|
|
90
|
+
_antd.Modal.destroyAll();
|
|
89
91
|
}
|
|
90
92
|
});
|
|
91
93
|
|
|
@@ -104,6 +106,8 @@ var showSuccess = function showSuccess(options) {
|
|
|
104
106
|
closable: options.closable,
|
|
105
107
|
onOk: function onOk(e) {
|
|
106
108
|
options.okCallback ? options.okCallback(e) : function () {};
|
|
109
|
+
|
|
110
|
+
_antd.Modal.destroyAll();
|
|
107
111
|
}
|
|
108
112
|
});
|
|
109
113
|
|
|
@@ -122,6 +126,8 @@ var showError = function showError(options) {
|
|
|
122
126
|
closable: options.closable,
|
|
123
127
|
onOk: function onOk(e) {
|
|
124
128
|
options.okCallback ? options.okCallback(e) : function () {};
|
|
129
|
+
|
|
130
|
+
_antd.Modal.destroyAll();
|
|
125
131
|
}
|
|
126
132
|
});
|
|
127
133
|
|
|
@@ -140,6 +146,8 @@ var showWarn = function showWarn(options) {
|
|
|
140
146
|
closable: options.closable,
|
|
141
147
|
onOk: function onOk(e) {
|
|
142
148
|
options.okCallback ? options.okCallback(e) : function () {};
|
|
149
|
+
|
|
150
|
+
_antd.Modal.destroyAll();
|
|
143
151
|
}
|
|
144
152
|
});
|
|
145
153
|
|
|
@@ -160,6 +168,8 @@ var showAutoCloseInfo = function showAutoCloseInfo(options) {
|
|
|
160
168
|
closable: options.closable,
|
|
161
169
|
onOk: function onOk(e) {
|
|
162
170
|
options.okCallback ? options.okCallback(e) : function () {};
|
|
171
|
+
|
|
172
|
+
_antd.Modal.destroyAll();
|
|
163
173
|
}
|
|
164
174
|
});
|
|
165
175
|
|
|
@@ -186,6 +196,8 @@ var showAutoCloseSuccess = function showAutoCloseSuccess(options) {
|
|
|
186
196
|
closable: options.closable,
|
|
187
197
|
onOk: function onOk(e) {
|
|
188
198
|
options.okCallback ? options.okCallback(e) : function () {};
|
|
199
|
+
|
|
200
|
+
_antd.Modal.destroyAll();
|
|
189
201
|
}
|
|
190
202
|
});
|
|
191
203
|
|
|
@@ -212,6 +224,8 @@ var showAutoCloseError = function showAutoCloseError(options) {
|
|
|
212
224
|
closable: options.closable,
|
|
213
225
|
onOk: function onOk(e) {
|
|
214
226
|
options.okCallback ? options.okCallback(e) : function () {};
|
|
227
|
+
|
|
228
|
+
_antd.Modal.destroyAll();
|
|
215
229
|
}
|
|
216
230
|
});
|
|
217
231
|
|
|
@@ -238,6 +252,8 @@ var showAutoCloseWarn = function showAutoCloseWarn(options) {
|
|
|
238
252
|
closable: options.closable,
|
|
239
253
|
onOk: function onOk(e) {
|
|
240
254
|
options.okCallback ? options.okCallback(e) : function () {};
|
|
255
|
+
|
|
256
|
+
_antd.Modal.destroyAll();
|
|
241
257
|
}
|
|
242
258
|
});
|
|
243
259
|
|
|
@@ -511,7 +511,7 @@ var FormForModify = /*#__PURE__*/function (_React$Component) {
|
|
|
511
511
|
|
|
512
512
|
case _consts.UI_RENDER_TYPE.TREE_SELECT:
|
|
513
513
|
if (b_multiple) {
|
|
514
|
-
initialValue =
|
|
514
|
+
initialValue = data[code] || [];
|
|
515
515
|
|
|
516
516
|
if (_typeof(initialValue) !== "object") {
|
|
517
517
|
initialValue = initialValue ? JSON.parse(initialValue) : [];
|
|
@@ -92,6 +92,10 @@ var FormModifyModal = function FormModifyModal(props) {
|
|
|
92
92
|
});
|
|
93
93
|
};
|
|
94
94
|
|
|
95
|
+
var closeLoading = function closeLoading() {
|
|
96
|
+
setLoading(false);
|
|
97
|
+
};
|
|
98
|
+
|
|
95
99
|
return /*#__PURE__*/_react["default"].createElement(_SModal["default"], {
|
|
96
100
|
className: "form-modify-modal my-fix-auto-height",
|
|
97
101
|
width: 1000,
|
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ const SmartMessage = {
|
|
|
48
48
|
};
|
|
49
49
|
|
|
50
50
|
const showConfirm = function(options){
|
|
51
|
-
|
|
51
|
+
Modal.confirm({
|
|
52
52
|
centered: true,
|
|
53
53
|
title: options.title,
|
|
54
54
|
content: options.content,
|
|
@@ -56,19 +56,16 @@ const showConfirm = function(options){
|
|
|
56
56
|
cancelText: options.cancelText,
|
|
57
57
|
zIndex: options.zIndex,
|
|
58
58
|
closable: options.closable,
|
|
59
|
-
onOk(e) {
|
|
59
|
+
onOk: (e) => {
|
|
60
60
|
options.okCallback ? options.okCallback(e) : function () {};
|
|
61
|
+
Modal.destroyAll()
|
|
61
62
|
},
|
|
62
|
-
onCancel(e) {
|
|
63
|
+
onCancel: (e) => {
|
|
64
|
+
Modal.destroyAll()
|
|
63
65
|
options.cancelCallback ? options.cancelCallback(e) : function() {};
|
|
64
66
|
},
|
|
65
67
|
autoFocusButton: null
|
|
66
68
|
});
|
|
67
|
-
|
|
68
|
-
return <ConfigProvider locale={zhCN}>
|
|
69
|
-
{confirmDlgHandler}
|
|
70
|
-
</ConfigProvider>;
|
|
71
|
-
|
|
72
69
|
};
|
|
73
70
|
|
|
74
71
|
const showInfo = function(options) {
|
|
@@ -81,6 +78,7 @@ const showInfo = function(options) {
|
|
|
81
78
|
closable: options.closable,
|
|
82
79
|
onOk(e) {
|
|
83
80
|
options.okCallback ? options.okCallback(e) : function () {}
|
|
81
|
+
Modal.destroyAll()
|
|
84
82
|
},
|
|
85
83
|
});
|
|
86
84
|
|
|
@@ -99,6 +97,7 @@ const showSuccess = function(options) {
|
|
|
99
97
|
closable: options.closable,
|
|
100
98
|
onOk(e) {
|
|
101
99
|
options.okCallback ? options.okCallback(e) : function () {}
|
|
100
|
+
Modal.destroyAll()
|
|
102
101
|
},
|
|
103
102
|
});
|
|
104
103
|
|
|
@@ -117,6 +116,7 @@ const showError = function(options) {
|
|
|
117
116
|
closable: options.closable,
|
|
118
117
|
onOk(e) {
|
|
119
118
|
options.okCallback ? options.okCallback(e) : function () {}
|
|
119
|
+
Modal.destroyAll()
|
|
120
120
|
},
|
|
121
121
|
});
|
|
122
122
|
|
|
@@ -135,6 +135,7 @@ const showWarn = function(options) {
|
|
|
135
135
|
closable: options.closable,
|
|
136
136
|
onOk(e) {
|
|
137
137
|
options.okCallback ? options.okCallback(e) : function () {}
|
|
138
|
+
Modal.destroyAll()
|
|
138
139
|
},
|
|
139
140
|
});
|
|
140
141
|
|
|
@@ -155,6 +156,7 @@ const showAutoCloseInfo = function(options) {
|
|
|
155
156
|
closable: options.closable,
|
|
156
157
|
onOk(e) {
|
|
157
158
|
options.okCallback ? options.okCallback(e) : function () {}
|
|
159
|
+
Modal.destroyAll()
|
|
158
160
|
},
|
|
159
161
|
});
|
|
160
162
|
|
|
@@ -180,6 +182,7 @@ const showAutoCloseSuccess = function(options) {
|
|
|
180
182
|
closable: options.closable,
|
|
181
183
|
onOk(e) {
|
|
182
184
|
options.okCallback ? options.okCallback(e) : function () {}
|
|
185
|
+
Modal.destroyAll()
|
|
183
186
|
},
|
|
184
187
|
});
|
|
185
188
|
|
|
@@ -205,6 +208,7 @@ const showAutoCloseError = function(options) {
|
|
|
205
208
|
closable: options.closable,
|
|
206
209
|
onOk(e) {
|
|
207
210
|
options.okCallback ? options.okCallback(e) : function () {}
|
|
211
|
+
Modal.destroyAll()
|
|
208
212
|
},
|
|
209
213
|
});
|
|
210
214
|
|
|
@@ -230,6 +234,7 @@ const showAutoCloseWarn = function(options) {
|
|
|
230
234
|
closable: options.closable,
|
|
231
235
|
onOk(e) {
|
|
232
236
|
options.okCallback ? options.okCallback(e) : function () {}
|
|
237
|
+
Modal.destroyAll()
|
|
233
238
|
},
|
|
234
239
|
});
|
|
235
240
|
|
|
@@ -566,7 +566,7 @@ class FormForModify extends React.Component{
|
|
|
566
566
|
break;
|
|
567
567
|
case UI_RENDER_TYPE.TREE_SELECT:
|
|
568
568
|
if (b_multiple) {
|
|
569
|
-
initialValue =
|
|
569
|
+
initialValue = data[code] || [];
|
|
570
570
|
if (typeof initialValue !== "object") {
|
|
571
571
|
initialValue = initialValue ? JSON.parse(initialValue) : [];
|
|
572
572
|
}
|