@ningboyz/vue 1.0.43 → 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.
@@ -1,20 +1,28 @@
1
- import { VxeUI as e } from "vxe-pc-ui";
1
+ import { VxeUI as i } from "vxe-pc-ui";
2
2
  class c {
3
- static messageId = "vxe-modal-message-id-d0556a60da2a";
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
10
  static showError = (s) => {
9
- this.showMessage(this.messageId, s, "error");
11
+ this.showMessage(this.messageErrorId, s, "error");
10
12
  };
11
- static showMessage = (s, t, o) => {
12
- const a = this.options || { duration: 3e3 };
13
- e.modal.message({
14
- ...a,
13
+ static showSuccess = (s) => {
14
+ this.showMessage(this.messageSuccessId, s, "success");
15
+ };
16
+ static showWarning = (s) => {
17
+ this.showMessage(this.messageWarningId, s, "warning");
18
+ };
19
+ static showMessage = (s, a, e) => {
20
+ const t = this.options || { duration: 3e3 };
21
+ i.modal.message({
22
+ ...t,
15
23
  id: s,
16
- content: t,
17
- status: o
24
+ content: a,
25
+ status: e
18
26
  });
19
27
  };
20
28
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/vue",
3
- "version": "1.0.43",
3
+ "version": "1.0.44",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "宁波甬政vue-ui库",
@@ -3,5 +3,8 @@ export type YzMessageOptions = {
3
3
  };
4
4
 
5
5
  export declare class YzMessage {
6
+ public static config(options: YzMessageOptions);
6
7
  public static showError(message: string);
8
+ public static showSuccess(message: string);
9
+ public static showWarning(message: string);
7
10
  }