@qy_better_lib/pc 0.2.7 → 0.2.8

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.
@@ -14,7 +14,7 @@ export declare function confirmBox(str: string, callback: () => any | void, opti
14
14
  * @param options MessageBox配置项,参考element-plus文档
15
15
  * @returns
16
16
  */
17
- export declare function confirmBoxAsync(str: string, callback: () => any | void, options?: any): Promise<any>;
17
+ export declare function confirmBoxAsync(str: string, callback: () => any | void, options?: any, cancelCallback?: () => any | void): Promise<any>;
18
18
  /**
19
19
  * 消息提示
20
20
  * @export
@@ -1,44 +1,44 @@
1
- import { ElMessageBox as f, ElMessage as a, ElNotification as u } from "element-plus";
2
- function b(o, n, e = !0, r = "") {
1
+ import { ElMessage as a, ElMessageBox as f, ElNotification as m } from "element-plus";
2
+ function x(o, n, e = !0, t = "") {
3
3
  switch (n) {
4
4
  case "toast":
5
- m(
5
+ g(
6
6
  e ? "success" : "error",
7
7
  o || (e ? "执行成功" : "执行失败")
8
8
  );
9
9
  break;
10
10
  case "dialog":
11
- l(o || (e ? "执行成功" : "执行失败"), () => {
11
+ h(o || (e ? "执行成功" : "执行失败"), () => {
12
12
  }, {
13
- title: r || "提示",
13
+ title: t || "提示",
14
14
  type: e ? "success" : "error",
15
15
  "show-cancel-button": !1
16
16
  });
17
17
  break;
18
18
  case "notif":
19
- h(e ? "success" : "error", r || "消息提示", o);
19
+ l(e ? "success" : "error", t || "消息提示", o);
20
20
  break;
21
21
  }
22
22
  }
23
- function w(o, n, e) {
24
- const r = {
25
- beforeClose: (t, i, s) => {
26
- t === "confirm" ? setTimeout(() => {
27
- s();
28
- }, 0) : s();
23
+ function y(o, n, e) {
24
+ const t = {
25
+ beforeClose: (r, s, i) => {
26
+ r === "confirm" ? setTimeout(() => {
27
+ i();
28
+ }, 0) : i();
29
29
  },
30
30
  ...e
31
31
  };
32
- f.confirm(`此操作将${o}, 是否继续?`, "提示", r).then(async () => {
32
+ f.confirm(`此操作将${o}, 是否继续?`, "提示", t).then(async () => {
33
33
  n && n();
34
34
  }).catch(() => {
35
35
  });
36
36
  }
37
- function l(o, n, e) {
38
- return new Promise((r, t) => {
37
+ function h(o, n, e, t) {
38
+ return new Promise((r, s) => {
39
39
  const i = {
40
- beforeClose: (s, g, c) => {
41
- s === "confirm" ? setTimeout(() => {
40
+ beforeClose: (u, p, c) => {
41
+ u === "confirm" ? setTimeout(() => {
42
42
  c();
43
43
  }, 0) : c();
44
44
  },
@@ -47,34 +47,34 @@ function l(o, n, e) {
47
47
  f.confirm(`${o}`, "Tip", i).then(() => {
48
48
  r(n && n());
49
49
  }).catch(() => {
50
- r(!1);
50
+ r(t || !1);
51
51
  });
52
52
  });
53
53
  }
54
- function m(o, n = "", e = !1, r = 3e3) {
54
+ function g(o, n = "", e = !1, t = 3e3) {
55
55
  a({
56
56
  showClose: !0,
57
57
  message: n,
58
58
  type: o,
59
- duration: r,
59
+ duration: t,
60
60
  dangerouslyUseHTMLString: e
61
61
  });
62
62
  }
63
- function h(o, n = "", e = "", r = !0, t = "bottom-right", i = 3e3) {
64
- u({
63
+ function l(o, n = "", e = "", t = !0, r = "bottom-right", s = 3e3) {
64
+ m({
65
65
  title: n,
66
66
  message: e,
67
67
  type: o,
68
- dangerouslyUseHTMLString: r,
69
- duration: i,
68
+ dangerouslyUseHTMLString: t,
69
+ duration: s,
70
70
  showClose: !0,
71
- position: t
71
+ position: r
72
72
  });
73
73
  }
74
74
  export {
75
- w as confirmBox,
76
- l as confirmBoxAsync,
77
- m as messageAlert,
78
- b as messageBox,
79
- h as notification
75
+ y as confirmBox,
76
+ h as confirmBoxAsync,
77
+ g as messageAlert,
78
+ x as messageBox,
79
+ l as notification
80
80
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@qy_better_lib/pc",
3
3
  "private": false,
4
- "version": "0.2.7",
4
+ "version": "0.2.8",
5
5
  "description": "qy better lib pc compontens",
6
6
  "author": "luhuiming",
7
7
  "license": "ISC",
@@ -41,15 +41,15 @@
41
41
  "./styles/*": "./lib/styles/*"
42
42
  },
43
43
  "devDependencies": {
44
- "@qy_better_lib/core": "^0.0.3",
45
- "@types/node": "^22.10.6",
46
- "@vitejs/plugin-vue": "^5.0.5",
47
- "element-plus": "^2.9.3",
48
- "magic-string": "^0.30.10",
49
- "mkdirp": "^1.0.4",
50
- "vite": "^5.3.2",
51
- "vite-plugin-dts": "^3.9.1",
52
- "vue": "^3.4.31",
44
+ "@qy_better_lib/core": "^0.0.7",
45
+ "@types/node": "^24.5.0",
46
+ "@vitejs/plugin-vue": "^6.0.1",
47
+ "element-plus": "^2.11.2",
48
+ "magic-string": "^0.30.19",
49
+ "mkdirp": "^3.0.1",
50
+ "vite": "^7.1.5",
51
+ "vite-plugin-dts": "^4.5.4",
52
+ "vue": "^3.5.21",
53
53
  "vue-i18n": "^9.13.1"
54
54
  }
55
55
  }