@ningboyz/vue 1.0.42 → 1.0.44
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/es/message/message.js
CHANGED
|
@@ -1,15 +1,25 @@
|
|
|
1
|
-
import { VxeUI as
|
|
2
|
-
class
|
|
3
|
-
static
|
|
1
|
+
import { VxeUI as i } from "vxe-pc-ui";
|
|
2
|
+
class c {
|
|
3
|
+
static messageErrorId = "vxe-modal-message-id-error-d0556a60da2a";
|
|
4
|
+
static messageSuccessId = "vxe-modal-message-id-success-d0556a60da2a";
|
|
5
|
+
static messageWarningId = "vxe-modal-message-id-warning-d0556a60da2a";
|
|
4
6
|
static options;
|
|
5
7
|
static config = (s) => {
|
|
6
8
|
this.options = s;
|
|
7
9
|
};
|
|
8
|
-
static showError(s) {
|
|
9
|
-
this.showMessage(this.
|
|
10
|
-
}
|
|
10
|
+
static showError = (s) => {
|
|
11
|
+
this.showMessage(this.messageErrorId, s, "error");
|
|
12
|
+
};
|
|
13
|
+
static showSuccess = (s) => {
|
|
14
|
+
this.showMessage(this.messageSuccessId, s, "success");
|
|
15
|
+
};
|
|
16
|
+
static showWarning = (s) => {
|
|
17
|
+
this.showMessage(this.messageWarningId, s, "warning");
|
|
18
|
+
};
|
|
11
19
|
static showMessage = (s, a, e) => {
|
|
12
|
-
t.
|
|
20
|
+
const t = this.options || { duration: 3e3 };
|
|
21
|
+
i.modal.message({
|
|
22
|
+
...t,
|
|
13
23
|
id: s,
|
|
14
24
|
content: a,
|
|
15
25
|
status: e
|
|
@@ -17,5 +27,5 @@ class r {
|
|
|
17
27
|
};
|
|
18
28
|
}
|
|
19
29
|
export {
|
|
20
|
-
|
|
30
|
+
c as Message
|
|
21
31
|
};
|
package/package.json
CHANGED