@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.esm.js CHANGED
@@ -1743,10 +1743,9 @@ const PopsInstanceUtils = {
1743
1743
  getPopsMaxZIndex(deviation = 1) {
1744
1744
  deviation = Number.isNaN(deviation) ? 1 : deviation;
1745
1745
  // 最大值 2147483647
1746
- // 最大值 2147483647
1747
- // const maxZIndex = Math.pow(2, 31) - 1;
1746
+ // const browserMaxZIndex = Math.pow(2, 31) - 1;
1748
1747
  // 比较值 2000000000
1749
- const maxZIndexCompare = 2 * Math.pow(10, 9);
1748
+ const maxZIndex = 2 * Math.pow(10, 9);
1750
1749
  // 当前页面最大的z-index
1751
1750
  let zIndex = 0;
1752
1751
  // 当前的最大z-index的元素,调试使用
@@ -1776,17 +1775,18 @@ const PopsInstanceUtils = {
1776
1775
  }
1777
1776
  });
1778
1777
  zIndex += deviation;
1779
- if (zIndex >= maxZIndexCompare) {
1780
- // 最好不要超过最大值
1781
- zIndex = maxZIndexCompare;
1778
+ let isOverMaxZIndex = zIndex >= maxZIndex;
1779
+ if (isOverMaxZIndex) {
1780
+ // 超出z-index最大值
1781
+ zIndex = maxZIndex;
1782
1782
  }
1783
- return { zIndex: zIndex, animElement: maxZIndexNode };
1783
+ return { zIndex: zIndex, animElement: maxZIndexNode, isOverMaxZIndex };
1784
1784
  },
1785
1785
  /**
1786
1786
  * 获取页面中最大的z-index
1787
1787
  * @param deviation 获取最大的z-index值的偏移,默认是+1
1788
1788
  * @example
1789
- * Utils.getMaxZIndex();
1789
+ * getMaxZIndex();
1790
1790
  * > 1001
1791
1791
  **/
1792
1792
  getMaxZIndex(deviation = 1) {
@@ -3144,17 +3144,11 @@ const PopsHandler = {
3144
3144
  else {
3145
3145
  // 对配置进行处理
3146
3146
  // 选择配置的z-index和已有的pops实例的最大z-index值
3147
- if (typeof config.zIndex === "function") {
3148
- let originZIndexFn = config.zIndex;
3149
- config.zIndex = () => {
3150
- const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(originZIndexFn) + 100);
3151
- return maxZIndex;
3152
- };
3153
- }
3154
- else {
3155
- const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(config.zIndex) + 100);
3156
- config.zIndex = maxZIndex;
3157
- }
3147
+ let originZIndex = config.zIndex;
3148
+ config.zIndex = () => {
3149
+ const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(originZIndex) + 100);
3150
+ return maxZIndex;
3151
+ };
3158
3152
  }
3159
3153
  return config;
3160
3154
  },
@@ -3191,14 +3185,14 @@ const PopsAlertConfig = () => {
3191
3185
  iconIsLoading: false,
3192
3186
  text: "确定",
3193
3187
  type: "primary",
3194
- callback: function (event) {
3195
- event.close();
3188
+ callback: function (details) {
3189
+ details.close();
3196
3190
  },
3197
3191
  },
3198
3192
  close: {
3199
3193
  enable: true,
3200
- callback: function (event) {
3201
- event.close();
3194
+ callback: function (details) {
3195
+ details.close();
3202
3196
  },
3203
3197
  },
3204
3198
  },
@@ -3215,7 +3209,7 @@ const PopsAlertConfig = () => {
3215
3209
  toClose: false,
3216
3210
  toHide: false,
3217
3211
  },
3218
- clickCallBack: void 0,
3212
+ clickCallBack: null,
3219
3213
  },
3220
3214
  drag: false,
3221
3215
  dragLimit: true,
