@whitesev/pops 1.6.2 → 1.6.3
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/index.amd.js +891 -872
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +891 -872
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +891 -872
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +891 -872
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +891 -872
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +891 -872
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/components/alert/config.d.ts +1 -1
- package/dist/types/src/components/confirm/config.d.ts +1 -1
- package/dist/types/src/components/drawer/config.d.ts +1 -1
- package/dist/types/src/components/folder/config.d.ts +1 -1
- package/dist/types/src/components/iframe/config.d.ts +1 -1
- package/dist/types/src/components/loading/config.d.ts +1 -1
- package/dist/types/src/components/panel/config.d.ts +1 -1
- package/dist/types/src/components/prompt/config.d.ts +1 -1
- package/dist/types/src/components/searchSuggestion/config.d.ts +1 -1
- package/dist/types/src/components/tooltip/config.d.ts +1 -1
- package/package.json +1 -1
- package/src/components/alert/config.ts +54 -52
- package/src/components/alert/index.ts +1 -1
- package/src/components/confirm/config.ts +80 -78
- package/src/components/confirm/index.ts +1 -1
- package/src/components/drawer/config.ts +74 -72
- package/src/components/drawer/index.ts +1 -1
- package/src/components/folder/config.ts +119 -117
- package/src/components/folder/index.ts +1 -1
- package/src/components/iframe/config.ts +52 -50
- package/src/components/iframe/index.ts +1 -1
- package/src/components/loading/config.ts +23 -21
- package/src/components/loading/index.ts +1 -1
- package/src/components/panel/config.ts +320 -318
- package/src/components/panel/index.ts +2 -4
- package/src/components/prompt/config.ts +88 -86
- package/src/components/prompt/index.ts +1 -1
- package/src/components/rightClickMenu/config.ts +2 -4
- package/src/components/searchSuggestion/config.ts +56 -53
- package/src/components/searchSuggestion/index.ts +1 -1
- package/src/components/tooltip/config.ts +26 -24
- package/src/components/tooltip/index.ts +1 -1
|
@@ -1,130 +1,132 @@
|
|
|
1
1
|
import type { PopsFolderDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsFolderConfig: Required<PopsFolderDetails>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
callback() {},
|
|
15
|
-
},
|
|
16
|
-
folder: [
|
|
17
|
-
{
|
|
18
|
-
fileName: "测试文件夹",
|
|
19
|
-
fileSize: 0,
|
|
20
|
-
fileType: "",
|
|
21
|
-
createTime: 0,
|
|
22
|
-
latestTime: 0,
|
|
23
|
-
isFolder: true,
|
|
24
|
-
index: 0,
|
|
3
|
+
export const PopsFolderConfig = (): Required<PopsFolderDetails> => {
|
|
4
|
+
return {
|
|
5
|
+
title: {
|
|
6
|
+
text: "pops.Folder",
|
|
7
|
+
position: "center",
|
|
8
|
+
html: false,
|
|
9
|
+
style: "",
|
|
10
|
+
},
|
|
11
|
+
sort: {
|
|
12
|
+
name: "latestTime",
|
|
13
|
+
isDesc: false,
|
|
25
14
|
// @ts-ignore
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
15
|
+
callback() {},
|
|
16
|
+
},
|
|
17
|
+
folder: [
|
|
18
|
+
{
|
|
19
|
+
fileName: "测试文件夹",
|
|
20
|
+
fileSize: 0,
|
|
21
|
+
fileType: "",
|
|
22
|
+
createTime: 0,
|
|
23
|
+
latestTime: 0,
|
|
24
|
+
isFolder: true,
|
|
25
|
+
index: 0,
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
clickEvent() {
|
|
28
|
+
return [
|
|
29
|
+
{
|
|
30
|
+
fileName: "内部-测试文件.zip",
|
|
31
|
+
fileSize: 1025000,
|
|
32
|
+
fileType: "zip",
|
|
33
|
+
createTime: 1702038410440,
|
|
34
|
+
latestTime: 1702039602126,
|
|
35
|
+
isFolder: false,
|
|
36
|
+
index: 1,
|
|
37
|
+
clickEvent() {
|
|
38
|
+
console.log("下载文件:", this.fileName);
|
|
39
|
+
return "https://update.greasyfork.org/scripts/456485/pops.js";
|
|
40
|
+
},
|
|
39
41
|
},
|
|
40
|
-
|
|
41
|
-
|
|
42
|
+
];
|
|
43
|
+
},
|
|
42
44
|
},
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
45
|
+
{
|
|
46
|
+
fileName: "测试文件.apk",
|
|
47
|
+
fileSize: 30125682,
|
|
48
|
+
fileType: "apk",
|
|
49
|
+
createTime: 1702036410440,
|
|
50
|
+
latestTime: 1702039410440,
|
|
51
|
+
isFolder: false,
|
|
52
|
+
index: 1,
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
clickEvent() {
|
|
55
|
+
console.log("下载文件:", this.fileName);
|
|
56
|
+
return "https://update.greasyfork.org/scripts/456485/pops.js";
|
|
57
|
+
},
|
|
56
58
|
},
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
59
|
+
],
|
|
60
|
+
btn: {
|
|
61
|
+
merge: false,
|
|
62
|
+
mergeReverse: false,
|
|
63
|
+
reverse: false,
|
|
64
|
+
position: "flex-end",
|
|
65
|
+
ok: {
|
|
66
|
+
enable: true,
|
|
67
|
+
size: void 0,
|
|
68
|
+
icon: void 0,
|
|
69
|
+
rightIcon: false,
|
|
70
|
+
iconIsLoading: false,
|
|
71
|
+
text: "确定",
|
|
72
|
+
type: "primary",
|
|
73
|
+
callback(event) {
|
|
74
|
+
event.close();
|
|
75
|
+
},
|
|
74
76
|
},
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
77
|
+
cancel: {
|
|
78
|
+
enable: true,
|
|
79
|
+
size: void 0,
|
|
80
|
+
icon: void 0,
|
|
81
|
+
rightIcon: false,
|
|
82
|
+
iconIsLoading: false,
|
|
83
|
+
text: "关闭",
|
|
84
|
+
type: "default",
|
|
85
|
+
callback(event) {
|
|
86
|
+
event.close();
|
|
87
|
+
},
|
|
86
88
|
},
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
89
|
+
other: {
|
|
90
|
+
enable: false,
|
|
91
|
+
size: void 0,
|
|
92
|
+
icon: void 0,
|
|
93
|
+
rightIcon: false,
|
|
94
|
+
iconIsLoading: false,
|
|
95
|
+
text: "其它按钮",
|
|
96
|
+
type: "default",
|
|
97
|
+
callback(event) {
|
|
98
|
+
event.close();
|
|
99
|
+
},
|
|
98
100
|
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
101
|
+
close: {
|
|
102
|
+
enable: true,
|
|
103
|
+
callback(event) {
|
|
104
|
+
event.close();
|
|
105
|
+
},
|
|
104
106
|
},
|
|
105
107
|
},
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
108
|
+
class: "",
|
|
109
|
+
only: false,
|
|
110
|
+
width: "500px",
|
|
111
|
+
height: "400px",
|
|
112
|
+
position: "center",
|
|
113
|
+
animation: "pops-anim-fadein-zoom",
|
|
114
|
+
zIndex: 10000,
|
|
115
|
+
mask: {
|
|
116
|
+
enable: false,
|
|
117
|
+
clickEvent: {
|
|
118
|
+
toClose: false,
|
|
119
|
+
toHide: false,
|
|
120
|
+
},
|
|
121
|
+
clickCallBack: void 0,
|
|
119
122
|
},
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
beforeAppendToPageCallBack() {},
|
|
123
|
+
drag: false,
|
|
124
|
+
dragLimit: true,
|
|
125
|
+
dragExtraDistance: 3,
|
|
126
|
+
dragMoveCallBack() {},
|
|
127
|
+
dragEndCallBack() {},
|
|
128
|
+
forbiddenScroll: false,
|
|
129
|
+
style: null,
|
|
130
|
+
beforeAppendToPageCallBack() {},
|
|
131
|
+
};
|
|
130
132
|
};
|
|
@@ -21,7 +21,7 @@ export class PopsFolder {
|
|
|
21
21
|
pops.config.cssText.folderCSS,
|
|
22
22
|
]);
|
|
23
23
|
|
|
24
|
-
let config: Required<PopsFolderDetails> = PopsFolderConfig;
|
|
24
|
+
let config: Required<PopsFolderDetails> = PopsFolderConfig();
|
|
25
25
|
|
|
26
26
|
/* 办公几件套 */
|
|
27
27
|
(Folder_ICON as any).docx = Folder_ICON.doc;
|
|
@@ -1,58 +1,60 @@
|
|
|
1
1
|
import type { PopsIframeDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsIframeConfig: Required<PopsIframeDetails>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
loading: {
|
|
11
|
-
enable: true,
|
|
12
|
-
icon: true,
|
|
13
|
-
text: "",
|
|
14
|
-
},
|
|
15
|
-
class: "",
|
|
16
|
-
url: window.location.href,
|
|
17
|
-
only: false,
|
|
18
|
-
zIndex: 10000,
|
|
19
|
-
mask: {
|
|
20
|
-
enable: false,
|
|
21
|
-
clickEvent: {
|
|
22
|
-
toClose: false,
|
|
23
|
-
toHide: false,
|
|
24
|
-
},
|
|
25
|
-
|
|
26
|
-
clickCallBack: void 0,
|
|
27
|
-
},
|
|
28
|
-
animation: "pops-anim-fadein-zoom",
|
|
29
|
-
position: "center",
|
|
30
|
-
drag: false,
|
|
31
|
-
dragLimit: true,
|
|
32
|
-
dragExtraDistance: 3,
|
|
33
|
-
dragMoveCallBack() {},
|
|
34
|
-
dragEndCallBack() {},
|
|
35
|
-
width: "300px",
|
|
36
|
-
height: "250px",
|
|
37
|
-
topRightButton: "min|max|mise|close",
|
|
38
|
-
sandbox: false,
|
|
39
|
-
forbiddenScroll: false,
|
|
40
|
-
loadEndCallBack() {},
|
|
41
|
-
btn: {
|
|
42
|
-
min: {
|
|
43
|
-
callback() {},
|
|
3
|
+
export const PopsIframeConfig = (): Required<PopsIframeDetails> => {
|
|
4
|
+
return {
|
|
5
|
+
title: {
|
|
6
|
+
position: "center",
|
|
7
|
+
text: "",
|
|
8
|
+
html: false,
|
|
9
|
+
style: "",
|
|
44
10
|
},
|
|
45
|
-
|
|
46
|
-
|
|
11
|
+
loading: {
|
|
12
|
+
enable: true,
|
|
13
|
+
icon: true,
|
|
14
|
+
text: "",
|
|
47
15
|
},
|
|
48
|
-
|
|
49
|
-
|
|
16
|
+
class: "",
|
|
17
|
+
url: window.location.href,
|
|
18
|
+
only: false,
|
|
19
|
+
zIndex: 10000,
|
|
20
|
+
mask: {
|
|
21
|
+
enable: false,
|
|
22
|
+
clickEvent: {
|
|
23
|
+
toClose: false,
|
|
24
|
+
toHide: false,
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
clickCallBack: void 0,
|
|
50
28
|
},
|
|
51
|
-
|
|
52
|
-
|
|
29
|
+
animation: "pops-anim-fadein-zoom",
|
|
30
|
+
position: "center",
|
|
31
|
+
drag: false,
|
|
32
|
+
dragLimit: true,
|
|
33
|
+
dragExtraDistance: 3,
|
|
34
|
+
dragMoveCallBack() {},
|
|
35
|
+
dragEndCallBack() {},
|
|
36
|
+
width: "300px",
|
|
37
|
+
height: "250px",
|
|
38
|
+
topRightButton: "min|max|mise|close",
|
|
39
|
+
sandbox: false,
|
|
40
|
+
forbiddenScroll: false,
|
|
41
|
+
loadEndCallBack() {},
|
|
42
|
+
btn: {
|
|
43
|
+
min: {
|
|
44
|
+
callback() {},
|
|
45
|
+
},
|
|
46
|
+
max: {
|
|
47
|
+
callback() {},
|
|
48
|
+
},
|
|
49
|
+
mise: {
|
|
50
|
+
callback() {},
|
|
51
|
+
},
|
|
52
|
+
close: {
|
|
53
|
+
callback() {},
|
|
54
|
+
},
|
|
53
55
|
},
|
|
54
|
-
},
|
|
55
56
|
|
|
56
|
-
|
|
57
|
-
|
|
57
|
+
style: null,
|
|
58
|
+
beforeAppendToPageCallBack() {},
|
|
59
|
+
};
|
|
58
60
|
};
|
|
@@ -20,7 +20,7 @@ export class PopsIframe {
|
|
|
20
20
|
pops.config.cssText.iframeCSS,
|
|
21
21
|
]);
|
|
22
22
|
|
|
23
|
-
let config: Required<PopsIframeDetails> = PopsIframeConfig;
|
|
23
|
+
let config: Required<PopsIframeDetails> = PopsIframeConfig();
|
|
24
24
|
config = popsUtils.assign(config, details);
|
|
25
25
|
if (config.url == null) {
|
|
26
26
|
throw "config.url不能为空";
|
|
@@ -1,27 +1,29 @@
|
|
|
1
1
|
import type { PopsLoadingDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsLoadingConfig: Required<PopsLoadingDetails>
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class: "",
|
|
11
|
-
only: false,
|
|
12
|
-
zIndex: 10000,
|
|
13
|
-
mask: {
|
|
14
|
-
enable: false,
|
|
15
|
-
clickEvent: {
|
|
16
|
-
toClose: false,
|
|
17
|
-
toHide: false,
|
|
3
|
+
export const PopsLoadingConfig = (): Required<PopsLoadingDetails> => {
|
|
4
|
+
return {
|
|
5
|
+
parent: document.body,
|
|
6
|
+
content: {
|
|
7
|
+
text: "加载中...",
|
|
8
|
+
icon: "loading",
|
|
9
|
+
style: "",
|
|
18
10
|
},
|
|
11
|
+
class: "",
|
|
12
|
+
only: false,
|
|
13
|
+
zIndex: 10000,
|
|
14
|
+
mask: {
|
|
15
|
+
enable: false,
|
|
16
|
+
clickEvent: {
|
|
17
|
+
toClose: false,
|
|
18
|
+
toHide: false,
|
|
19
|
+
},
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
clickCallBack: void 0,
|
|
22
|
+
},
|
|
23
|
+
animation: "pops-anim-fadein-zoom",
|
|
24
|
+
forbiddenScroll: false,
|
|
24
25
|
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
style: null,
|
|
27
|
+
addIndexCSS: true,
|
|
28
|
+
};
|
|
27
29
|
};
|
|
@@ -8,7 +8,7 @@ import type { PopsLoadingDetails } from "./indexType";
|
|
|
8
8
|
|
|
9
9
|
export class PopsLoading {
|
|
10
10
|
constructor(details: PopsLoadingDetails) {
|
|
11
|
-
let config: Required<PopsLoadingDetails> = PopsLoadingConfig;
|
|
11
|
+
let config: Required<PopsLoadingDetails> = PopsLoadingConfig();
|
|
12
12
|
config = popsUtils.assign(config, details);
|
|
13
13
|
let guid = popsUtils.getRandomGUID();
|
|
14
14
|
const PopsType = "loading";
|