@whitesev/pops 2.4.4 → 2.4.6

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.
Files changed (35) hide show
  1. package/README.md +117 -111
  2. package/dist/index.amd.js +687 -733
  3. package/dist/index.amd.js.map +1 -1
  4. package/dist/index.cjs.js +687 -733
  5. package/dist/index.cjs.js.map +1 -1
  6. package/dist/index.esm.js +687 -733
  7. package/dist/index.esm.js.map +1 -1
  8. package/dist/index.iife.js +687 -733
  9. package/dist/index.iife.js.map +1 -1
  10. package/dist/index.system.js +687 -733
  11. package/dist/index.system.js.map +1 -1
  12. package/dist/index.umd.js +687 -733
  13. package/dist/index.umd.js.map +1 -1
  14. package/dist/types/src/Pops.d.ts +9 -10
  15. package/dist/types/src/components/panel/types/components-common.d.ts +26 -26
  16. package/dist/types/src/components/panel/types/index.d.ts +2 -2
  17. package/dist/types/src/components/rightClickMenu/index.d.ts +3 -4
  18. package/dist/types/src/components/searchSuggestion/index.d.ts +2 -2
  19. package/dist/types/src/components/searchSuggestion/types/index.d.ts +2 -2
  20. package/dist/types/src/handler/PopsHandler.d.ts +3 -3
  21. package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +141 -145
  22. package/dist/types/src/types/animation.d.ts +15 -15
  23. package/dist/types/src/types/button.d.ts +141 -141
  24. package/dist/types/src/types/components.d.ts +175 -178
  25. package/dist/types/src/types/event.d.ts +44 -44
  26. package/dist/types/src/types/global.d.ts +18 -13
  27. package/dist/types/src/types/icon.d.ts +28 -28
  28. package/dist/types/src/types/inst.d.ts +14 -14
  29. package/dist/types/src/types/main.d.ts +46 -49
  30. package/dist/types/src/types/mask.d.ts +36 -36
  31. package/dist/types/src/types/position.d.ts +46 -46
  32. package/dist/types/src/utils/PopsDOMUtils.d.ts +1 -1
  33. package/dist/types/src/utils/PopsInstanceUtils.d.ts +1 -1
  34. package/dist/types/src/utils/PopsUtils.d.ts +16 -16
  35. package/package.json +17 -8
package/README.md CHANGED
@@ -1,8 +1,8 @@
1
1
  # 弹窗库
2
2
 
