@whitesev/pops 1.7.6 → 1.7.7

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "弹窗库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -221,6 +221,9 @@ export class PopsIframe {
221
221
  if (typeof config?.btn?.min?.callback === "function") {
222
222
  config.btn.min.callback(eventDetails, event);
223
223
  }
224
+ },
225
+ {
226
+ capture: true,
224
227
  }
225
228
  );
226
229
  /* 最大化按钮点击事件 */
@@ -252,6 +255,9 @@ export class PopsIframe {
252
255
  if (typeof config?.btn?.max?.callback === "function") {
253
256
  config.btn.max.callback(eventDetails, event);
254
257
  }
258
+ },
259
+ {
260
+ capture: true,
255
261
  }
256
262
  );
257
263
  /* 先隐藏窗口化按钮 */
@@ -291,6 +297,9 @@ export class PopsIframe {
291
297
  if (typeof config?.btn?.mise?.callback === "function") {
292
298
  config.btn.mise.callback(eventDetails, event);
293
299
  }
300
+ },
301
+ {
302
+ capture: true,
294
303
  }
295
304
  );
296
305
  /* 关闭按钮点击事件 */
@@ -298,6 +307,8 @@ export class PopsIframe {
298
307
  headerCloseBtnElement,
299
308
  "click",
300
309
  (event) => {
310
+ event.preventDefault();
311
+ event.stopPropagation();
301
312
  PopsInstanceUtils.removeInstance(
302
313
  [pops.config.layer.iframe],
303
314
  guid,
@@ -306,6 +317,9 @@ export class PopsIframe {
306
317
  if (typeof config?.btn?.close?.callback === "function") {
307
318
  config.btn.close.callback(eventDetails, event);
308
319
  }
320
+ },
321
+ {
322
+ capture: true,
309
323
  }
310
324
  );
311
325
 
@@ -525,7 +525,8 @@ export const PopsInstanceUtils = {
525
525
  if (typeof options.preventEvent === "function") {
526
526
  return options.preventEvent(event as any);
527
527
  } else {
528
- return false;
528
+ // 返回true阻止滑动
529
+ return true;
529
530
  }
530
531
  },
531
532
  });