@finema/core 2.26.2 → 2.26.4
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -22,7 +22,7 @@ export interface IDialog {
|
|
|
22
22
|
success: (payload: IDialogMetaItem) => Promise<boolean>;
|
|
23
23
|
warning: (payload: IDialogMetaItem) => Promise<boolean>;
|
|
24
24
|
confirm: (payload: IDialogMetaItem) => Promise<boolean>;
|
|
25
|
-
loading: (payload
|
|
26
|
-
close: () =>
|
|
25
|
+
loading: (payload?: Partial<IDialogMetaItem>) => Promise<boolean>;
|
|
26
|
+
close: () => void;
|
|
27
27
|
}
|
|
28
28
|
export declare const useDialog: () => IDialog;
|
|
@@ -55,21 +55,14 @@ export const useDialog = () => {
|
|
|
55
55
|
});
|
|
56
56
|
};
|
|
57
57
|
const loading = async (payload = {}) => {
|
|
58
|
-
|
|
58
|
+
modalLoading.open({
|
|
59
59
|
...payload,
|
|
60
60
|
title: payload.title || "\u0E01\u0E33\u0E25\u0E31\u0E07\u0E42\u0E2B\u0E25\u0E14...",
|
|
61
61
|
type: "loading" /* LOADING */
|
|
62
62
|
});
|
|
63
|
-
const res = await result.result;
|
|
64
|
-
return new Promise((resolve, reject) => {
|
|
65
|
-
if (res) {
|
|
66
|
-
resolve(true);
|
|
67
|
-
}
|
|
68
|
-
reject(false);
|
|
69
|
-
});
|
|
70
63
|
};
|
|
71
|
-
const close =
|
|
72
|
-
|
|
64
|
+
const close = () => {
|
|
65
|
+
modalLoading.close();
|
|
73
66
|
};
|
|
74
67
|
return {
|
|
75
68
|
error,
|