@qy_better_lib/pc 0.2.7 → 0.2.9
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/@qy_better_lib/pc.min.js +1 -1
- package/lib/contextMenu/index.d.ts +0 -1
- package/lib/contextMenu/src/index.vue.d.ts +18 -7
- package/lib/contextMenu/src/index.vue.js +21 -23
- package/lib/describeView/index.d.ts +0 -1
- package/lib/describeView/src/index.vue.d.ts +17 -10
- package/lib/describeView/src/index.vue.js +15 -15
- package/lib/index.d.ts +0 -1
- package/lib/tableExtend/index.d.ts +0 -1
- package/lib/tableExtend/props.d.ts +7 -3
- package/lib/tableExtend/props.js +5 -0
- package/lib/tableExtend/src/colVisible.vue.js +41 -41
- package/lib/tableExtend/src/index.vue.d.ts +45 -18
- package/lib/tableExtend/src/index.vue.js +85 -76
- package/lib/tableExtend/src/valueCol.vue.d.ts +1 -1
- package/lib/tableExtend/src/valueCol.vue.js +4 -4
- package/lib/tableExtend/type.d.ts +0 -1
- package/lib/tableExtend/useTable.d.ts +2 -3
- package/lib/tableExtend/useTable.js +45 -53
- package/lib/textButton/index.d.ts +0 -1
- package/lib/textButton/src/index.vue.d.ts +12 -4
- package/lib/textButton/src/index.vue.js +5 -5
- package/lib/utils/index.d.ts +1 -1
- package/lib/utils/index.js +30 -30
- package/package.json +10 -10
package/lib/utils/index.d.ts
CHANGED
|
@@ -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
|
package/lib/utils/index.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import {
|
|
2
|
-
function
|
|
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
|
-
|
|
5
|
+
g(
|
|
6
6
|
e ? "success" : "error",
|
|
7
7
|
o || (e ? "执行成功" : "执行失败")
|
|
8
8
|
);
|
|
9
9
|
break;
|
|
10
10
|
case "dialog":
|
|
11
|
-
|
|
11
|
+
h(o || (e ? "执行成功" : "执行失败"), () => {
|
|
12
12
|
}, {
|
|
13
|
-
title:
|
|
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
|
-
|
|
19
|
+
l(e ? "success" : "error", t || "消息提示", o);
|
|
20
20
|
break;
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
|
-
function
|
|
24
|
-
const
|
|
25
|
-
beforeClose: (
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
}, 0) :
|
|
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}, 是否继续?`, "提示",
|
|
32
|
+
f.confirm(`此操作将${o}, 是否继续?`, "提示", t).then(async () => {
|
|
33
33
|
n && n();
|
|
34
34
|
}).catch(() => {
|
|
35
35
|
});
|
|
36
36
|
}
|
|
37
|
-
function
|
|
38
|
-
return new Promise((r,
|
|
37
|
+
function h(o, n, e, t) {
|
|
38
|
+
return new Promise((r, s) => {
|
|
39
39
|
const i = {
|
|
40
|
-
beforeClose: (
|
|
41
|
-
|
|
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
|
|
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:
|
|
59
|
+
duration: t,
|
|
60
60
|
dangerouslyUseHTMLString: e
|
|
61
61
|
});
|
|
62
62
|
}
|
|
63
|
-
function
|
|
64
|
-
|
|
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:
|
|
69
|
-
duration:
|
|
68
|
+
dangerouslyUseHTMLString: t,
|
|
69
|
+
duration: s,
|
|
70
70
|
showClose: !0,
|
|
71
|
-
position:
|
|
71
|
+
position: r
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
export {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
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.
|
|
4
|
+
"version": "0.2.9",
|
|
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.
|
|
45
|
-
"@types/node": "^
|
|
46
|
-
"@vitejs/plugin-vue": "^
|
|
47
|
-
"element-plus": "^2.
|
|
48
|
-
"magic-string": "^0.30.
|
|
49
|
-
"mkdirp": "^
|
|
50
|
-
"vite": "^
|
|
51
|
-
"vite-plugin-dts": "^
|
|
52
|
-
"vue": "^3.
|
|
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
|
}
|