@whitesev/pops 1.9.0 → 1.9.1

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 (59) hide show
  1. package/dist/index.amd.js +156 -77
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +156 -77
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +156 -77
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +156 -77
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +156 -77
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +156 -77
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/Pops.d.ts +1 -0
  14. package/dist/types/src/components/alert/config.d.ts +1 -1
  15. package/dist/types/src/components/confirm/config.d.ts +1 -1
  16. package/dist/types/src/components/drawer/config.d.ts +1 -1
  17. package/dist/types/src/components/folder/config.d.ts +1 -1
  18. package/dist/types/src/components/iframe/config.d.ts +1 -1
  19. package/dist/types/src/components/loading/config.d.ts +1 -1
  20. package/dist/types/src/components/panel/config.d.ts +1 -1
  21. package/dist/types/src/components/prompt/config.d.ts +1 -1
  22. package/dist/types/src/components/rightClickMenu/config.d.ts +1 -1
  23. package/dist/types/src/components/searchSuggestion/config.d.ts +1 -1
  24. package/dist/types/src/components/tooltip/config.d.ts +1 -1
  25. package/dist/types/src/components/tooltip/index.d.ts +3 -3
  26. package/dist/types/src/components/tooltip/indexType.d.ts +27 -8
  27. package/dist/types/src/types/button.d.ts +13 -19
  28. package/dist/types/src/types/global.d.ts +9 -0
  29. package/dist/types/src/types/mask.d.ts +14 -11
  30. package/dist/types/src/utils/PopsInstanceUtils.d.ts +2 -1
  31. package/package.json +1 -1
  32. package/src/Pops.ts +1 -1
  33. package/src/components/alert/config.ts +9 -9
  34. package/src/components/alert/index.ts +1 -2
  35. package/src/components/confirm/config.ts +17 -24
  36. package/src/components/confirm/index.ts +1 -1
  37. package/src/components/drawer/config.ts +21 -21
  38. package/src/components/drawer/index.ts +1 -2
  39. package/src/components/folder/config.ts +16 -16
  40. package/src/components/folder/index.ts +2 -1
  41. package/src/components/iframe/config.ts +2 -3
  42. package/src/components/iframe/index.ts +1 -1
  43. package/src/components/loading/config.ts +2 -3
  44. package/src/components/loading/index.ts +1 -1
  45. package/src/components/panel/config.ts +64 -2
  46. package/src/components/prompt/config.ts +16 -27
  47. package/src/components/prompt/index.ts +1 -1
  48. package/src/components/rightClickMenu/config.ts +116 -109
  49. package/src/components/rightClickMenu/index.ts +2 -2
  50. package/src/components/searchSuggestion/config.ts +1 -1
  51. package/src/components/searchSuggestion/index.ts +1 -2
  52. package/src/components/tooltip/config.ts +6 -5
  53. package/src/components/tooltip/index.ts +21 -9
  54. package/src/components/tooltip/indexType.ts +32 -12
  55. package/src/handler/PopsHandler.ts +5 -12
  56. package/src/types/button.d.ts +13 -19
  57. package/src/types/global.d.ts +9 -0
  58. package/src/types/mask.d.ts +14 -11
  59. package/src/utils/PopsInstanceUtils.ts +8 -8
