@whitesev/pops 1.9.4 → 1.9.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.
@@ -174,16 +174,7 @@ export declare const PopsHandler: {
174
174
  /**
175
175
  * 处理返回的配置,针对popsHandler.handleEventDetails
176
176
  */
177
- handleResultDetails(details: any): {
178
- $shadowContainer: HTMLDivElement;
179
- $shadowRoot: ShadowRoot;
180
- animElement: HTMLElement;
181
- popsElement: HTMLElement;
182
- maskElement: HTMLElement;
183
- close: () => void;
184
- hide: () => void;
185
- show: () => void;
186
- };
177
+ handleResultDetails<T extends unknown>(details: T): Omit<T, "type" | "function">;
187
178
  /**
188
179
  * 处理点击事件
189
180
  * @param type 当前按钮类型
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "1.9.4",
3
+ "version": "1.9.6",
4
4
  "description": "弹窗库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
package/src/Pops.ts CHANGED
@@ -83,7 +83,7 @@ class Pops {
83
83
  /** 配置 */
84
84
  config = {
85
85
  /** 版本号 */
86
- version: "2024.11.24",
86
+ version: "2024.12.19",
87
87
  cssText: {
88
88
  /** 主CSS */
89
89
  index: indexCSS,
@@ -16,7 +16,7 @@ export class PopsDrawer {
16
16
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
17
17
  config = popsUtils.assign(config, details);
18
18
  config = PopsHandler.handleOnly(PopsType, config);
19
-
19
+
20
20
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
21
21
  PopsHandler.handleInit($shadowRoot, [
22
22
  pops.config.cssText.index,
@@ -121,7 +121,6 @@ export class PopsDrawer {
121
121
  $shadowContainer,
122
122
  $shadowRoot,
123
123
  PopsType,
124
-
125
124
  $anim,
126
125
  $pops,
127
126
  $mask!,
@@ -243,11 +242,8 @@ export class PopsDrawer {
243
242
 
244
243
  PopsHandler.handlePush(PopsType, {
245
244
  guid: guid,
246
-
247
245
  animElement: $anim,
248
-
249
246
  popsElement: $pops,
250
-
251
247
  maskElement: $mask!,
252
248
  $shadowContainer: $shadowContainer,
253
249
  $shadowRoot: $shadowRoot,
@@ -1068,4 +1068,11 @@ section.pops-panel-container
1068
1068
  align-items: center;
1069
1069
  cursor: pointer;
1070
1070
  }
1071
+ /* 修复safari上图标大小未正常显示 */
1072
+ .pops-panel-deepMenu-container
1073
+ .pops-panel-deepMenu-container-left-arrow-icon
1074
+ > svg {
1075
+ width: inherit;
1076
+ height: inherit;
1077
+ }
1071
1078
  /* deepMenu的css */
@@ -34,7 +34,12 @@ export class ToolTip {
34
34
  this.$data.guid = guid;
35
35
  this.$el.$shadowContainer = ShadowInfo.$shadowContainer;
36
36
  this.$el.$shadowRoot = ShadowInfo.$shadowRoot;
37
-
37
+ this.show = this.show.bind(this);
38
+ this.close = this.close.bind(this);
39
+ this.toolTipAnimationFinishEvent =
40
+ this.toolTipAnimationFinishEvent.bind(this);
41
+ this.toolTipMouseEnterEvent = this.toolTipMouseEnterEvent.bind(this);
42
+ this.toolTipMouseLeaveEvent = this.toolTipMouseLeaveEvent.bind(this);
38
43
  this.init();
39
44
  }
40
45
  init() {
@@ -328,7 +333,7 @@ export class ToolTip {
328
333
  popsDOMUtils.on(
329
334
  this.$data.config.target,
330
335
  this.$data.config.triggerShowEventName,
331
- this.show.bind(this),
336
+ this.show,
332
337
  this.$data.config.eventOption
333
338
  );
334
339
  }
@@ -339,7 +344,7 @@ export class ToolTip {
339
344
  popsDOMUtils.off(
340
345
  this.$data.config.target,
341
346
  this.$data.config.triggerShowEventName,
342
- this.show.bind(this),
347
+ this.show,
343
348
  {
344
349
  capture: true,
345
350
  }
@@ -400,7 +405,7 @@ export class ToolTip {
400
405
  popsDOMUtils.on(
401
406
  this.$data.config.target,
402
407
  this.$data.config.triggerCloseEventName,
403
- this.close.bind(this),
408
+ this.close,
404
409
  this.$data.config.eventOption
405
410
  );
406
411
  }
@@ -411,7 +416,7 @@ export class ToolTip {
411
416
  popsDOMUtils.off(
412
417
  this.$data.config.target,
413
418
  this.$data.config.triggerCloseEventName,
414
- this.close.bind(this),
419
+ this.close,
415
420
  {
416
421
  capture: true,
417
422
  }
@@ -450,7 +455,7 @@ export class ToolTip {
450
455
  popsDOMUtils.on(
451
456
  this.$el.$toolTip,
452
457
  popsDOMUtils.getAnimationEndNameList(),
453
- this.toolTipAnimationFinishEvent.bind(this)
458
+ this.toolTipAnimationFinishEvent
454
459
  );
455
460
  }
456
461
  /**
@@ -460,7 +465,7 @@ export class ToolTip {
460
465
  popsDOMUtils.off(
461
466
  this.$el.$toolTip,
462
467
  popsDOMUtils.getAnimationEndNameList(),
463
- this.toolTipAnimationFinishEvent.bind(this)
468
+ this.toolTipAnimationFinishEvent
464
469
  );
465
470
  }
466
471
  /**
@@ -484,7 +489,7 @@ export class ToolTip {
484
489
  popsDOMUtils.on(
485
490
  this.$el.$toolTip,
486
491
  "mouseenter touchstart",
487
- this.toolTipMouseEnterEvent.bind(this),
492
+ this.toolTipMouseEnterEvent,
488
493
  this.$data.config.eventOption
489
494
  );
490
495
  }
@@ -495,7 +500,7 @@ export class ToolTip {
495
500
  popsDOMUtils.off(
496
501
  this.$el.$toolTip,
497
502
  "mouseenter touchstart",
498
- this.toolTipMouseEnterEvent.bind(this),
503
+ this.toolTipMouseEnterEvent,
499
504
  this.$data.config.eventOption
500
505
  );
501
506
  }
@@ -513,7 +518,7 @@ export class ToolTip {
513
518
  popsDOMUtils.on(
514
519
  this.$el.$toolTip,
515
520
  "mouseleave touchend",
516
- this.toolTipMouseLeaveEvent.bind(this),
521
+ this.toolTipMouseLeaveEvent,
517
522
  this.$data.config.eventOption
518
523
  );
519
524
  }
@@ -524,7 +529,7 @@ export class ToolTip {
524
529
  popsDOMUtils.off(
525
530
  this.$el.$toolTip,
526
531
  "mouseleave touchend",
527
- this.toolTipMouseLeaveEvent.bind(this),
532
+ this.toolTipMouseLeaveEvent,
528
533
  this.$data.config.eventOption
529
534
  );
530
535
  }
@@ -496,16 +496,7 @@ export const PopsHandler = {
496
496
  /**
497
497
  * 处理返回的配置,针对popsHandler.handleEventDetails
498
498
  */
499
- handleResultDetails(details: any): {
500
- $shadowContainer: HTMLDivElement;
501
- $shadowRoot: ShadowRoot;
502
- animElement: HTMLElement;
503
- popsElement: HTMLElement;
504
- maskElement: HTMLElement;
505
- close: () => void;
506
- hide: () => void;
507
- show: () => void;
508
- } {
499
+ handleResultDetails<T extends any>(details: T): Omit<T, "type" | "function"> {
509
500
  let resultDetails = Object.assign({}, details);
510
501
  popsUtils.delete(resultDetails, "type");
511
502
  popsUtils.delete(resultDetails, "function");