@whitesev/pops 2.5.4 → 2.6.0

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 +195 -161
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.amd.min.js +1 -1
  4. package/dist/index.amd.min.js.map +1 -1
  5. package/dist/index.cjs.js +195 -161
  6. package/dist/index.cjs.js.map +1 -1
  7. package/dist/index.cjs.min.js +1 -1
  8. package/dist/index.cjs.min.js.map +1 -1
  9. package/dist/index.esm.js +195 -161
  10. package/dist/index.esm.js.map +1 -1
  11. package/dist/index.esm.min.js +1 -1
  12. package/dist/index.esm.min.js.map +1 -1
  13. package/dist/index.iife.js +195 -161
  14. package/dist/index.iife.js.map +1 -1
  15. package/dist/index.iife.min.js +1 -1
  16. package/dist/index.iife.min.js.map +1 -1
  17. package/dist/index.system.js +195 -161
  18. package/dist/index.system.js.map +1 -1
  19. package/dist/index.system.min.js +1 -1
  20. package/dist/index.system.min.js.map +1 -1
  21. package/dist/index.umd.js +195 -161
  22. package/dist/index.umd.js.map +1 -1
  23. package/dist/index.umd.min.js +1 -1
  24. package/dist/index.umd.min.js.map +1 -1
  25. package/dist/types/src/Pops.d.ts +60 -20968
  26. package/dist/types/src/components/alert/index.d.ts +1 -1
  27. package/dist/types/src/components/confirm/index.d.ts +1 -1
  28. package/dist/types/src/components/drawer/index.d.ts +1 -1
  29. package/dist/types/src/components/folder/index.d.ts +1 -1
  30. package/dist/types/src/components/iframe/index.d.ts +2 -2
  31. package/dist/types/src/components/iframe/types/index.d.ts +6 -6
  32. package/dist/types/src/components/loading/index.d.ts +1 -1
  33. package/dist/types/src/components/panel/index.d.ts +4 -4
  34. package/dist/types/src/components/prompt/index.d.ts +1 -1
  35. package/dist/types/src/components/rightClickMenu/index.d.ts +134 -20954
  36. package/dist/types/src/components/rightClickMenu/types/index.d.ts +17 -1
  37. package/dist/types/src/handler/PopsHandler.d.ts +18 -17
  38. package/dist/types/src/types/button.d.ts +4 -4
  39. package/dist/types/src/types/event.d.ts +7 -7
  40. package/dist/types/src/utils/PopsInstanceUtils.d.ts +8 -8
  41. package/package.json +12 -12
  42. package/src/components/alert/index.ts +13 -13
  43. package/src/components/confirm/index.ts +15 -16
  44. package/src/components/drawer/index.ts +22 -22
  45. package/src/components/folder/index.ts +14 -14
  46. package/src/components/iframe/index.ts +19 -20
  47. package/src/components/iframe/types/index.ts +6 -6
  48. package/src/components/loading/index.ts +8 -8
  49. package/src/components/panel/index.css +12 -1
  50. package/src/components/panel/index.ts +11 -11
  51. package/src/components/prompt/index.ts +28 -29
  52. package/src/components/rightClickMenu/config.ts +3 -0
  53. package/src/components/rightClickMenu/index.css +3 -0
  54. package/src/components/rightClickMenu/index.ts +51 -19
  55. package/src/components/rightClickMenu/types/index.ts +17 -1
  56. package/src/handler/PopsHandler.ts +70 -68
  57. package/src/types/button.d.ts +4 -4
  58. package/src/types/event.d.ts +7 -7
  59. package/src/utils/PopsInstanceUtils.ts +28 -24
@@ -10,7 +10,7 @@ import { PopsCore } from "../PopsCore";
10
10
  import { PopsAnimation } from "../PopsAnimation";
11
11
  import { PopsInstData } from "../PopsInst";
12
12
  import type { PopsCommonConfig } from "../types/components";
13
- import type { PopsEventDetails, PopsHandlerEventDetails } from "../types/event";
13
+ import type { PopsEventConfig, PopsHandlerEventConfig } from "../types/event";
14
14
  import type { PopsInstCommonConfig } from "../types/inst";
15
15
  import type { PopsInstStoreType, PopsType, PopsSupportAnimDetailsType, PopsSupportOnlyDetails } from "../types/main";