package/dist/index.amd.js CHANGED
@@ -1745,10 +1745,9 @@ define((function () { 'use strict';
1745
1745
  getPopsMaxZIndex(deviation = 1) {
1746
1746
  deviation = Number.isNaN(deviation) ? 1 : deviation;
1747
1747
  // 最大值 2147483647
1748
- // 最大值 2147483647
1749
- // const maxZIndex = Math.pow(2, 31) - 1;
1748
+ // const browserMaxZIndex = Math.pow(2, 31) - 1;
1750
1749
  // 比较值 2000000000
1751
- const maxZIndexCompare = 2 * Math.pow(10, 9);
1750
+ const maxZIndex = 2 * Math.pow(10, 9);
1752
1751
  // 当前页面最大的z-index
1753
1752
  let zIndex = 0;
1754
1753
  // 当前的最大z-index的元素,调试使用
@@ -1778,17 +1777,18 @@ define((function () { 'use strict';
1778
1777
  }
1779
1778
  });
1780
1779
  zIndex += deviation;
1781
- if (zIndex >= maxZIndexCompare) {
1782
- // 最好不要超过最大值
1783
- zIndex = maxZIndexCompare;
1780
+ let isOverMaxZIndex = zIndex >= maxZIndex;
1781
+ if (isOverMaxZIndex) {
1782
+ // 超出z-index最大值
1783
+ zIndex = maxZIndex;
1784
1784
  }
1785
- return { zIndex: zIndex, animElement: maxZIndexNode };
1785
+ return { zIndex: zIndex, animElement: maxZIndexNode, isOverMaxZIndex };
1786
1786
  },
1787
1787
  /**
1788
1788
  * 获取页面中最大的z-index
1789
1789
  * @param deviation 获取最大的z-index值的偏移,默认是+1
1790
1790
  * @example
1791
- * Utils.getMaxZIndex();
1791
+ * getMaxZIndex();
1792
1792
  * > 1001
1793
1793
  **/
1794
1794
  getMaxZIndex(deviation = 1) {
@@ -3146,17 +3146,11 @@ define((function () { 'use strict';
3146
3146
  else {
3147
3147
  // 对配置进行处理
3148
3148
  // 选择配置的z-index和已有的pops实例的最大z-index值
3149
- if (typeof config.zIndex === "function") {
3150
- let originZIndexFn = config.zIndex;
3151
- config.zIndex = () => {
3152
- const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(originZIndexFn) + 100);
3153
- return maxZIndex;
3154
- };
3155
- }
3156
- else {
3157
- const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(config.zIndex) + 100);
3158
- config.zIndex = maxZIndex;
3159
- }
3149
+ let originZIndex = config.zIndex;
3150
+ config.zIndex = () => {
3151
+ const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(originZIndex) + 100);
3152
+ return maxZIndex;
3153
+ };
3160
3154
  }
3161
3155
  return config;
3162
3156
  },
@@ -3193,14 +3187,14 @@ define((function () { 'use strict';
3193
3187
  iconIsLoading: false,
3194
3188
  text: "确定",
3195
3189
  type: "primary",
3196
- callback: function (event) {
3197
- event.close();
3190
+ callback: function (details) {
3191
+ details.close();
3198
3192
  },
3199
3193
  },
3200
3194
  close: {
3201
3195
  enable: true,
3202
- callback: function (event) {
3203
- event.close();
3196
+ callback: function (details) {
3197
+ details.close();
3204
3198
  },
3205
3199
  },
3206
3200
  },
@@ -3217,7 +3211,7 @@ define((function () { 'use strict';
3217
3211
  toClose: false,
3218
3212
  toHide: false,
3219
3213
  },
3220
- clickCallBack: void 0,
3214
+ clickCallBack: null,
3221
3215
  },
3222
3216
  drag: false,
3223
3217
  dragLimit: true,
@@ -3359,8 +3353,8 @@ define((function () { 'use strict';
3359
3353
  iconIsLoading: false,
3360
3354
  text: "确定",
3361
3355
  type: "primary",
3362
- callback(event) {
3363
- event.close();
3356
+ callback(detail) {
3357
+ detail.close();
3364
3358
  },
3365
3359
  },
3366
3360
  cancel: {
@@ -3371,8 +3365,8 @@ define((function () { 'use strict';
3371
3365
  iconIsLoading: false,
3372
3366
  text: "关闭",
3373
3367
  type: "default",
3374
- callback(event) {
3375
- event.close();
3368
+ callback(detail) {
3369
+ detail.close();
3376
3370
  },
3377
3371
  },
3378
3372
  other: {
@@ -3383,14 +3377,14 @@ define((function () { 'use strict';
3383
3377
  iconIsLoading: false,
3384
3378
  text: "其它按钮",
3385
3379
  type: "default",
3386
- callback(event) {
3387
- event.close();
3380
+ callback(detail) {
3381
+ detail.close();
3388
3382
  },
3389
3383
  },
3390
3384
  close: {
3391
3385
  enable: true,
3392
- callback(event) {
3393
- event.close();
3386
+ callback(detail) {
3387
+ detail.close();
3394
3388
  },
3395
3389
  },
3396
3390
  },
@@ -3407,7 +3401,7 @@ define((function () { 'use strict';
3407
3401
  toClose: false,
3408
3402
  toHide: false,
3409
3403
  },
3410
- clickCallBack: void 0,
3404
+ clickCallBack: null,
3411
3405
  },
3412
3406
  drag: false,
3413
3407
  dragLimit: true,
@@ -3555,9 +3549,8 @@ define((function () { 'use strict';
3555
3549
  iconIsLoading: false,
3556
3550
  text: "确定",
3557
3551
  type: "success",
3558
- callback(event) {
3559
- console.log(event);
3560
- event.close();
3552
+ callback(detail) {
3553
+ detail.close();
3561
3554
  },
3562
3555
  },
3563
3556
  cancel: {
@@ -3568,9 +3561,8 @@ define((function () { 'use strict';
3568
3561
  iconIsLoading: false,
3569
3562
  text: "关闭",
3570
3563
  type: "default",
3571
- callback(event) {
3572
- console.log(event);
3573
- event.close();
3564
+ callback(detail) {
3565
+ detail.close();
3574
3566
  },
3575
3567
  },
3576
3568
  other: {
@@ -3581,16 +3573,14 @@ define((function () { 'use strict';
3581
3573
  iconIsLoading: false,
3582
3574
  text: "其它按钮",
3583
3575
  type: "default",
3584
- callback(event) {
3585
- console.log(event);
3586
- event.close();
3576
+ callback(detail) {
3577
+ detail.close();
3587
3578
  },
3588
3579
  },
3589
3580
  close: {
3590
3581
  enable: true,
3591
- callback(event) {
3592
- console.log(event);
3593
- event.close();
3582
+ callback(detail) {
3583
+ detail.close();
3594
3584
  },
3595
3585
  },
3596
3586
  },
@@ -3607,7 +3597,7 @@ define((function () { 'use strict';
3607
3597
  toClose: false,
3608
3598
  toHide: false,
3609
3599
  },
3610
- clickCallBack: void 0,
3600
+ clickCallBack: null,
3611
3601
  },
3612
3602
  drag: false,
3613
3603
  dragLimit: true,
@@ -3754,7 +3744,7 @@ define((function () { 'use strict';
3754
3744
  toClose: false,
3755
3745
  toHide: false,
3756
3746
  },
3757
- clickCallBack: void 0,
3747
+ clickCallBack: null,
3758
3748
  },
3759
3749
  animation: "pops-anim-fadein-zoom",
3760
3750
  forbiddenScroll: false,
@@ -3855,7 +3845,7 @@ define((function () { 'use strict';
3855
3845
  toClose: false,
3856
3846
  toHide: false,
3857
3847
  },
3858
- clickCallBack: void 0,
3848
+ clickCallBack: null,
3859
3849
  },
3860
3850
  animation: "pops-anim-fadein-zoom",
3861
3851
  position: "center",
@@ -4138,12 +4128,17 @@ define((function () { 'use strict';
4138
4128
  position: "center",
4139
4129
  text: "默认标题",
4140
4130
  html: false,
4131
+ style: "",
4141
4132
  },
4142
4133
  content: {
4143
4134
  text: "默认内容",
4144
4135
  html: false,
4136
+ style: "",
4145
4137
  },
4146
4138
  btn: {
4139
+ merge: false,
4140
+ mergeReverse: false,
4141
+ reverse: false,
4147
4142
  position: "flex-end",
4148
4143
  ok: {
4149
4144
  enable: true,
@@ -4153,8 +4148,8 @@ define((function () { 'use strict';
4153
4148
  iconIsLoading: false,
4154
4149
  text: "确定",
4155
4150
  type: "primary",
4156
- callback(event) {
4157
- event.close();
4151
+ callback(detail) {
4152
+ detail.close();
4158
4153
  },
4159
4154
  },
4160
4155
  cancel: {
@@ -4165,8 +4160,8 @@ define((function () { 'use strict';
4165
4160
  iconIsLoading: false,
4166
4161
  text: "关闭",
4167
4162
  type: "default",
4168
- callback(event) {
4169
- event.close();
4163
+ callback(detail) {
4164
+ detail.close();
4170
4165
  },
4171
4166
  },
4172
4167
  other: {
@@ -4177,14 +4172,14 @@ define((function () { 'use strict';
4177
4172
  iconIsLoading: false,
4178
4173
  text: "其它按钮",
4179
4174
  type: "default",
4180
- callback(event) {
4181
- event.close();
4175
+ callback(detail) {
4176
+ detail.close();
4182
4177
  },
4183
4178
  },
4184
4179
  close: {
4185
4180
  enable: true,
4186
- callback(event) {
4187
- event.close();
4181
+ callback(detail) {
4182
+ detail.close();
4188
4183
  },
4189
4184
  },
4190
4185
  },
@@ -4194,7 +4189,7 @@ define((function () { 'use strict';
4194
4189
  toClose: true,
4195
4190
  toHide: false,
4196
4191
  },
4197
- clickCallBack: void 0,
4192
+ clickCallBack: null,
4198
4193
  },
4199
4194
  class: "",
4200
4195
  zIndex: 10000,
@@ -4462,8 +4457,8 @@ define((function () { 'use strict';
4462
4457
  iconIsLoading: false,
4463
4458
  text: "确定",
4464
4459
  type: "primary",
4465
- callback(event) {
4466
- event.close();
4460
+ callback(detail) {
4461
+ detail.close();
4467
4462
  },
4468
4463
  },
4469
4464
  cancel: {
@@ -4474,8 +4469,8 @@ define((function () { 'use strict';
4474
4469
  iconIsLoading: false,
4475
4470
  text: "关闭",
4476
4471
  type: "default",
4477
- callback(event) {
4478
- event.close();
4472
+ callback(detail) {
4473
+ detail.close();
4479
4474
  },
4480
4475
  },
4481
4476
  other: {
@@ -4486,14 +4481,14 @@ define((function () { 'use strict';
4486
4481
  iconIsLoading: false,
4487
4482
  text: "其它按钮",
4488
4483
  type: "default",
4489
- callback(event) {
4490
- event.close();
4484
+ callback(detail) {
4485
+ detail.close();
4491
4486
  },
4492
4487
  },
4493
4488
  close: {
4494
4489
  enable: true,
4495
- callback(event) {
4496
- event.close();
4490
+ callback(detail) {
4491
+ detail.close();
4497
4492
  },
4498
4493
  },
4499
4494
  },
@@ -4510,7 +4505,7 @@ define((function () { 'use strict';
4510
4505
  toClose: false,
4511
4506
  toHide: false,
4512
4507
  },
4513
- clickCallBack: void 0,
4508
+ clickCallBack: null,
4514
4509
  },
4515
4510
  drag: false,
4516
4511
  dragLimit: true,
@@ -4620,6 +4615,7 @@ define((function () { 'use strict';
4620
4615
  Folder_ICON[keyName] = Folder_ICON.apk;
4621
4616
  });
4622
4617
  if (details?.folder) {
4618
+ // @ts-ignore
4623
4619
  config.folder = details.folder;
4624
4620
  }
4625
4621
  let guid = popsUtils.getRandomGUID();
@@ -5361,6 +5357,9 @@ define((function () { 'use strict';
5361
5357
  className: "panel-switch",
5362
5358
  text: "switch",
5363
5359
  type: "switch",
5360
+ // @ts-ignore
5361
+ props: {},
5362
+ disabled: false,
5364
5363
  attributes: [],
5365
5364
  getValue() {
5366
5365
  return true;
@@ -5373,6 +5372,8 @@ define((function () { 'use strict';
5373
5372
  className: "panel-slider",
5374
5373
  text: "slider",
5375
5374
  type: "slider",
5375
+ // @ts-ignore
5376
+ props: {},
5376
5377
  attributes: [],
5377
5378
  getValue() {
5378
5379
  return 50;
@@ -5387,6 +5388,8 @@ define((function () { 'use strict';
5387
5388
  className: "panel-button",
5388
5389
  text: "button",
5389
5390
  type: "button",
5391
+ // @ts-ignore
5392
+ props: {},
5390
5393
  attributes: [],
5391
5394
  buttonIcon: "eleme",
5392
5395
  buttonIconIsLoading: true,
@@ -5399,6 +5402,8 @@ define((function () { 'use strict';
5399
5402
  {
5400
5403
  className: "panel-button",
5401
5404
  text: "button",
5405
+ // @ts-ignore
5406
+ props: {},
5402
5407
  type: "button",
5403
5408
  attributes: [],
5404
5409
  buttonIcon: "chromeFilled",
@@ -5414,6 +5419,8 @@ define((function () { 'use strict';
5414
5419
  text: "button",
5415
5420
  type: "button",
5416
5421
  attributes: [],
5422
+ // @ts-ignore
5423
+ props: {},
5417
5424
  buttonIcon: "upload",
5418
5425
  buttonIconIsLoading: false,
5419
5426
  buttonType: "info",
@@ -5442,6 +5449,8 @@ define((function () { 'use strict';
5442
5449
  className: "panel-input",
5443
5450
  text: "input",
5444
5451
  type: "input",
5452
+ // @ts-ignore
5453
+ props: {},
5445
5454
  attributes: [],
5446
5455
  getValue() {
5447
5456
  return "50";
@@ -5455,6 +5464,8 @@ define((function () { 'use strict';
5455
5464
  className: "panel-input-password",
5456
5465
  text: "input-password",
5457
5466
  type: "input",
5467
+ // @ts-ignore
5468
+ props: {},
5458
5469
  attributes: [],
5459
5470
  getValue() {
5460
5471
  return "123456";
@@ -5469,6 +5480,8 @@ define((function () { 'use strict';
5469
5480
  className: "panel-textarea",
5470
5481
  text: "textarea",
5471
5482
  type: "textarea",
5483
+ // @ts-ignore
5484
+ props: {},
5472
5485
  attributes: [],
5473
5486
  getValue() {
5474
5487
  return "50";
@@ -5482,6 +5495,8 @@ define((function () { 'use strict';
5482
5495
  className: "panel-select",
5483
5496
  text: "select",
5484
5497
  type: "select",
5498
+ // @ts-ignore
5499
+ props: {},
5485
5500
  attributes: [],
5486
5501
  getValue() {
5487
5502
  return 50;
@@ -5493,14 +5508,23 @@ define((function () { 'use strict';
5493
5508
  {
5494
5509
  value: "all",
5495
5510
  text: "所有",
5511
+ disable() {
5512
+ return false;
5513
+ },
5496
5514
  },
5497
5515
  {
5498
5516
  value: "text",
5499
5517
  text: "文本",
5518
+ disable() {
5519
+ return false;
5520
+ },
5500
5521
  },
5501
5522
  {
5502
5523
  value: "html",
5503
5524
  text: "超文本",
5525
+ disable() {
5526
+ return false;
5527
+ },
5504
5528
  },
5505
5529
  ],
5506
5530
  },
@@ -5508,6 +5532,8 @@ define((function () { 'use strict';
5508
5532
  className: "panel-select-multiple",
5509
5533
  type: "select-multiple",
5510
5534
  text: "select-multiple",
5535
+ // @ts-ignore
5536
+ props: {},
5511
5537
  attributes: [],
5512
5538
  placeholder: "请至少选择一个选项",
5513
5539
  getValue() {
@@ -5526,22 +5552,42 @@ define((function () { 'use strict';
5526
5552
  {
5527
5553
  value: "select-1",
5528
5554
  text: "单选1",
5555
+ isHTML: false,
5556
+ disable() {
5557
+ return false;
5558
+ },
5529
5559
  },
5530
5560
  {
5531
5561
  value: "select-2",
5532
5562
  text: "单选2",
5563
+ isHTML: false,
5564
+ disable() {
5565
+ return false;
5566
+ },
5533
5567
  },
5534
5568
  {
5535
5569
  value: "select-3",
5536
5570
  text: "单选3",
5571
+ isHTML: false,
5572
+ disable() {
5573
+ return false;
5574
+ },
5537
5575
  },
5538
5576
  {
5539
5577
  value: "select-4",
5540
5578
  text: "单选4",
5579
+ isHTML: false,
5580
+ disable() {
5581
+ return false;
5582
+ },
5541
5583
  },
5542
5584
  {
5543
5585
  value: "select-5",
5544
5586
  text: "单选5",
5587
+ isHTML: false,
5588
+ disable() {
5589
+ return false;
5590
+ },
5545
5591
  },
5546
5592
  ],
5547
5593
  },
@@ -5573,6 +5619,8 @@ define((function () { 'use strict';
5573
5619
  className: "panel-switch",
5574
5620
  text: "switch",
5575
5621
  type: "switch",
5622
+ // @ts-ignore
5623
+ props: {},
5576
5624
  attributes: [],
5577
5625
  getValue() {
5578
5626
  return true;
@@ -5584,6 +5632,8 @@ define((function () { 'use strict';
5584
5632
  {
5585
5633
  className: "panel-slider",
5586
5634
  text: "slider",
5635
+ // @ts-ignore
5636
+ props: {},
5587
5637
  type: "slider",
5588
5638
  attributes: [],
5589
5639
  getValue() {
@@ -5598,6 +5648,8 @@ define((function () { 'use strict';
5598
5648
  {
5599
5649
  className: "panel-button",
5600
5650
  text: "button",
5651
+ // @ts-ignore
5652
+ props: {},
5601
5653
  type: "button",
5602
5654
  attributes: [],
5603
5655
  buttonIcon: "eleme",
@@ -5612,6 +5664,8 @@ define((function () { 'use strict';
5612
5664
  className: "panel-button",
5613
5665
  text: "button",
5614
5666
  type: "button",
5667
+ // @ts-ignore
5668
+ props: {},
5615
5669
  attributes: [],
5616
5670
  buttonIcon: "chromeFilled",
5617
5671
  buttonIconIsLoading: true,
@@ -5624,6 +5678,8 @@ define((function () { 'use strict';
5624
5678
  {
5625
5679
  className: "panel-button",
5626
5680
  text: "button",
5681
+ // @ts-ignore
5682
+ props: {},
5627
5683
  type: "button",
5628
5684
  attributes: [],
5629
5685
  buttonIcon: "upload",
@@ -5651,6 +5707,8 @@ define((function () { 'use strict';
5651
5707
  {
5652
5708
  className: "panel-switch",
5653
5709
  text: "switch",
5710
+ // @ts-ignore
5711
+ props: {},
5654
5712
  type: "switch",
5655
5713
  attributes: [],
5656
5714
  getValue() {
@@ -5679,7 +5737,7 @@ define((function () { 'use strict';
5679
5737
  toClose: false,
5680
5738
  toHide: false,
5681
5739
  },
5682
- clickCallBack: void 0,
5740
+ clickCallBack: null,
5683
5741
  },
5684
5742
  class: "",
5685
5743
  mobileClassName: "pops-panel-is-mobile",
@@ -8318,6 +8376,7 @@ define((function () { 'use strict';
8318
8376
  icon: pops.config.iconSVG.search,
8319
8377
  iconIsLoading: false,
8320
8378
  text: "搜索",
8379
+ item: [],
8321
8380
  callback(clickEvent, contextMenuEvent, liElement) {
8322
8381
  console.log("点击:" + this.text, [
8323
8382
  clickEvent,
@@ -8330,6 +8389,7 @@ define((function () { 'use strict';
8330
8389
  icon: pops.config.iconSVG.documentCopy,
8331
8390
  iconIsLoading: false,
8332
8391
  text: "复制",
8392
+ item: [],
8333
8393
  callback(clickEvent, contextMenuEvent, liElement) {
8334
8394
  console.log("点击:" + this.text, [
8335
8395
  clickEvent,
@@ -8342,6 +8402,7 @@ define((function () { 'use strict';
8342
8402
  icon: pops.config.iconSVG.delete,
8343
8403
  text: "删除",
8344
8404
  iconIsLoading: false,
8405
+ item: [],
8345
8406
  callback(clickEvent, contextMenuEvent, liElement) {
8346
8407
  console.log("点击:" + this.text, [
8347
8408
  clickEvent,
@@ -8354,6 +8415,7 @@ define((function () { 'use strict';
8354
8415
  icon: pops.config.iconSVG.loading,
8355
8416
  iconIsLoading: true,
8356
8417
  text: "加载",
8418
+ item: [],
8357
8419
  callback(clickEvent, contextMenuEvent, liElement) {
8358
8420
  console.log("点击:" + this.text, [
8359
8421
  clickEvent,
@@ -8380,6 +8442,7 @@ define((function () { 'use strict';
8380
8442
  icon: "",
8381
8443
  iconIsLoading: false,
8382
8444
  text: "处理文件",
8445
+ item: [],
8383
8446
  callback(clickEvent, contextMenuEvent, liElement) {
8384
8447
  console.log("点击:" + this.text, [
8385
8448
  clickEvent,
@@ -8404,6 +8467,7 @@ define((function () { 'use strict';
8404
8467
  icon: pops.config.iconSVG.view,
8405
8468
  iconIsLoading: false,
8406
8469
  text: "查看",
8470
+ item: [],
8407
8471
  callback(clickEvent, contextMenuEvent, liElement) {
8408
8472
  console.log("点击:" + this.text, [
8409
8473
  clickEvent,
@@ -8443,6 +8507,7 @@ define((function () { 'use strict';
8443
8507
  throw "config.target 不能为空";
8444
8508
  }
8445
8509
  if (details.data) {
8510
+ // @ts-ignore
8446
8511
  config.data = details.data;
8447
8512
  }
8448
8513
  let guid = popsUtils.getRandomGUID();
@@ -9451,8 +9516,8 @@ define((function () { 'use strict';
9451
9516
  }
9452
9517
 
9453
9518
  const PopsTooltipConfig = () => {
9519
+ // @ts-ignore
9454
9520
  return {
9455
- // @ts-ignore
9456
9521
  target: null,
9457
9522
  content: "默认文字",
9458
9523
  position: "top",
@@ -9472,6 +9537,8 @@ define((function () { 'use strict';
9472
9537
  showAfterCallBack() { },
9473
9538
  closeBeforeCallBack() { },
9474
9539
  closeAfterCallBack() { },
9540
+ delayCloseTime: 100,
9541
+ showArrow: true,
9475
9542
  arrowDistance: 12.5,
9476
9543
  otherDistance: 0,
9477
9544
  style: "",
@@ -9546,6 +9613,10 @@ define((function () { 'use strict';
9546
9613
  });
9547
9614
  $toolTipContainer.appendChild(cssNode);
9548
9615
  }
9616
+ // 处理是否显示箭头元素
9617
+ if (!this.$data.config.showArrow) {
9618
+ $toolTipArrow.remove();
9619
+ }
9549
9620
  return {
9550
9621
  $toolTipContainer: $toolTipContainer,
9551
9622
  $toolTipArrow: $toolTipArrow,
@@ -9585,12 +9656,12 @@ define((function () { 'use strict';
9585
9656
  this.$el.$toolTip.style.setProperty("z-index", zIndex.toString());
9586
9657
  }
9587
9658
  /**
9588
- * 获取 提示框的位置
9659
+ * 计算 提示框的位置
9589
9660
  * @param targetElement 目标元素
9590
9661
  * @param arrowDistance 箭头和目标元素的距离
9591
9662
  * @param otherDistance 其它位置的偏移
9592
9663
  */
9593
- getPosition(targetElement, arrowDistance, otherDistance) {
9664
+ calcToolTipPosition(targetElement, arrowDistance, otherDistance) {
9594
9665
  let offsetInfo = popsDOMUtils.offset(targetElement, !this.$data.config.isFixed);
9595
9666
  // 目标 宽
9596
9667
  let targetElement_width = offsetInfo.width;
@@ -9639,7 +9710,7 @@ define((function () { 'use strict';
9639
9710
  * 动态修改tooltip的位置
9640
9711
  */
9641
9712
  changePosition() {
9642
- let positionInfo = this.getPosition(this.$data.config.target, this.$data.config.arrowDistance, this.$data.config.otherDistance);
9713
+ let positionInfo = this.calcToolTipPosition(this.$data.config.target, this.$data.config.arrowDistance, this.$data.config.otherDistance);
9643
9714
  let positionKey = this.$data.config.position.toUpperCase();
9644
9715
  let positionDetail = positionInfo[positionKey];
9645
9716
  if (positionDetail) {
@@ -9768,8 +9839,8 @@ define((function () { 'use strict';
9768
9839
  // 其它的如Touch事件不做处理
9769
9840
  if (event && event instanceof MouseEvent) {
9770
9841
  let $target = event.composedPath()[0];
9771
- // 如果是子元素触发的话,忽视
9772
- if ($target != this.$data.config.target) {
9842
+ // 如果是目标元素的子元素/tooltip元素的子元素触发的话,那就不管
9843
+ if ($target != this.$data.config.target && $target != this.$el.$toolTip) {
9773
9844
  return;
9774
9845
  }
9775
9846
  }
@@ -9787,6 +9858,10 @@ define((function () { 'use strict';
9787
9858
  let timeId = setTimeout(() => {
9788
9859
  // 设置属性触发关闭动画
9789
9860
  this.clearCloseTimeoutId(eventType, timeId);
9861
+ if (this.$el.$toolTip == null) {
9862
+ // 已清除了
9863
+ return;
9864
+ }
9790
9865
  this.$el.$toolTip.setAttribute("data-motion", this.$el.$toolTip
9791
9866
  .getAttribute("data-motion")
9792
9867
  .replace("fadeIn", "fadeOut"));
@@ -9852,7 +9927,10 @@ define((function () { 'use strict';
9852
9927
  * 鼠标|触摸进入事件
9853
9928
  */
9854
9929
  toolTipMouseEnterEvent() {
9855
- this.$el.$toolTip.style.animationPlayState = "paused";
9930
+ this.clearCloseTimeoutId("MouseEvent");
9931
+ this.clearCloseTimeoutId("TouchEvent");
9932
+ // 重置动画状态
9933
+ // this.$el.$toolTip.style.animationPlayState = "paused";
9856
9934
  // if (parseInt(getComputedStyle(toolTipElement)) > 0.5) {
9857
9935
  // toolTipElement.style.animationPlayState = "paused";
9858
9936
  // }
@@ -9874,8 +9952,9 @@ define((function () { 'use strict';
9874
9952
  /**
9875
9953
  * 鼠标|触摸离开事件
9876
9954
  */
9877
- toolTipMouseLeaveEvent() {
9878
- this.$el.$toolTip.style.animationPlayState = "running";
9955
+ toolTipMouseLeaveEvent(event) {
9956
+ this.close(event);
9957
+ // this.$el.$toolTip.style.animationPlayState = "running";
9879
9958
  }
9880
9959
  /**
9881
9960
  * 监听鼠标|触摸离开事件
@@ -9931,7 +10010,7 @@ define((function () { 'use strict';
9931
10010
  /** 配置 */
9932
10011
  config = {
9933
10012
  /** 版本号 */
9934
- version: "2024.11.3",
10013
+ version: "2024.11.21",
9935
10014
  cssText: {
9936
10015
  /** 主CSS */
9937
10016
  index: indexCSS,