@qlibs/utils 1.9.1 → 1.10.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/utils/errorHandler.js +13 -1
- package/package.json +1 -1
@@ -117,7 +117,19 @@ function getStandardError(err, config) {
|
|
117
117
|
handleFormValidation(errors || [], config.formRef);
|
118
118
|
}
|
119
119
|
if ((config === null || config === void 0 ? void 0 : config.showToast) && (config === null || config === void 0 ? void 0 : config.toastFunction)) {
|
120
|
-
config.toastFunction.
|
120
|
+
if (config.toastFunction.confirm) {
|
121
|
+
config.toastFunction.error({
|
122
|
+
title: 'Failed',
|
123
|
+
content: message,
|
124
|
+
closable: true,
|
125
|
+
});
|
126
|
+
}
|
127
|
+
else if (config.toastFunction.error) {
|
128
|
+
config.toastFunction.error(message);
|
129
|
+
}
|
130
|
+
else if (typeof config.toastFunction === 'function') {
|
131
|
+
config.toastFunction(message);
|
132
|
+
}
|
121
133
|
}
|
122
134
|
return {
|
123
135
|
code,
|