3
- + 最新版本:[![npm version](https://img.shields.io/npm/v/@whitesev/pops)](https://www.npmjs.com/package/@whitesev/pops)
3
+ - 最新版本:[![npm version](https://img.shields.io/npm/v/@whitesev/pops)](https://www.npmjs.com/package/@whitesev/pops)
4
4
 
5
- ```js
5
+ ````js
6
6
 
7
7
  ## pops.isPhone
8
8
 
@@ -11,7 +11,7 @@
11
11
  ```js
12
12
  pops.iPhone()
13
13
  -> true
14
- ```
14
+ ````
15
15
 
16
16
  ## pops.alert
17
17
 
@@ -19,15 +19,15 @@ pops.iPhone()
19
19
 
20
20
  ```js
21
21
  pops.alert({
22
- content: {
23
- text: "普通信息框",
24
- },
25
- mask: {
26
- enable: true,
27
- clickEvent:{
28
- toClose: true
29
- }
30
- },
22
+ content: {
23
+ text: "普通信息框",
24
+ },
25
+ mask: {
26
+ enable: true,
27
+ clickEvent: {
28
+ toClose: true,
29
+ },
30
+ },
31
31
  });
32
32
  ```
33
33
 
@@ -39,15 +39,15 @@ pops.alert({
39
39
 
40
40
  ```js
41
41
  pops.confirm({
42
- content: {
43
- text: "询问框",
44
- },
45
- mask: {
46
- enable: true,
47
- clickEvent:{
48
- toClose: true
49
- }
50
- },
42
+ content: {
43
+ text: "询问框",
44
+ },
45
+ mask: {
46
+ enable: true,
47
+ clickEvent: {
48
+ toClose: true,
49
+ },
50
+ },
51
51
  });
52
52
  ```
53
53
 
@@ -59,15 +59,15 @@ pops.confirm({
59
59
 
60
60
  ```js
61
61
  pops.drawer({
62
- content: {
63
- text: "抽屉层",
64
- },
65
- mask: {
66
- enable: true,
67
- clickEvent:{
68
- toClose: true
69
- }
70
- },
62
+ content: {
63
+ text: "抽屉层",
64
+ },
65
+ mask: {
66
+ enable: true,
67
+ clickEvent: {
68
+ toClose: true,
69
+ },
70
+ },
71
71
  });
72
72
  ```
73
73
 
@@ -79,28 +79,30 @@ pops.drawer({
79
79
 
80
80
  ```js
81
81
  pops.folder({
82
- title: {
83
- text: "文件夹层",
84
- },
85
- folder: [{
86
- fileName: "测试文件.apk",
87
- fileSize: 30125682,
88
- fileType: "apk",
89
- createTime: 1702036410440,
90
- latestTime: 1702039410440,
91
- isFolder: false,
92
- index: 1,
93
- clickEvent() {
94
- console.log("下载文件:", this.fileName);
95
- return "https://update.greasyfork.org/scripts/456485/pops.js";
96
- },
97
- }],
98
- mask: {
99
- enable: true,
100
- clickEvent:{
101
- toClose: true
102
- }
103
- },
82
+ title: {
83
+ text: "文件夹层",
84
+ },
85
+ folder: [
86
+ {
87
+ fileName: "测试文件.apk",
88
+ fileSize: 30125682,
89
+ fileType: "apk",
90
+ createTime: 1702036410440,
91
+ latestTime: 1702039410440,
92
+ isFolder: false,
93
+ index: 1,
94
+ clickEvent() {
95
+ console.log("下载文件:", this.fileName);
96
+ return "https://update.greasyfork.org/scripts/456485/pops.js";
97
+ },
98
+ },
99
+ ],
100
+ mask: {
101
+ enable: true,
102
+ clickEvent: {
103
+ toClose: true,
104
+ },
105
+ },
104
106
  });
105
107
  ```
106
108
 
@@ -112,16 +114,16 @@ iframe层
112
114
 
113
115
  ```js
114
116
  pops.iframe({
115
- url: window.location.href,
116
- title: {
117
- text: "iframe层"
118
- },
119
- mask: {
120
- enable: true,
121
- clickEvent:{
122
- toClose: true
123
- }
124
- },
117
+ url: window.location.href,
118
+ title: {
119
+ text: "iframe层",
120
+ },
121
+ mask: {
122
+ enable: true,
123
+ clickEvent: {
124
+ toClose: true,
125
+ },
126
+ },
125
127
  });
126
128
  ```
127
129
 
@@ -135,17 +137,17 @@ pops.iframe({
135
137
 
136
138
  ```js
137
139
  pops.loading({
138
- parent: document.body,
139
- content: {
140
- text: "加载中...",
141
- icon: "loading",
142
- },
143
- mask: {
144
- enable: true,
145
- clickEvent:{
146
- toClose: true
147
- }
148
- },
140
+ parent: document.body,
141
+ content: {
142
+ text: "加载中...",
143
+ icon: "loading",
144
+ },
145
+ mask: {
146
+ enable: true,
147
+ clickEvent: {
148
+ toClose: true,
149
+ },
150
+ },
149
151
  });
150
152
  ```
151
153
 
@@ -157,22 +159,24 @@ pops.loading({
157
159
 
158
160
  ```js
159
161
  pops.panel({
160
- title: {
161
- text: "面板层",
162
- },
163
- content: [{
164
- id: "whitesev-panel-config",
165
- title: "菜单配置",
166
- headerTitle: "菜单配置",
167
- isDefault: true,
168
- forms: []
169
- }],
170
- mask: {
171
- enable: true,
172
- clickEvent:{
173
- toClose: true
174
- }
175
- },
162
+ title: {
163
+ text: "面板层",
164
+ },
165
+ content: [
166
+ {
167
+ id: "whitesev-panel-config",
168
+ title: "菜单配置",
169
+ headerTitle: "菜单配置",
170
+ isDefault: true,
171
+ forms: [],
172
+ },
173
+ ],
174
+ mask: {
175
+ enable: true,
176
+ clickEvent: {
177
+ toClose: true,
178
+ },
179
+ },
176
180
  });
177
181
  ```
178
182
 
@@ -184,15 +188,15 @@ pops.panel({
184
188
 
185
189
  ```js
186
190
  pops.prompt({
187
- content: {
188
- text: "输入框的内容",
189
- },
190
- mask: {
191
- enable: true,
192
- clickEvent:{
193
- toClose: true
194
- }
195
- },
191
+ content: {
192
+ text: "输入框的内容",
193
+ },
194
+ mask: {
195
+ enable: true,
196
+ clickEvent: {
197
+ toClose: true,
198
+ },
199
+ },
196
200
  });
197
201
  ```
198
202
 
@@ -204,15 +208,17 @@ pops.prompt({
204
208
 
205
209
  ```js
206
210
  pops.rightClickMenu({
207
- target: document.documentElement,
208
- data: [{
209
- icon: pops.config.iconSVG.search,
210
- iconIsLoading: false,
211
- text: "右键菜单",
212
- callback(event) {
213
- console.log("点击:" + this.text, event);
214
- },
215
- },]
211
+ target: document.documentElement,
212
+ data: [
213
+ {
214
+ icon: pops.config.iconSVG.search,
215
+ iconIsLoading: false,
216
+ text: "右键菜单",
217
+ callback(event) {
218
+ console.log("点击:" + this.text, event);
219
+ },
220
+ },
221
+ ],
216
222
  });
217
223
  ```
218
224
 
@@ -224,8 +230,8 @@ pops.rightClickMenu({
224
230
 
225
231
  ```js
226
232
  pops.tooltip({
227
- target: document.querySelector("#user-container"),
228
- content: "鼠标悬浮提示内容",
233
+ target: document.querySelector("#user-container"),
234
+ content: "鼠标悬浮提示内容",
229
235
  });
230
236
  ```
231
237
 
@@ -235,8 +241,8 @@ pops.tooltip({
235
241
 
236
242
  ```js
237
243
  let suggestion = pops.searchSuggestion({
238
- target: document.querySelector("input"),
239
- })
244
+ target: document.querySelector("input"),
245
+ });
240
246
  suggestion.init();
241
247
  ```
242
248