@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.
@@ -1,15 +1,25 @@
1
- import { VxeUI as t } from "vxe-pc-ui";
2
- class r {
3
- static messageId = "vxe-modal-message-id-d0556a60da2a";
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.messageId, s, "error");
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.modal.message({
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
- r as Message
30
+ c as Message
21
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ningboyz/vue",
3
- "version": "1.0.42",
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
  }