16
16
  import { popsDOMUtils } from "../utils/PopsDOMUtils";
@@ -103,10 +103,10 @@ export const PopsHandler = {
103
103
  * 处理遮罩层
104
104
  *
105
105
  * + 设置遮罩层的点击事件
106
- * @param details 传递的配置
106
+ * @param config 传递的配置
107
107
  */
108
108
  handleMask(
109
- details = {} as {
109
+ config = {} as {
110
110
  type: "alert" | "confirm" | "prompt" | "loading" | "iframe" | "drawer" | "folder" | "panel";
111
111
  guid: string;
112
112
  config:
@@ -121,7 +121,7 @@ export const PopsHandler = {
121
121
  }
122
122
  ) {
123
123
  const result = {
124
- maskElement: popsDOMUtils.parseTextToDOM<HTMLDivElement>(details.maskHTML),
124
+ maskElement: popsDOMUtils.parseTextToDOM<HTMLDivElement>(config.maskHTML),
125
125
  };
126
126
  let isMaskClick = false;
127
127
  /**
@@ -131,32 +131,32 @@ export const PopsHandler = {
131
131
  function clickEvent(event: MouseEvent | PointerEvent) {
132
132
  popsDOMUtils.preventEvent(event);
133
133
  // 获取该类型实例存储列表
134
- const targetInst = PopsInstData[details.type];
134
+ const targetInst = PopsInstData[config.type];
135
135
  function originalRun() {
136
- if (details.config.mask!.clickEvent!.toClose) {
136
+ if (config.config.mask!.clickEvent!.toClose) {
137
137
  /* 关闭 */
138
- return PopsInstanceUtils.close(details.type, targetInst, details.guid, details.config, details.animElement);
139
- } else if (details.config.mask!.clickEvent!.toHide) {
138
+ return PopsInstanceUtils.close(config.config, config.type, targetInst, config.guid, config.animElement);
139
+ } else if (config.config.mask!.clickEvent!.toHide) {
140
140
  /* 隐藏 */
141
141
  return PopsInstanceUtils.hide(
142
- details.type,
142
+ config.config,
143
+ config.type,
143
144
  targetInst,
144
- details.guid,
145
- details.config,
146
- details.animElement,
145
+ config.guid,
146
+ config.animElement,
147
147
  result.maskElement
148
148
  );
149
149
  }
150
150
  }
151
- if (typeof details.config.mask.clickCallBack === "function") {
152
- details.config.mask.clickCallBack(originalRun, details.config);
151
+ if (typeof config.config.mask.clickCallBack === "function") {
152
+ config.config.mask.clickCallBack(originalRun, config.config);
153
153
  } else {
154
154
  originalRun();
155
155
  }
156
156
  return false;
157
157
  }
158
158
  // 判断是否启用了遮罩层点击动作
159
- if (details.config.mask.clickEvent!.toClose || details.config.mask.clickEvent!.toHide) {
159
+ if (config.config.mask.clickEvent!.toClose || config.config.mask.clickEvent!.toHide) {
160
160
  /**
161
161
  * 判断点击的元素是否是动画层的元素
162
162
  * @param element
@@ -171,12 +171,12 @@ export const PopsHandler = {
171
171
  );
172
172
  }
173
173
  /* 判断按下的元素是否是pops-anim */
174
- popsDOMUtils.on(details.animElement, ["touchstart", "mousedown"], void 0, (event) => {
174
+ popsDOMUtils.on(config.animElement, ["touchstart", "mousedown"], void 0, (event) => {
175
175
  const $click = event.composedPath()[0] as HTMLElement;
176
176
  isMaskClick = isAnimElement($click);
177
177
  });
178
178
  /* 如果有动画层,在动画层上监听点击事件 */
179
- popsDOMUtils.on<MouseEvent | PointerEvent>(details.animElement, "click", void 0, (event) => {
179
+ popsDOMUtils.on<MouseEvent | PointerEvent>(config.animElement, "click", void 0, (event) => {
180
180
  const $click = event.composedPath()[0] as HTMLElement;
181
181
  if (isAnimElement($click) && isMaskClick) {
182
182
  return clickEvent(event);
@@ -344,19 +344,12 @@ export const PopsHandler = {
344
344
  * @param $shadowContainer
345
345
  * @param $shadowRoot
346
346
  * @param mode 当前弹窗类型
347
- * @param animElement 动画层
348
- * @param popsElement 主元素
349
- * @param maskElement 遮罩层
347
+ * @param $anim 动画层
348
+ * @param $pops 主元素
349
+ * @param $mask 遮罩层
350
350
  * @param config 当前配置
351
351
  */
352
- handleEventDetails(
353
- guid: string,
354
- $shadowContainer: HTMLDivElement,
355
- $shadowRoot: ShadowRoot | HTMLElement,
356
- mode: PopsInstStoreType,
357
- animElement: HTMLDivElement,
358
- popsElement: HTMLDivElement,
359
- maskElement: HTMLDivElement,
352
+ handleEventConfig(
360
353
  config:
361
354
  | PopsAlertDetails
362
355
  | PopsDrawerDetails
@@ -365,25 +358,32 @@ export const PopsHandler = {
365
358
  | PopsIframeDetails
366
359
  | PopsLoadingDetails
367
360
  | PopsPanelDetails
368
- | PopsFolderDetails
369
- ): PopsEventDetails {
361
+ | PopsFolderDetails,
362
+ guid: string,
363
+ $shadowContainer: HTMLDivElement,
364
+ $shadowRoot: ShadowRoot | HTMLElement,
365
+ mode: PopsInstStoreType,
366
+ $anim: HTMLDivElement,
367
+ $pops: HTMLDivElement,
368
+ $mask?: HTMLDivElement
369
+ ): PopsEventConfig {
370
370
  return {
371
371
  $shadowContainer: $shadowContainer,
372
372
  $shadowRoot: $shadowRoot,
373
- element: animElement,
374
- animElement: animElement,
375
- popsElement: popsElement,
376
- maskElement: maskElement,
373
+ $el: $anim,
374
+ $anim: $anim,
375
+ $pops: $pops,
376
+ $mask: $mask,
377
377
  mode: mode,
378
378
  guid: guid,
379
379
  close() {
380
- return PopsInstanceUtils.close(mode, PopsInstData[mode], guid, config, animElement);
380
+ return PopsInstanceUtils.close(config, mode, PopsInstData[mode], guid, $anim);
381
381
  },
382
382
  hide() {
383
- return PopsInstanceUtils.hide(mode, PopsInstData[mode], guid, config, animElement, maskElement);
383
+ return PopsInstanceUtils.hide(config, mode, PopsInstData[mode], guid, $anim, $mask);
384
384
  },
385
385
  show() {
386
- return PopsInstanceUtils.show(mode, PopsInstData[mode], guid, config, animElement, maskElement);
386
+ return PopsInstanceUtils.show(config, mode, PopsInstData[mode], guid, $anim, $mask);
387
387
  },
388
388
  };
389
389
  },
@@ -391,17 +391,12 @@ export const PopsHandler = {
391
391
  * 获取loading的事件配置
392
392
  * @param guid
393
393
  * @param mode 当前弹窗类型
394
- * @param animElement 动画层
395
- * @param popsElement 主元素
396
- * @param maskElement 遮罩层
394
+ * @param $anim 动画层
395
+ * @param $pops 主元素
396
+ * @param $mask 遮罩层
397
397
  * @param config 当前配置
398
398
  */
399
- handleLoadingEventDetails(
400
- guid: string,
401
- mode: "loading",
402
- animElement: HTMLDivElement,
403
- popsElement: HTMLDivElement,
404
- maskElement: HTMLDivElement,
399
+ handleLoadingEventConfig(
405
400
  config:
406
401
  | PopsAlertDetails
407
402
  | PopsDrawerDetails
@@ -410,31 +405,37 @@ export const PopsHandler = {
410
405
  | PopsIframeDetails
411
406
  | PopsLoadingDetails
412
407
  | PopsPanelDetails
413
- | PopsFolderDetails
414
- ): Omit<PopsEventDetails, "$shadowContainer" | "$shadowRoot"> {
408
+ | PopsFolderDetails,
409
+ guid: string,
410
+ mode: "loading",
411
+ $anim: HTMLDivElement,
412
+ $pops: HTMLDivElement,
413
+ $mask?: HTMLDivElement
414
+ ): Omit<PopsEventConfig, "$shadowContainer" | "$shadowRoot"> {
415
415
  return {
416
- element: animElement,
417
- animElement: animElement,
418
- popsElement: popsElement,
419
- maskElement: maskElement,
416
+ $el: $anim,
417
+ $anim: $anim,
418
+ $pops: $pops,
419
+ $mask: $mask,
420
420
  mode: mode,
421
421
  guid: guid,
422
422
  close() {
423
- return PopsInstanceUtils.close(mode, PopsInstData[mode], guid, config, animElement);
423
+ return PopsInstanceUtils.close(config, mode, PopsInstData[mode], guid, $anim);
424
424
  },
425
425
  hide() {
426
- return PopsInstanceUtils.hide(mode, PopsInstData[mode], guid, config, animElement, maskElement);
426
+ return PopsInstanceUtils.hide(config, mode, PopsInstData[mode], guid, $anim, $mask);
427
427
  },
428
428
  show() {
429
- return PopsInstanceUtils.show(mode, PopsInstData[mode], guid, config, animElement, maskElement);
429
+ return PopsInstanceUtils.show(config, mode, PopsInstData[mode], guid, $anim, $mask);
430
430
  },
431
431
  };
432
432
  },
433
433
  /**
434
- * 处理返回的配置,针对popsHandler.handleEventDetails
434
+ * 处理返回的配置,针对popsHandler.handleEventConfig
435
+ * @param config 配置
435
436
  */
436
- handleResultDetails<T>(details: T): Omit<T, "type" | "function"> {
437
- const resultDetails = Object.assign({}, details);
437
+ handleResultConfig<T>(config: T): Omit<T, "type" | "function"> {
438
+ const resultDetails = Object.assign({}, config);
438
439
  popsUtils.delete(resultDetails, "type");
439
440
  popsUtils.delete(resultDetails, "function");
440
441
  return resultDetails;
@@ -443,15 +444,16 @@ export const PopsHandler = {
443
444
  * 处理点击事件
444
445
  * @param type 当前按钮类型
445
446
  * @param $btn 按钮元素
446
- * @param eventDetails 事件配置,由popsHandler.handleEventDetails创建的
447
+ * @param eventConfig 事件配置,由popsHandler.handleEventConfig创建的
447
448
  * @param callback 点击回调
448
449
  */
449
450
  handleClickEvent(
450
- type: "cancel" | "close" | "ok" | "other",
451
+ type: PopsHandlerEventConfig["type"],
451
452
  $btn: HTMLElement,
452
- eventDetails: PopsEventDetails,
453
- callback: (details: PopsHandlerEventDetails, event: PointerEvent | MouseEvent) => void
453
+ eventConfig: PopsEventConfig,
454
+ callback?: (details: PopsHandlerEventConfig, event: PointerEvent | MouseEvent) => void
454
455
  ) {
456
+ if (typeof callback !== "function") return;
455
457
  popsDOMUtils.on<PointerEvent | MouseEvent>(
456
458
  $btn,
457
459
  "click",
@@ -459,7 +461,7 @@ export const PopsHandler = {
459
461
  const extraParam = {
460
462
  type: type,
461
463
  };
462
- callback(Object.assign(eventDetails, extraParam), event);
464
+ callback(Object.assign(eventConfig, extraParam), event);
463
465
  },
464
466
  {
465
467
  capture: true,
@@ -510,16 +512,16 @@ export const PopsHandler = {
510
512
  * @param type 触发事件类型
511
513
  * @param inputElement 输入框
512
514
  * @param $btn 按钮元素
513
- * @param eventDetails 事件配置,由popsHandler.handleEventDetails创建的
515
+ * @param eventConfig 事件配置,由popsHandler.handleEventConfig创建的
514
516
  * @param callback 点击回调
515
517
  */
516
518
  handlePromptClickEvent(
517
- type: "ok" | "close" | "cancel" | "other",
519
+ type: PopsHandlerEventConfig["type"],
518
520
  inputElement: HTMLInputElement | HTMLTextAreaElement,
519
521
  $btn: HTMLElement,
520
- eventDetails: PopsEventDetails,
522
+ eventConfig: PopsEventConfig,
521
523
  callback: (
522
- details: PopsEventDetails & {
524
+ details: PopsEventConfig & {
523
525
  type: any;
524
526
  text: string;
525
527
  },
@@ -535,7 +537,7 @@ export const PopsHandler = {
535
537
  type: type,
536
538
  text: inputElement.value,
537
539
  };
538
- callback(Object.assign(eventDetails, extraParam), event);
540
+ callback(Object.assign(eventConfig, extraParam), event);
539
541
  },
540
542
  {
541
543
  capture: true,
@@ -1,4 +1,4 @@
1
- import type { PopsEventDetails, PopsHandlerEventDetails } from "./event";
1
+ import type { PopsEventConfig, PopsHandlerEventConfig } from "./event";
2
2
  import type { PopsIconType } from "./icon";
3
3
  import type { PopsType } from "./main";
4
4
 
@@ -110,7 +110,7 @@ export interface PopsButtonDetails<T = object> {
110
110
  *
111
111
  * 如果传入该值,那么将不会自动关闭弹窗
112
112
  */
113
- callback(eventDetails: PopsHandlerEventDetails & T, event: PointerEvent | MouseEvent): void;
113
+ callback(eventConfig: PopsHandlerEventConfig & T, event: PointerEvent | MouseEvent): void;
114
114
  }
115
115
 
116
116
  /**
@@ -127,7 +127,7 @@ export type PopsButtonDetailsAnyType<T = object> = Omit<PopsButtonDetails<T>, "t
127
127
  /** prompt的点击回调 */
128
128
  export interface PopsPromptButtonDetails extends PopsButtonDetails {
129
129
  callback(
130
- eventDetails: PopsHandlerEventDetails & {
130
+ eventConfig: PopsHandlerEventConfig & {
131
131
  text: string;
132
132
  },
133
133
  event: PointerEvent | MouseEvent
@@ -183,5 +183,5 @@ export interface PopsHeaderCloseButtonDetails {
183
183
  *
184
184
  * 如果传入该值,那么将不会自动关闭弹窗
185
185
  */
186
- callback?: (details: PopsEventDetails, event: PointerEvent | MouseEvent) => void;
186
+ callback?: (details: PopsEventConfig, event: PointerEvent | MouseEvent) => void;
187
187
  }
@@ -4,7 +4,7 @@ import type { PopsType } from "./main";
4
4
  /**
5
5
  * 事件配置
6
6
  */
7
- export interface PopsIframeEventDetails {
7
+ export interface PopsIframeEventConfig {
8
8
  /**
9
9
  * 唯一id
10
10
  */
@@ -33,19 +33,19 @@ export interface PopsIframeEventDetails {
33
33
  /**
34
34
  * 事件配置
35
35
  */
36
- export interface PopsEventDetails {
36
+ export interface PopsEventConfig {
37
37
  /** 最外层包裹的元素 */
38
38
  $shadowContainer: HTMLDivElement;
39
39
  /** ShadowRoot */
40
40
  $shadowRoot: ShadowRoot | HTMLElement;
41
41
  /** -> 动画层 */
42
- element: HTMLDivElement;
42
+ $el: HTMLDivElement;
43
43
  /** 动画层 */
44
- animElement: HTMLDivElement;
44
+ $anim: HTMLDivElement;
45
45
  /** 主元素 */
46
- popsElement: HTMLDivElement;
46
+ $pops: HTMLDivElement;
47
47
  /** 遮罩层 */
48
- maskElement?: HTMLDivElement;
48
+ $mask?: HTMLDivElement;
49
49
  /** 当前弹窗类型 */
50
50
  mode: PopsType;
51
51
  guid: string;
@@ -57,7 +57,7 @@ export interface PopsEventDetails {
57
57
  /**
58
58
  * 处理过的事件配置
59
59
  */
60
- export interface PopsHandlerEventDetails extends PopsEventDetails {
60
+ export interface PopsHandlerEventConfig extends PopsEventConfig {
61
61
  /** 当前按钮类型 */
62
62
  type: "cancel" | "close" | "ok" | "other";
63
63
  }
@@ -217,13 +217,10 @@ export const PopsInstanceUtils = {
217
217
  * @param instConfigList
218
218
  * @param guid
219
219
  * @param config
220
- * @param animElement
221
- * @param maskElement
220
+ * @param $anim
221
+ * @param $mask
222
222
  */
223
223
  hide(
224
- popsType: PopsInstStoreType,
225
- instConfigList: PopsInstCommonConfig[],
226
- guid: string,
227
224
  config:
228
225
  | PopsAlertDetails
229
226
  | PopsDrawerDetails
@@ -233,15 +230,20 @@ export const PopsInstanceUtils = {
233
230
  | PopsLoadingDetails
234
231
  | PopsPanelDetails
235
232
  | PopsFolderDetails,
236
- animElement: HTMLElement,
237
- maskElement: HTMLElement
233
+ popsType: PopsInstStoreType,
234
+ instConfigList: PopsInstCommonConfig[],
235
+ guid: string,
236
+ $anim: HTMLElement,
237
+ $mask?: HTMLElement
238
238
  ) {
239
239
  return new Promise<void>((resolve) => {
240
- const popsElement = animElement.querySelector<HTMLDivElement>(".pops[type-value]")!;
240
+ const popsElement = $anim.querySelector<HTMLDivElement>(".pops[type-value]")!;
241
241
  if (popsType === "drawer") {
242
242
  const drawerConfig = config as Required<PopsDrawerDetails>;
243
243
  popsUtils.setTimeout(() => {
244
- maskElement.style.setProperty("display", "none");
244
+ if ($mask) {
245
+ popsDOMUtils.css($mask, "display", "none");
246
+ }
245
247
  if (["top", "bottom"].includes(drawerConfig.direction)) {
246
248
  popsElement.style.setProperty("height", "0");
247
249
  } else if (["left", "right"].includes(drawerConfig.direction)) {
@@ -303,13 +305,10 @@ export const PopsInstanceUtils = {
303
305
  * @param instConfigList
304
306
  * @param guid
305
307
  * @param config
306
- * @param animElement
307
- * @param maskElement
308
+ * @param $anim
309
+ * @param $mask
308
310
  */
309
311
  show(
310
- popsType: PopsInstStoreType,
311
- instConfigList: PopsInstCommonConfig[],
312
- guid: string,
313
312
  config:
314
313
  | PopsAlertDetails
315
314
  | PopsDrawerDetails
@@ -319,15 +318,20 @@ export const PopsInstanceUtils = {
319
318
  | PopsLoadingDetails
320
319
  | PopsPanelDetails
321
320
  | PopsFolderDetails,
322
- animElement: HTMLElement,
323
- maskElement?: HTMLElement
321
+ popsType: PopsInstStoreType,
322
+ instConfigList: PopsInstCommonConfig[],
323
+ guid: string,
324
+ $anim: HTMLElement,
325
+ $mask?: HTMLElement
324
326
  ) {
325
327
  return new Promise<void>((resolve) => {
326
- const popsElement = animElement.querySelector<HTMLDivElement>(".pops[type-value]")!;
328
+ const popsElement = $anim.querySelector<HTMLDivElement>(".pops[type-value]")!;
327
329
  if (popsType === "drawer") {
328
330
  const drawerConfig = config as PopsDrawerDetails;
329
331
  popsUtils.setTimeout(() => {
330
- popsDOMUtils.css(maskElement!, "display", "");
332
+ if ($mask) {
333
+ popsDOMUtils.css($mask, "display", "");
334
+ }
331
335
  const direction = drawerConfig.direction!;
332
336
  const size = drawerConfig.size!.toString();
333
337
  if (["top", "bottom"].includes(direction)) {
@@ -389,12 +393,9 @@ export const PopsInstanceUtils = {
389
393
  * @param instConfigList
390
394
  * @param guid
391
395
  * @param config
392
- * @param animElement
396
+ * @param $anim
393
397
  */
394
398
  close(
395
- popsType: string,
396
- instConfigList: PopsInstCommonConfig[],
397
- guid: string,
398
399
  config:
399
400
  | PopsAlertDetails
400
401
  | PopsDrawerDetails
@@ -404,10 +405,13 @@ export const PopsInstanceUtils = {
404
405
  | PopsLoadingDetails
405
406
  | PopsPanelDetails
406
407
  | PopsFolderDetails,
407
- animElement: HTMLElement
408
+ popsType: string,
409
+ instConfigList: PopsInstCommonConfig[],
410
+ guid: string,
411
+ $anim: HTMLElement
408
412
  ) {
409
413
  return new Promise<void>((resolve) => {
410
- const popsElement = animElement.querySelector<HTMLDivElement>(".pops[type-value]")!;
414
+ const popsElement = $anim.querySelector<HTMLDivElement>(".pops[type-value]")!;
411
415
  const drawerConfig = config as Required<PopsDrawerDetails>;
412
416
  /**
413
417
  * 动画结束事件