@@ -3357,8 +3351,8 @@ const PopsConfirmConfig = () => {
3357
3351
  iconIsLoading: false,
3358
3352
  text: "确定",
3359
3353
  type: "primary",
3360
- callback(event) {
3361
- event.close();
3354
+ callback(detail) {
3355
+ detail.close();
3362
3356
  },
3363
3357
  },
3364
3358
  cancel: {
@@ -3369,8 +3363,8 @@ const PopsConfirmConfig = () => {
3369
3363
  iconIsLoading: false,
3370
3364
  text: "关闭",
3371
3365
  type: "default",
3372
- callback(event) {
3373
- event.close();
3366
+ callback(detail) {
3367
+ detail.close();
3374
3368
  },
3375
3369
  },
3376
3370
  other: {
@@ -3381,14 +3375,14 @@ const PopsConfirmConfig = () => {
3381
3375
  iconIsLoading: false,
3382
3376
  text: "其它按钮",
3383
3377
  type: "default",
3384
- callback(event) {
3385
- event.close();
3378
+ callback(detail) {
3379
+ detail.close();
3386
3380
  },
3387
3381
  },
3388
3382
  close: {
3389
3383
  enable: true,
3390
- callback(event) {
3391
- event.close();
3384
+ callback(detail) {
3385
+ detail.close();
3392
3386
  },
3393
3387
  },
3394
3388
  },
@@ -3405,7 +3399,7 @@ const PopsConfirmConfig = () => {
3405
3399
  toClose: false,
3406
3400
  toHide: false,
3407
3401
  },
3408
- clickCallBack: void 0,
3402
+ clickCallBack: null,
3409
3403
  },
3410
3404
  drag: false,
3411
3405
  dragLimit: true,
@@ -3553,9 +3547,8 @@ const PopsPromptConfig = () => {
3553
3547
  iconIsLoading: false,
3554
3548
  text: "确定",
3555
3549
  type: "success",
3556
- callback(event) {
3557
- console.log(event);
3558
- event.close();
3550
+ callback(detail) {
3551
+ detail.close();
3559
3552
  },
3560
3553
  },
3561
3554
  cancel: {
@@ -3566,9 +3559,8 @@ const PopsPromptConfig = () => {
3566
3559
  iconIsLoading: false,
3567
3560
  text: "关闭",
3568
3561
  type: "default",
3569
- callback(event) {
3570
- console.log(event);
3571
- event.close();
3562
+ callback(detail) {
3563
+ detail.close();
3572
3564
  },
3573
3565
  },
3574
3566
  other: {
@@ -3579,16 +3571,14 @@ const PopsPromptConfig = () => {
3579
3571
  iconIsLoading: false,
3580
3572
  text: "其它按钮",
3581
3573
  type: "default",
3582
- callback(event) {
3583
- console.log(event);
3584
- event.close();
3574
+ callback(detail) {
3575
+ detail.close();
3585
3576
  },
3586
3577
  },
3587
3578
  close: {
3588
3579
  enable: true,
3589
- callback(event) {
3590
- console.log(event);
3591
- event.close();
3580
+ callback(detail) {
3581
+ detail.close();
3592
3582
  },
3593
3583
  },
3594
3584
  },
@@ -3605,7 +3595,7 @@ const PopsPromptConfig = () => {
3605
3595
  toClose: false,
3606
3596
  toHide: false,
3607
3597
  },
3608
- clickCallBack: void 0,
3598
+ clickCallBack: null,
3609
3599
  },
3610
3600
  drag: false,
3611
3601
  dragLimit: true,
@@ -3752,7 +3742,7 @@ const PopsLoadingConfig = () => {
3752
3742
  toClose: false,
3753
3743
  toHide: false,
3754
3744
  },
3755
- clickCallBack: void 0,
3745
+ clickCallBack: null,
3756
3746
  },
3757
3747
  animation: "pops-anim-fadein-zoom",
3758
3748
  forbiddenScroll: false,
@@ -3853,7 +3843,7 @@ const PopsIframeConfig = () => {
3853
3843
  toClose: false,
3854
3844
  toHide: false,
3855
3845
  },
3856
- clickCallBack: void 0,
3846
+ clickCallBack: null,
3857
3847
  },
3858
3848
  animation: "pops-anim-fadein-zoom",
3859
3849
  position: "center",
@@ -4136,12 +4126,17 @@ const PopsDrawerConfig = () => {
4136
4126
  position: "center",
4137
4127
  text: "默认标题",
4138
4128
  html: false,
4129
+ style: "",
4139
4130
  },
4140
4131
  content: {
4141
4132
  text: "默认内容",
4142
4133
  html: false,
4134
+ style: "",
4143
4135
  },
4144
4136
  btn: {
4137
+ merge: false,
4138
+ mergeReverse: false,
4139
+ reverse: false,
4145
4140
  position: "flex-end",
4146
4141
  ok: {
4147
4142
  enable: true,
@@ -4151,8 +4146,8 @@ const PopsDrawerConfig = () => {
4151
4146
  iconIsLoading: false,
4152
4147
  text: "确定",
4153
4148
  type: "primary",
4154
- callback(event) {
4155
- event.close();
4149
+ callback(detail) {
4150
+ detail.close();
4156
4151
  },
4157
4152
  },
4158
4153
  cancel: {
@@ -4163,8 +4158,8 @@ const PopsDrawerConfig = () => {
4163
4158
  iconIsLoading: false,
4164
4159
  text: "关闭",
4165
4160
  type: "default",
4166
- callback(event) {
4167
- event.close();
4161
+ callback(detail) {
4162
+ detail.close();
4168
4163
  },
4169
4164
  },
4170
4165
  other: {
@@ -4175,14 +4170,14 @@ const PopsDrawerConfig = () => {
4175
4170
  iconIsLoading: false,
4176
4171
  text: "其它按钮",
4177
4172
  type: "default",
4178
- callback(event) {
4179
- event.close();
4173
+ callback(detail) {
4174
+ detail.close();
4180
4175
  },
4181
4176
  },
4182
4177
  close: {
4183
4178
  enable: true,
4184
- callback(event) {
4185
- event.close();
4179
+ callback(detail) {
4180
+ detail.close();
4186
4181
  },
4187
4182
  },
4188
4183
  },
@@ -4192,7 +4187,7 @@ const PopsDrawerConfig = () => {
4192
4187
  toClose: true,
4193
4188
  toHide: false,
4194
4189
  },
4195
- clickCallBack: void 0,
4190
+ clickCallBack: null,
4196
4191
  },
4197
4192
  class: "",
4198
4193
  zIndex: 10000,
@@ -4460,8 +4455,8 @@ const PopsFolderConfig = () => {
4460
4455
  iconIsLoading: false,
4461
4456
  text: "确定",
4462
4457
  type: "primary",
4463
- callback(event) {
4464
- event.close();
4458
+ callback(detail) {
4459
+ detail.close();
4465
4460
  },
4466
4461
  },
4467
4462
  cancel: {
@@ -4472,8 +4467,8 @@ const PopsFolderConfig = () => {
4472
4467
  iconIsLoading: false,
4473
4468
  text: "关闭",
4474
4469
  type: "default",
4475
- callback(event) {
4476
- event.close();
4470
+ callback(detail) {
4471
+ detail.close();
4477
4472
  },
4478
4473
  },
4479
4474
  other: {
@@ -4484,14 +4479,14 @@ const PopsFolderConfig = () => {
4484
4479
  iconIsLoading: false,
4485
4480
  text: "其它按钮",
4486
4481
  type: "default",
4487
- callback(event) {
4488
- event.close();
4482
+ callback(detail) {
4483
+ detail.close();
4489
4484
  },
4490
4485
  },
4491
4486
  close: {
4492
4487
  enable: true,
4493
- callback(event) {
4494
- event.close();
4488
+ callback(detail) {
4489
+ detail.close();
4495
4490
  },
4496
4491
  },
4497
4492
  },
@@ -4508,7 +4503,7 @@ const PopsFolderConfig = () => {
4508
4503
  toClose: false,
4509
4504
  toHide: false,
4510
4505
  },
4511
- clickCallBack: void 0,
4506
+ clickCallBack: null,
4512
4507
  },
4513
4508
  drag: false,
4514
4509
  dragLimit: true,
@@ -4618,6 +4613,7 @@ class PopsFolder {
4618
4613
  Folder_ICON[keyName] = Folder_ICON.apk;
4619
4614
  });
4620
4615
  if (details?.folder) {
4616
+ // @ts-ignore
4621
4617
  config.folder = details.folder;
4622
4618
  }
4623
4619
  let guid = popsUtils.getRandomGUID();
@@ -5359,6 +5355,9 @@ const PopsPanelConfig = () => {
5359
5355
  className: "panel-switch",
5360
5356
  text: "switch",
5361
5357
  type: "switch",
5358
+ // @ts-ignore
5359
+ props: {},
5360
+ disabled: false,
5362
5361
  attributes: [],
5363
5362
  getValue() {
5364
5363
  return true;
@@ -5371,6 +5370,8 @@ const PopsPanelConfig = () => {
5371
5370
  className: "panel-slider",
5372
5371
  text: "slider",
5373
5372
  type: "slider",
5373
+ // @ts-ignore
5374
+ props: {},
5374
5375
  attributes: [],
5375
5376
  getValue() {
5376
5377
  return 50;
@@ -5385,6 +5386,8 @@ const PopsPanelConfig = () => {
5385
5386
  className: "panel-button",
5386
5387
  text: "button",
5387
5388
  type: "button",
5389
+ // @ts-ignore
5390
+ props: {},
5388
5391
  attributes: [],
5389
5392
  buttonIcon: "eleme",
5390
5393
  buttonIconIsLoading: true,
@@ -5397,6 +5400,8 @@ const PopsPanelConfig = () => {
5397
5400
  {
5398
5401
  className: "panel-button",
5399
5402
  text: "button",
5403
+ // @ts-ignore
5404
+ props: {},
5400
5405
  type: "button",
5401
5406
  attributes: [],
5402
5407
  buttonIcon: "chromeFilled",
@@ -5412,6 +5417,8 @@ const PopsPanelConfig = () => {
5412
5417
  text: "button",
5413
5418
  type: "button",
5414
5419
  attributes: [],
5420
+ // @ts-ignore
5421
+ props: {},
5415
5422
  buttonIcon: "upload",
5416
5423
  buttonIconIsLoading: false,
5417
5424
  buttonType: "info",
@@ -5440,6 +5447,8 @@ const PopsPanelConfig = () => {
5440
5447
  className: "panel-input",
5441
5448
  text: "input",
5442
5449
  type: "input",
5450
+ // @ts-ignore
5451
+ props: {},
5443
5452
  attributes: [],
5444
5453
  getValue() {
5445
5454
  return "50";
@@ -5453,6 +5462,8 @@ const PopsPanelConfig = () => {
5453
5462
  className: "panel-input-password",
5454
5463
  text: "input-password",
5455
5464
  type: "input",
5465
+ // @ts-ignore
5466
+ props: {},
5456
5467
  attributes: [],
5457
5468
  getValue() {
5458
5469
  return "123456";
@@ -5467,6 +5478,8 @@ const PopsPanelConfig = () => {
5467
5478
  className: "panel-textarea",
5468
5479
  text: "textarea",
5469
5480
  type: "textarea",
5481
+ // @ts-ignore
5482
+ props: {},
5470
5483
  attributes: [],
5471
5484
  getValue() {
5472
5485
  return "50";
@@ -5480,6 +5493,8 @@ const PopsPanelConfig = () => {
5480
5493
  className: "panel-select",
5481
5494
  text: "select",
5482
5495
  type: "select",
5496
+ // @ts-ignore
5497
+ props: {},
5483
5498
  attributes: [],
5484
5499
  getValue() {
5485
5500
  return 50;
@@ -5491,14 +5506,23 @@ const PopsPanelConfig = () => {
5491
5506
  {
5492
5507
  value: "all",
5493
5508
  text: "所有",
5509
+ disable() {
5510
+ return false;
5511
+ },
5494
5512
  },
5495
5513
  {
5496
5514
  value: "text",
5497
5515
  text: "文本",
5516
+ disable() {
5517
+ return false;
5518
+ },
5498
5519
  },
5499
5520
  {
5500
5521
  value: "html",
5501
5522
  text: "超文本",
5523
+ disable() {
5524
+ return false;
5525
+ },
5502
5526
  },
5503
5527
  ],
5504
5528
  },
@@ -5506,6 +5530,8 @@ const PopsPanelConfig = () => {
5506
5530
  className: "panel-select-multiple",
5507
5531
  type: "select-multiple",
5508
5532
  text: "select-multiple",
5533
+ // @ts-ignore
5534
+ props: {},
5509
5535
  attributes: [],
5510
5536
  placeholder: "请至少选择一个选项",
5511
5537
  getValue() {
@@ -5524,22 +5550,42 @@ const PopsPanelConfig = () => {
5524
5550
  {
5525
5551
  value: "select-1",
5526
5552
  text: "单选1",
5553
+ isHTML: false,
5554
+ disable() {
5555
+ return false;
5556
+ },
5527
5557
  },
5528
5558
  {
5529
5559
  value: "select-2",
5530
5560
  text: "单选2",
5561
+ isHTML: false,
5562
+ disable() {
5563
+ return false;
5564
+ },
5531
5565
  },
5532
5566
  {
5533
5567
  value: "select-3",
5534
5568
  text: "单选3",
5569
+ isHTML: false,
5570
+ disable() {
5571
+ return false;
5572
+ },
5535
5573
  },
5536
5574
  {
5537
5575
  value: "select-4",
5538
5576
  text: "单选4",
5577
+ isHTML: false,
5578
+ disable() {
5579
+ return false;
5580
+ },
5539
5581
  },
5540
5582
  {
5541
5583
  value: "select-5",
5542
5584
  text: "单选5",
5585
+ isHTML: false,
5586
+ disable() {
5587
+ return false;
5588
+ },
5543
5589
  },
5544
5590
  ],
5545
5591
  },
@@ -5571,6 +5617,8 @@ const PopsPanelConfig = () => {
5571
5617
  className: "panel-switch",
5572
5618
  text: "switch",
5573
5619
  type: "switch",
5620
+ // @ts-ignore
5621
+ props: {},
5574
5622
  attributes: [],
5575
5623
  getValue() {
5576
5624
  return true;
@@ -5582,6 +5630,8 @@ const PopsPanelConfig = () => {
5582
5630
  {
5583
5631
  className: "panel-slider",
5584
5632
  text: "slider",
5633
+ // @ts-ignore
5634
+ props: {},
5585
5635
  type: "slider",
5586
5636
  attributes: [],
5587
5637
  getValue() {
@@ -5596,6 +5646,8 @@ const PopsPanelConfig = () => {
5596
5646
  {
5597
5647
  className: "panel-button",
5598
5648
  text: "button",
5649
+ // @ts-ignore
5650
+ props: {},
5599
5651
  type: "button",
5600
5652
  attributes: [],
5601
5653
  buttonIcon: "eleme",
@@ -5610,6 +5662,8 @@ const PopsPanelConfig = () => {
5610
5662
  className: "panel-button",
5611
5663
  text: "button",
5612
5664
  type: "button",
5665
+ // @ts-ignore
5666
+ props: {},
5613
5667
  attributes: [],
5614
5668
  buttonIcon: "chromeFilled",
5615
5669
  buttonIconIsLoading: true,
@@ -5622,6 +5676,8 @@ const PopsPanelConfig = () => {
5622
5676
  {
5623
5677
  className: "panel-button",
5624
5678
  text: "button",
5679
+ // @ts-ignore
5680
+ props: {},
5625
5681
  type: "button",
5626
5682
  attributes: [],
5627
5683
  buttonIcon: "upload",
@@ -5649,6 +5705,8 @@ const PopsPanelConfig = () => {
5649
5705
  {
5650
5706
  className: "panel-switch",
5651
5707
  text: "switch",
5708
+ // @ts-ignore
5709
+ props: {},
5652
5710
  type: "switch",
5653
5711
  attributes: [],
5654
5712
  getValue() {
@@ -5677,7 +5735,7 @@ const PopsPanelConfig = () => {
5677
5735
  toClose: false,
5678
5736
  toHide: false,
5679
5737
  },
5680
- clickCallBack: void 0,
5738
+ clickCallBack: null,
5681
5739
  },
5682
5740
  class: "",
5683
5741
  mobileClassName: "pops-panel-is-mobile",
@@ -8316,6 +8374,7 @@ const rightClickMenuConfig = () => {
8316
8374
  icon: pops.config.iconSVG.search,
8317
8375
  iconIsLoading: false,
8318
8376
  text: "搜索",
8377
+ item: [],
8319
8378
  callback(clickEvent, contextMenuEvent, liElement) {
8320
8379
  console.log("点击:" + this.text, [
8321
8380
  clickEvent,
@@ -8328,6 +8387,7 @@ const rightClickMenuConfig = () => {
8328
8387
  icon: pops.config.iconSVG.documentCopy,
8329
8388
  iconIsLoading: false,
8330
8389
  text: "复制",
8390
+ item: [],
8331
8391
  callback(clickEvent, contextMenuEvent, liElement) {
8332
8392
  console.log("点击:" + this.text, [
8333
8393
  clickEvent,
@@ -8340,6 +8400,7 @@ const rightClickMenuConfig = () => {
8340
8400
  icon: pops.config.iconSVG.delete,
8341
8401
  text: "删除",
8342
8402
  iconIsLoading: false,
8403
+ item: [],
8343
8404
  callback(clickEvent, contextMenuEvent, liElement) {
8344
8405
  console.log("点击:" + this.text, [
8345
8406
  clickEvent,
@@ -8352,6 +8413,7 @@ const rightClickMenuConfig = () => {
8352
8413
  icon: pops.config.iconSVG.loading,
8353
8414
  iconIsLoading: true,
8354
8415
  text: "加载",
8416
+ item: [],
8355
8417
  callback(clickEvent, contextMenuEvent, liElement) {
8356
8418
  console.log("点击:" + this.text, [
8357
8419
  clickEvent,
@@ -8378,6 +8440,7 @@ const rightClickMenuConfig = () => {
8378
8440
  icon: "",
8379
8441
  iconIsLoading: false,
8380
8442
  text: "处理文件",
8443
+ item: [],
8381
8444
  callback(clickEvent, contextMenuEvent, liElement) {
8382
8445
  console.log("点击:" + this.text, [
8383
8446
  clickEvent,
@@ -8402,6 +8465,7 @@ const rightClickMenuConfig = () => {
8402
8465
  icon: pops.config.iconSVG.view,
8403
8466
  iconIsLoading: false,
8404
8467
  text: "查看",
8468
+ item: [],
8405
8469
  callback(clickEvent, contextMenuEvent, liElement) {
8406
8470
  console.log("点击:" + this.text, [
8407
8471
  clickEvent,
@@ -8441,6 +8505,7 @@ class PopsRightClickMenu {
8441
8505
  throw "config.target 不能为空";
8442
8506
  }
8443
8507
  if (details.data) {
8508
+ // @ts-ignore
8444
8509
  config.data = details.data;
8445
8510
  }
8446
8511
  let guid = popsUtils.getRandomGUID();
@@ -9449,8 +9514,8 @@ class PopsSearchSuggestion {
9449
9514
  }
9450
9515
 
9451
9516
  const PopsTooltipConfig = () => {
9517
+ // @ts-ignore
9452
9518
  return {
9453
- // @ts-ignore
9454
9519
  target: null,
9455
9520
  content: "默认文字",
9456
9521
  position: "top",
@@ -9470,6 +9535,8 @@ const PopsTooltipConfig = () => {
9470
9535
  showAfterCallBack() { },
9471
9536
  closeBeforeCallBack() { },
9472
9537
  closeAfterCallBack() { },
9538
+ delayCloseTime: 100,
9539
+ showArrow: true,
9473
9540
  arrowDistance: 12.5,
9474
9541
  otherDistance: 0,
9475
9542
  style: "",
@@ -9544,6 +9611,10 @@ class ToolTip {
9544
9611
  });
9545
9612
  $toolTipContainer.appendChild(cssNode);
9546
9613
  }
9614
+ // 处理是否显示箭头元素
9615
+ if (!this.$data.config.showArrow) {
9616
+ $toolTipArrow.remove();
9617
+ }
9547
9618
  return {
9548
9619
  $toolTipContainer: $toolTipContainer,
9549
9620
  $toolTipArrow: $toolTipArrow,
@@ -9583,12 +9654,12 @@ class ToolTip {
9583
9654
  this.$el.$toolTip.style.setProperty("z-index", zIndex.toString());
9584
9655
  }
9585
9656
  /**
9586
- * 获取 提示框的位置
9657
+ * 计算 提示框的位置
9587
9658
  * @param targetElement 目标元素
9588
9659
  * @param arrowDistance 箭头和目标元素的距离
9589
9660
  * @param otherDistance 其它位置的偏移
9590
9661
  */
9591
- getPosition(targetElement, arrowDistance, otherDistance) {
9662
+ calcToolTipPosition(targetElement, arrowDistance, otherDistance) {
9592
9663
  let offsetInfo = popsDOMUtils.offset(targetElement, !this.$data.config.isFixed);
9593
9664
  // 目标 宽
9594
9665
  let targetElement_width = offsetInfo.width;
@@ -9637,7 +9708,7 @@ class ToolTip {
9637
9708
  * 动态修改tooltip的位置
9638
9709
  */
9639
9710
  changePosition() {
9640
- let positionInfo = this.getPosition(this.$data.config.target, this.$data.config.arrowDistance, this.$data.config.otherDistance);
9711
+ let positionInfo = this.calcToolTipPosition(this.$data.config.target, this.$data.config.arrowDistance, this.$data.config.otherDistance);
9641
9712
  let positionKey = this.$data.config.position.toUpperCase();
9642
9713
  let positionDetail = positionInfo[positionKey];
9643
9714
  if (positionDetail) {
@@ -9766,8 +9837,8 @@ class ToolTip {
9766
9837
  // 其它的如Touch事件不做处理
9767
9838
  if (event && event instanceof MouseEvent) {
9768
9839
  let $target = event.composedPath()[0];
9769
- // 如果是子元素触发的话,忽视
9770
- if ($target != this.$data.config.target) {
9840
+ // 如果是目标元素的子元素/tooltip元素的子元素触发的话,那就不管
9841
+ if ($target != this.$data.config.target && $target != this.$el.$toolTip) {
9771
9842
  return;
9772
9843
  }
9773
9844
  }
@@ -9785,6 +9856,10 @@ class ToolTip {
9785
9856
  let timeId = setTimeout(() => {
9786
9857
  // 设置属性触发关闭动画
9787
9858
  this.clearCloseTimeoutId(eventType, timeId);
9859
+ if (this.$el.$toolTip == null) {
9860
+ // 已清除了
9861
+ return;
9862
+ }
9788
9863
  this.$el.$toolTip.setAttribute("data-motion", this.$el.$toolTip
9789
9864
  .getAttribute("data-motion")
9790
9865
  .replace("fadeIn", "fadeOut"));
@@ -9850,7 +9925,10 @@ class ToolTip {
9850
9925
  * 鼠标|触摸进入事件
9851
9926
  */
9852
9927
  toolTipMouseEnterEvent() {
9853
- this.$el.$toolTip.style.animationPlayState = "paused";
9928
+ this.clearCloseTimeoutId("MouseEvent");
9929
+ this.clearCloseTimeoutId("TouchEvent");
9930
+ // 重置动画状态
9931
+ // this.$el.$toolTip.style.animationPlayState = "paused";
9854
9932
  // if (parseInt(getComputedStyle(toolTipElement)) > 0.5) {
9855
9933
  // toolTipElement.style.animationPlayState = "paused";
9856
9934
  // }
@@ -9872,8 +9950,9 @@ class ToolTip {
9872
9950
  /**
9873
9951
  * 鼠标|触摸离开事件
9874
9952
  */
9875
- toolTipMouseLeaveEvent() {
9876
- this.$el.$toolTip.style.animationPlayState = "running";
9953
+ toolTipMouseLeaveEvent(event) {
9954
+ this.close(event);
9955
+ // this.$el.$toolTip.style.animationPlayState = "running";
9877
9956
  }
9878
9957
  /**
9879
9958
  * 监听鼠标|触摸离开事件
@@ -9929,7 +10008,7 @@ class Pops {
9929
10008
  /** 配置 */
9930
10009
  config = {
9931
10010
  /** 版本号 */
9932
- version: "2024.11.3",
10011
+ version: "2024.11.21",
9933
10012
  cssText: {
9934
10013
  /** 主CSS */
9935
10014
  index: indexCSS,