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