@whitesev/pops 2.2.1 → 2.2.3

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 (44) hide show
  1. package/dist/index.amd.js +275 -263
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +275 -263
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +275 -263
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +275 -263
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +275 -263
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +275 -263
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/Pops.d.ts +1 -1
  14. package/dist/types/src/components/panel/index.d.ts +2 -1
  15. package/dist/types/src/components/panel/types/components-input.d.ts +9 -1
  16. package/dist/types/src/components/panel/types/components-select.d.ts +6 -1
  17. package/dist/types/src/components/panel/types/components-switch.d.ts +6 -1
  18. package/dist/types/src/components/panel/types/components-textarea.d.ts +8 -2
  19. package/dist/types/src/components/searchSuggestion/index.d.ts +1 -1
  20. package/dist/types/src/handler/PopsElementHandler.d.ts +6 -6
  21. package/dist/types/src/handler/PopsHandler.d.ts +3 -3
  22. package/dist/types/src/types/components.d.ts +5 -5
  23. package/dist/types/src/types/main.d.ts +34 -31
  24. package/package.json +1 -1
  25. package/src/Pops.ts +1 -1
  26. package/src/components/alert/index.ts +15 -15
  27. package/src/components/confirm/index.ts +16 -15
  28. package/src/components/drawer/index.ts +16 -15
  29. package/src/components/folder/index.ts +141 -152
  30. package/src/components/iframe/index.ts +14 -13
  31. package/src/components/panel/handlerComponents.ts +25 -6
  32. package/src/components/panel/index.ts +19 -18
  33. package/src/components/panel/types/components-input.ts +9 -1
  34. package/src/components/panel/types/components-select.ts +6 -1
  35. package/src/components/panel/types/components-switch.ts +6 -1
  36. package/src/components/panel/types/components-textarea.ts +8 -2
  37. package/src/components/prompt/index.ts +15 -14
  38. package/src/components/rightClickMenu/index.ts +17 -16
  39. package/src/components/searchSuggestion/index.ts +21 -20
  40. package/src/components/tooltip/index.ts +3 -2
  41. package/src/handler/PopsElementHandler.ts +18 -18
  42. package/src/handler/PopsHandler.ts +13 -7
  43. package/src/types/components.d.ts +5 -5
  44. package/src/types/main.d.ts +34 -31
package/dist/index.cjs.js CHANGED
@@ -3948,6 +3948,10 @@ const PopsHandler = {
3948
3948
  */
3949
3949
  handleOnly(type, config) {
3950
3950
  if (config.only) {
3951
+ // .loading
3952
+ // .tooltip
3953
+ // .rightClickMenu
3954
+ // 单独处理
3951
3955
  if (type === "loading" ||
3952
3956
  type === "tooltip" ||
3953
3957
  type === "rightClickMenu") {
@@ -4054,11 +4058,11 @@ const PopsAlert = {
4054
4058
  init(details) {
4055
4059
  const guid = popsUtils.getRandomGUID();
4056
4060
  // 设置当前类型
4057
- const PopsType = "alert";
4061
+ const popsType = "alert";
4058
4062
  let config = PopsAlertConfig();
4059
4063
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4060
4064
  config = popsUtils.assign(config, details);
4061
- config = PopsHandler.handleOnly(PopsType, config);
4065
+ config = PopsHandler.handleOnly(popsType, config);
4062
4066
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
4063
4067
  PopsHandler.handleInit($shadowRoot, [
4064
4068
  {
@@ -4093,23 +4097,23 @@ const PopsAlert = {
4093
4097
  // 先把z-index提取出来
4094
4098
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
4095
4099
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
4096
- let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
4097
- let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
4098
- let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
4099
- let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
4100
- let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
4100
+ let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
4101
+ let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(popsType, config);
4102
+ let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
4103
+ let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(popsType, config);
4104
+ let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
4101
4105
  /*html*/ `
4102
- <div class="pops-title pops-${PopsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
4106
+ <div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
4103
4107
  ? config.title.text
4104
- : `<p pops class="pops-${PopsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
4105
- <div class="pops-content pops-${PopsType}-content" style="${contentStyle}">${config.content.html
4108
+ : `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
4109
+ <div class="pops-content pops-${popsType}-content" style="${contentStyle}">${config.content.html
4106
4110
  ? config.content.text
4107
- : `<p pops class="pops-${PopsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
4111
+ : `<p pops class="pops-${popsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
4108
4112
  /**
4109
4113
  * 弹窗的主元素,包括动画层
4110
4114
  */
4111
4115
  let $anim = PopsElementHandler.parseElement(animHTML);
4112
- let { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, btnOkElement, titleElement: $title, } = PopsHandler.handleQueryElement($anim, PopsType);
4116
+ let { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, btnOkElement, titleElement: $title, } = PopsHandler.handleQueryElement($anim, popsType);
4113
4117
  /** 遮罩层元素 */
4114
4118
  let $mask = null;
4115
4119
  /** 已创建的元素列表 */
@@ -4117,7 +4121,7 @@ const PopsAlert = {
4117
4121
  /* 遮罩层元素 */
4118
4122
  if (config.mask.enable) {
4119
4123
  let _handleMask_ = PopsHandler.handleMask({
4120
- type: PopsType,
4124
+ type: popsType,
4121
4125
  guid: guid,
4122
4126
  config: config,
4123
4127
  animElement: $anim,
@@ -4127,7 +4131,7 @@ const PopsAlert = {
4127
4131
  elementList.push($mask);
4128
4132
  }
4129
4133
  /* 处理返回的配置 */
4130
- let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, PopsType, $anim, $pops, $mask, config);
4134
+ let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
4131
4135
  /* 为顶部右边的关闭按钮添加点击事件 */
4132
4136
  PopsHandler.handleClickEvent("close", $headerCloseBtn, eventDetails, config.btn.close.callback);
4133
4137
  /* 为底部ok按钮添加点击事件 */
@@ -4143,7 +4147,7 @@ const PopsAlert = {
4143
4147
  $anim.after($mask);
4144
4148
  }
4145
4149
  /* 保存 */
4146
- PopsHandler.handlePush(PopsType, {
4150
+ PopsHandler.handlePush(popsType, {
4147
4151
  guid: guid,
4148
4152
  animElement: $anim,
4149
4153
  popsElement: $pops,
@@ -4258,11 +4262,11 @@ const PopsConfirm = {
4258
4262
  init(details) {
4259
4263
  const guid = popsUtils.getRandomGUID();
4260
4264
  // 设置当前类型
4261
- const PopsType = "confirm";
4265
+ const popsType = "confirm";
4262
4266
  let config = PopsConfirmConfig();
4263
4267
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4264
4268
  config = popsUtils.assign(config, details);
4265
- config = PopsHandler.handleOnly(PopsType, config);
4269
+ config = PopsHandler.handleOnly(popsType, config);
4266
4270
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
4267
4271
  PopsHandler.handleInit($shadowRoot, [
4268
4272
  {
@@ -4297,23 +4301,23 @@ const PopsConfirm = {
4297
4301
  // 先把z-index提取出来
4298
4302
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
4299
4303
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
4300
- let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
4301
- let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
4302
- let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
4303
- let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
4304
- let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
4304
+ let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
4305
+ let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(popsType, config);
4306
+ let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
4307
+ let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(popsType, config);
4308
+ let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
4305
4309
  /*html*/ `
4306
- <div class="pops-title pops-${PopsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
4310
+ <div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
4307
4311
  ? config.title.text
4308
- : `<p pops class="pops-${PopsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
4309
- <div class="pops-content pops-${PopsType}-content" style="${contentStyle}">${config.content.html
4312
+ : `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
4313
+ <div class="pops-content pops-${popsType}-content" style="${contentStyle}">${config.content.html
4310
4314
  ? config.content.text
4311
- : `<p pops class="pops-${PopsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
4315
+ : `<p pops class="pops-${popsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
4312
4316
  /**
4313
4317
  * 弹窗的主元素,包括动画层
4314
4318
  */
4315
4319
  let $anim = PopsElementHandler.parseElement(animHTML);
4316
- let { popsElement: $pops, titleElement: $title, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, } = PopsHandler.handleQueryElement($anim, PopsType);
4320
+ let { popsElement: $pops, titleElement: $title, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, } = PopsHandler.handleQueryElement($anim, popsType);
4317
4321
  /**
4318
4322
  * 遮罩层元素
4319
4323
  */
@@ -4325,7 +4329,7 @@ const PopsConfirm = {
4325
4329
  if (config.mask.enable) {
4326
4330
  // 启用遮罩层
4327
4331
  let _handleMask_ = PopsHandler.handleMask({
4328
- type: PopsType,
4332
+ type: popsType,
4329
4333
  guid: guid,
4330
4334
  config: config,
4331
4335
  animElement: $anim,
@@ -4334,7 +4338,7 @@ const PopsConfirm = {
4334
4338
  $mask = _handleMask_.maskElement;
4335
4339
  elementList.push($mask);
4336
4340
  }
4337
- let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, PopsType, $anim, $pops, $mask, config);
4341
+ let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
4338
4342
  PopsHandler.handleClickEvent("close", $btnClose, eventDetails, config.btn.close.callback);
4339
4343
  PopsHandler.handleClickEvent("ok", $btnOk, eventDetails, config.btn.ok.callback);
4340
4344
  PopsHandler.handleClickEvent("cancel", $btnCancel, eventDetails, config.btn.cancel.callback);
@@ -4348,7 +4352,7 @@ const PopsConfirm = {
4348
4352
  if ($mask != null) {
4349
4353
  $anim.after($mask);
4350
4354
  }
4351
- PopsHandler.handlePush(PopsType, {
4355
+ PopsHandler.handlePush(popsType, {
4352
4356
  guid: guid,
4353
4357
  animElement: $anim,
4354
4358
  popsElement: $pops,
@@ -4467,11 +4471,11 @@ const PopsPrompt = {
4467
4471
  init(details) {
4468
4472
  const guid = popsUtils.getRandomGUID();
4469
4473
  // 设置当前类型
4470
- const PopsType = "prompt";
4474
+ const popsType = "prompt";
4471
4475
  let config = PopsPromptConfig();
4472
4476
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4473
4477
  config = popsUtils.assign(config, details);
4474
- config = PopsHandler.handleOnly(PopsType, config);
4478
+ config = PopsHandler.handleOnly(popsType, config);
4475
4479
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
4476
4480
  PopsHandler.handleInit($shadowRoot, [
4477
4481
  {
@@ -4506,16 +4510,16 @@ const PopsPrompt = {
4506
4510
  // 先把z-index提取出来
4507
4511
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
4508
4512
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
4509
- let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
4510
- let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
4511
- let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
4512
- let { contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
4513
- let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
4513
+ let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
4514
+ let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(popsType, config);
4515
+ let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
4516
+ let { contentPStyle } = PopsElementHandler.getContentStyle(popsType, config);
4517
+ let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
4514
4518
  /*html*/ `
4515
- <div class="pops-title pops-${PopsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
4519
+ <div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
4516
4520
  ? config.title.text
4517
- : `<p pops class="pops-${PopsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
4518
- <div class="pops-content pops-${PopsType}-content" style="${contentPStyle}">${config.content.row
4521
+ : `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
4522
+ <div class="pops-content pops-${popsType}-content" style="${contentPStyle}">${config.content.row
4519
4523
  ? '<textarea name="pops-input-text" pops="" placeholder="' +
4520
4524
  config.content.placeholder +
4521
4525
  '"></textarea>'
@@ -4528,7 +4532,7 @@ const PopsPrompt = {
4528
4532
  * 弹窗的主元素,包括动画层
4529
4533
  */
4530
4534
  let $anim = PopsElementHandler.parseElement(animHTML);
4531
- let { popsElement: $pops, inputElement: $input, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, titleElement: $title, } = PopsHandler.handleQueryElement($anim, PopsType);
4535
+ let { popsElement: $pops, inputElement: $input, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, titleElement: $title, } = PopsHandler.handleQueryElement($anim, popsType);
4532
4536
  /**
4533
4537
  * 遮罩层元素
4534
4538
  */
@@ -4540,7 +4544,7 @@ const PopsPrompt = {
4540
4544
  if (config.mask.enable) {
4541
4545
  // 启用遮罩层
4542
4546
  let _handleMask_ = PopsHandler.handleMask({
4543
- type: PopsType,
4547
+ type: popsType,
4544
4548
  guid: guid,
4545
4549
  config: config,
4546
4550
  animElement: $anim,
@@ -4549,7 +4553,7 @@ const PopsPrompt = {
4549
4553
  $mask = _handleMask_.maskElement;
4550
4554
  elementList.push($mask);
4551
4555
  }
4552
- let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, PopsType, $anim, $pops, $mask, config);
4556
+ let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
4553
4557
  /* 输入框赋值初始值 */
4554
4558
  $input.value = config.content.text;
4555
4559
  PopsHandler.handlePromptClickEvent("close", $input, $btnClose, eventDetails, config.btn.close.callback);
@@ -4565,7 +4569,7 @@ const PopsPrompt = {
4565
4569
  if ($mask != null) {
4566
4570
  $anim.after($mask);
4567
4571
  }
4568
- PopsHandler.handlePush(PopsType, {
4572
+ PopsHandler.handlePush(popsType, {
4569
4573
  guid: guid,
4570
4574
  animElement: $anim,
4571
4575
  popsElement: $pops,
@@ -4760,14 +4764,14 @@ const PopsIframe = {
4760
4764
  init(details) {
4761
4765
  const guid = popsUtils.getRandomGUID();
4762
4766
  // 设置当前类型
4763
- const PopsType = "iframe";
4767
+ const popsType = "iframe";
4764
4768
  let config = PopsIframeConfig();
4765
4769
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
4766
4770
  config = popsUtils.assign(config, details);
4767
4771
  if (config.url == null) {
4768
4772
  throw new Error("config.url不能为空");
4769
4773
  }
4770
- config = PopsHandler.handleOnly(PopsType, config);
4774
+ config = PopsHandler.handleOnly(popsType, config);
4771
4775
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
4772
4776
  PopsHandler.handleInit($shadowRoot, [
4773
4777
  {
@@ -4803,17 +4807,17 @@ const PopsIframe = {
4803
4807
  // 先把z-index提取出来
4804
4808
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
4805
4809
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex, maskExtraStyle);
4806
- let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
4810
+ let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
4807
4811
  let iframeLoadingHTML = '<div class="pops-loading"></div>';
4808
4812
  let titleText = config.title.text.trim() !== "" ? config.title.text : config.url;
4809
- let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
4810
- let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
4813
+ let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
4814
+ let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
4811
4815
  /*html*/ `
4812
- <div class="pops-title pops-${PopsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
4816
+ <div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
4813
4817
  ? titleText
4814
- : `<p pops class="pops-${PopsType}-title-text" style="${headerPStyle}">${titleText}</p>`}${headerBtnHTML}</div>
4815
- <div class="pops-content pops-${PopsType}-content">
4816
- <div class="pops-${PopsType}-content-global-loading"></div>
4818
+ : `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${titleText}</p>`}${headerBtnHTML}</div>
4819
+ <div class="pops-content pops-${popsType}-content">
4820
+ <div class="pops-${popsType}-content-global-loading"></div>
4817
4821
  <iframe src="${config.url}" pops ${config.sandbox
4818
4822
  ? "sandbox='allow-forms allow-same-origin allow-scripts'"
4819
4823
  : ""}>
@@ -4823,7 +4827,7 @@ const PopsIframe = {
4823
4827
  * 弹窗的主元素,包括动画层
4824
4828
  */
4825
4829
  let $anim = PopsElementHandler.parseElement(animHTML);
4826
- let { popsElement: $pops, headerCloseBtnElement, headerControlsElement, titleElement: $title, iframeElement: $iframe, loadingElement, contentLoadingElement: $contentLoading, headerMinBtnElement, headerMaxBtnElement, headerMiseBtnElement, } = PopsHandler.handleQueryElement($anim, PopsType);
4830
+ let { popsElement: $pops, headerCloseBtnElement, headerControlsElement, titleElement: $title, iframeElement: $iframe, loadingElement, contentLoadingElement: $contentLoading, headerMinBtnElement, headerMaxBtnElement, headerMiseBtnElement, } = PopsHandler.handleQueryElement($anim, popsType);
4827
4831
  let $iframeContainer = PopsCore.document.querySelector(".pops-iframe-container");
4828
4832
  if (!$iframeContainer) {
4829
4833
  $iframeContainer = PopsCore.document.createElement("div");
@@ -4842,7 +4846,7 @@ const PopsIframe = {
4842
4846
  let elementList = [$anim];
4843
4847
  if (config.mask.enable) {
4844
4848
  let _handleMask_ = PopsHandler.handleMask({
4845
- type: PopsType,
4849
+ type: popsType,
4846
4850
  guid: guid,
4847
4851
  config: config,
4848
4852
  animElement: $anim,
@@ -4851,7 +4855,7 @@ const PopsIframe = {
4851
4855
  $mask = _handleMask_.maskElement;
4852
4856
  elementList.push($mask);
4853
4857
  }
4854
- let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, PopsType, $anim, $pops, $mask, config);
4858
+ let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
4855
4859
  eventDetails["iframeElement"] = $iframe;
4856
4860
  popsDOMUtils.on($anim, popsDOMUtils.getAnimationEndNameList(), function () {
4857
4861
  /* 动画加载完毕 */
@@ -4995,7 +4999,7 @@ const PopsIframe = {
4995
4999
  }, {
4996
5000
  capture: true,
4997
5001
  });
4998
- PopsHandler.handlePush(PopsType, {
5002
+ PopsHandler.handlePush(popsType, {
4999
5003
  guid: guid,
5000
5004
  animElement: $anim,
5001
5005
  popsElement: $pops,
@@ -5099,11 +5103,11 @@ const PopsDrawer = {
5099
5103
  init(details) {
5100
5104
  const guid = popsUtils.getRandomGUID();
5101
5105
  // 设置当前类型
5102
- const PopsType = "drawer";
5106
+ const popsType = "drawer";
5103
5107
  let config = PopsDrawerConfig();
5104
5108
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
5105
5109
  config = popsUtils.assign(config, details);
5106
- config = PopsHandler.handleOnly(PopsType, config);
5110
+ config = PopsHandler.handleOnly(popsType, config);
5107
5111
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
5108
5112
  PopsHandler.handleInit($shadowRoot, [
5109
5113
  {
@@ -5138,25 +5142,25 @@ const PopsDrawer = {
5138
5142
  // 先把z-index提取出来
5139
5143
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
5140
5144
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
5141
- let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
5142
- let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
5143
- let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
5144
- let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
5145
- let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
5145
+ let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
5146
+ let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(popsType, config);
5147
+ let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
5148
+ let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(popsType, config);
5149
+ let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
5146
5150
  /*html*/ `
5147
5151
  ${config.title.enable
5148
- ? /*html*/ `<div class="pops-title pops-${PopsType}-title" style="${headerStyle}">${config.title.html
5152
+ ? /*html*/ `<div class="pops-title pops-${popsType}-title" style="${headerStyle}">${config.title.html
5149
5153
  ? config.title.text
5150
- : /*html*/ `<p pops class="pops-${PopsType}-title-text" style="width: 100%;text-align: ${config.title.position};${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>`
5154
+ : /*html*/ `<p pops class="pops-${popsType}-title-text" style="width: 100%;text-align: ${config.title.position};${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>`
5151
5155
  : ""}
5152
- <div class="pops-content pops-${PopsType}-content" style="${contentStyle}">${config.content.html
5156
+ <div class="pops-content pops-${popsType}-content" style="${contentStyle}">${config.content.html
5153
5157
  ? config.content.text
5154
- : `<p pops class="pops-${PopsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
5158
+ : `<p pops class="pops-${popsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
5155
5159
  /**
5156
5160
  * 弹窗的主元素,包括动画层
5157
5161
  */
5158
5162
  let $anim = PopsElementHandler.parseElement(animHTML);
5159
- let { popsElement, headerCloseBtnElement, btnCancelElement, btnOkElement, btnOtherElement, } = PopsHandler.handleQueryElement($anim, PopsType);
5163
+ let { popsElement, headerCloseBtnElement, btnCancelElement, btnOkElement, btnOtherElement, } = PopsHandler.handleQueryElement($anim, popsType);
5160
5164
  let $pops = popsElement;
5161
5165
  let $headerCloseBtn = headerCloseBtnElement;
5162
5166
  let $btnCancel = btnCancelElement;
@@ -5172,7 +5176,7 @@ const PopsDrawer = {
5172
5176
  let elementList = [$anim];
5173
5177
  if (config.mask.enable) {
5174
5178
  let _handleMask_ = PopsHandler.handleMask({
5175
- type: PopsType,
5179
+ type: popsType,
5176
5180
  guid: guid,
5177
5181
  config: config,
5178
5182
  animElement: $anim,
@@ -5181,7 +5185,7 @@ const PopsDrawer = {
5181
5185
  $mask = _handleMask_.maskElement;
5182
5186
  elementList.push($mask);
5183
5187
  }
5184
- let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, PopsType, $anim, $pops, $mask, config);
5188
+ let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
5185
5189
  /* 处理方向 */
5186
5190
  $pops.setAttribute("direction", config.direction);
5187
5191
  /* 处理border-radius */
@@ -5269,7 +5273,7 @@ const PopsDrawer = {
5269
5273
  if ($mask != null) {
5270
5274
  $anim.after($mask);
5271
5275
  }
5272
- PopsHandler.handlePush(PopsType, {
5276
+ PopsHandler.handlePush(popsType, {
5273
5277
  guid: guid,
5274
5278
  animElement: $anim,
5275
5279
  popsElement: $pops,
@@ -5460,11 +5464,11 @@ const PopsFolder = {
5460
5464
  init(details) {
5461
5465
  const guid = popsUtils.getRandomGUID();
5462
5466
  // 设置当前类型
5463
- const PopsType = "folder";
5467
+ const popsType = "folder";
5464
5468
  let config = PopsFolderConfig();
5465
5469
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
5466
5470
  config = popsUtils.assign(config, details);
5467
- config = PopsHandler.handleOnly(PopsType, config);
5471
+ config = PopsHandler.handleOnly(popsType, config);
5468
5472
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
5469
5473
  PopsHandler.handleInit($shadowRoot, [
5470
5474
  {
@@ -5544,19 +5548,15 @@ const PopsFolder = {
5544
5548
  /* Android安装包 */
5545
5549
  let androidIconList = ["apk", "apkm", "xapk"];
5546
5550
  zipIconList.forEach((keyName) => {
5547
- // @ts-ignore
5548
5551
  Folder_ICON[keyName] = Folder_ICON.zip;
5549
5552
  });
5550
5553
  imageIconList.forEach((keyName) => {
5551
- // @ts-ignore
5552
5554
  Folder_ICON[keyName] = Folder_ICON.png;
5553
5555
  });
5554
5556
  codeLanguageIconList.forEach((keyName) => {
5555
- // @ts-ignore
5556
5557
  Folder_ICON[keyName] = Folder_ICON.html;
5557
5558
  });
5558
5559
  androidIconList.forEach((keyName) => {
5559
- // @ts-ignore
5560
5560
  Folder_ICON[keyName] = Folder_ICON.apk;
5561
5561
  });
5562
5562
  if (details?.folder) {
@@ -5566,108 +5566,105 @@ const PopsFolder = {
5566
5566
  // 先把z-index提取出来
5567
5567
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
5568
5568
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
5569
- let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
5570
- let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
5571
- let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
5572
- let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
5569
+ let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
5570
+ let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(popsType, config);
5571
+ let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
5572
+ let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
5573
5573
  /*html*/ `
5574
- <div class="pops-title pops-${PopsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
5574
+ <div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
5575
5575
  ? config.title.text
5576
- : `<p pops class="pops-${PopsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
5577
- <div class="pops-content pops-${PopsType}-content ${popsUtils.isPhone() ? "pops-mobile-folder-content" : ""}">
5576
+ : `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
5577
+ <div class="pops-content pops-${popsType}-content ${popsUtils.isPhone() ? "pops-mobile-folder-content" : ""}">
5578
5578
  <div class="pops-folder-list">
5579
5579
  <div class="pops-folder-file-list-breadcrumb">
5580
- <div class="pops-folder-file-list-breadcrumb-primary">
5581
- <span class="pops-folder-file-list-breadcrumb-allFiles cursor-p" title="全部文件">
5582
- <a>全部文件</a>
5583
- </span>
5584
- </div>
5580
+ <div class="pops-folder-file-list-breadcrumb-primary">
5581
+ <span class="pops-folder-file-list-breadcrumb-allFiles cursor-p" title="全部文件">
5582
+ <a>全部文件</a>
5583
+ </span>
5584
+ </div>
5585
5585
  </div>
5586
5586
  <div class="pops-folder-list-table__header-div">
5587
- <table class="pops-folder-list-table__header">
5588
- <colgroup>
5589
- <col width="52%">
5590
- <col width="24%">
5591
- <col width="16%">
5592
- </colgroup>
5593
- <thead>
5594
- <tr class="pops-folder-list-table__header-row">
5595
- <th class="pops-folder-list-table__header-th cursor-p">
5596
- <div class="text-ellip content flex-a-i-center">
5597
- <span>文件名</span>
5598
- <div class="pops-folder-list-table__sort" data-sort="fileName">
5599
- <div class="pops-folder-icon-arrow" data-sort="按文件名排序">
5600
- <svg
5601
- viewBox="0 0 1024 1024"
5602
- xmlns="http://www.w3.org/2000/svg">
5603
- <path
5604
- d="M509.624392 5.882457 57.127707 458.379143 962.121078 458.379143Z"
5605
- class="pops-folder-icon-arrow-up"></path>
5606
- <path
5607
- d="M509.624392 1024 962.121078 571.503314 57.127707 571.503314Z"
5608
- class="pops-folder-icon-arrow-down"></path>
5609
- </svg>
5610
- </div>
5611
- </div>
5612
- </div>
5613
- </th>
5614
- <th class="pops-folder-list-table__header-th cursor-p">
5615
- <div class="text-ellip content flex-a-i-center">
5616
- <span>修改时间</span>
5617
- <div class="pops-folder-list-table__sort" data-sort="latestTime">
5618
- <div class="pops-folder-icon-arrow" title="按修改时间排序">
5619
- <svg
5620
- viewBox="0 0 1024 1024"
5621
- xmlns="http://www.w3.org/2000/svg">
5622
- <path
5623
- d="M509.624392 5.882457 57.127707 458.379143 962.121078 458.379143Z"
5624
- class="pops-folder-icon-arrow-up"></path>
5625
- <path
5626
- d="M509.624392 1024 962.121078 571.503314 57.127707 571.503314Z"
5627
- class="pops-folder-icon-arrow-down"></path>
5628
- </svg>
5629
- </div>
5630
- </div>
5631
- </div>
5632
- </th>
5633
- <th class="pops-folder-list-table__header-th cursor-p">
5634
- <div class="text-ellip content flex-a-i-center">
5635
- <span>大小</span>
5636
- <div class="pops-folder-list-table__sort" data-sort="fileSize">
5637
- <div class="pops-folder-icon-arrow" title="按大小排序">
5638
- <svg
5639
- viewBox="0 0 1024 1024"
5640
- xmlns="http://www.w3.org/2000/svg">
5641
- <path
5642
- d="M509.624392 5.882457 57.127707 458.379143 962.121078 458.379143Z"
5643
- class="pops-folder-icon-arrow-up"></path>
5644
- <path
5645
- d="M509.624392 1024 962.121078 571.503314 57.127707 571.503314Z"
5646
- class="pops-folder-icon-arrow-down"></path>
5647
- </svg>
5648
- </div>
5649
- </div>
5650
- </div>
5651
- </th>
5652
- </tr>
5653
- </thead>
5654
- </table>
5587
+ <table class="pops-folder-list-table__header">
5588
+ <colgroup>
5589
+ <col width="52%">
5590
+ <col width="24%">
5591
+ <col width="16%">
5592
+ </colgroup>
5593
+ <thead>
5594
+ <tr class="pops-folder-list-table__header-row">
5595
+ <th class="pops-folder-list-table__header-th cursor-p">
5596
+ <div class="text-ellip content flex-a-i-center">
5597
+ <span>文件名</span>
5598
+ <div class="pops-folder-list-table__sort" data-sort="fileName">
5599
+ <div class="pops-folder-icon-arrow" data-sort="按文件名排序">
5600
+ <svg
5601
+ viewBox="0 0 1024 1024"
5602
+ xmlns="http://www.w3.org/2000/svg">
5603
+ <path
5604
+ d="M509.624392 5.882457 57.127707 458.379143 962.121078 458.379143Z"
5605
+ class="pops-folder-icon-arrow-up"></path>
5606
+ <path
5607
+ d="M509.624392 1024 962.121078 571.503314 57.127707 571.503314Z"
5608
+ class="pops-folder-icon-arrow-down"></path>
5609
+ </svg>
5610
+ </div>
5611
+ </div>
5612
+ </div>
5613
+ </th>
5614
+ <th class="pops-folder-list-table__header-th cursor-p">
5615
+ <div class="text-ellip content flex-a-i-center">
5616
+ <span>修改时间</span>
5617
+ <div class="pops-folder-list-table__sort" data-sort="latestTime">
5618
+ <div class="pops-folder-icon-arrow" title="按修改时间排序">
5619
+ <svg
5620
+ viewBox="0 0 1024 1024"
5621
+ xmlns="http://www.w3.org/2000/svg">
5622
+ <path
5623
+ d="M509.624392 5.882457 57.127707 458.379143 962.121078 458.379143Z"
5624
+ class="pops-folder-icon-arrow-up"></path>
5625
+ <path
5626
+ d="M509.624392 1024 962.121078 571.503314 57.127707 571.503314Z"
5627
+ class="pops-folder-icon-arrow-down"></path>
5628
+ </svg>
5629
+ </div>
5630
+ </div>
5631
+ </div>
5632
+ </th>
5633
+ <th class="pops-folder-list-table__header-th cursor-p">
5634
+ <div class="text-ellip content flex-a-i-center">
5635
+ <span>大小</span>
5636
+ <div class="pops-folder-list-table__sort" data-sort="fileSize">
5637
+ <div class="pops-folder-icon-arrow" title="按大小排序">
5638
+ <svg
5639
+ viewBox="0 0 1024 1024"
5640
+ xmlns="http://www.w3.org/2000/svg">
5641
+ <path
5642
+ d="M509.624392 5.882457 57.127707 458.379143 962.121078 458.379143Z"
5643
+ class="pops-folder-icon-arrow-up"></path>
5644
+ <path
5645
+ d="M509.624392 1024 962.121078 571.503314 57.127707 571.503314Z"
5646
+ class="pops-folder-icon-arrow-down"></path>
5647
+ </svg>
5648
+ </div>
5649
+ </div>
5650
+ </div>
5651
+ </th>
5652
+ </tr>
5653
+ </thead>
5654
+ </table>
5655
5655
  </div>
5656
5656
  <div class="pops-folder-list-table__body-div">
5657
- <table class="pops-folder-list-table__body">
5658
- <colgroup>
5659
- ${popsUtils.isPhone()
5657
+ <table class="pops-folder-list-table__body">
5658
+ <colgroup>
5659
+ ${popsUtils.isPhone()
5660
5660
  ? `<col width="100%">`
5661
5661
  : `
5662
- <col width="52%">
5663
- <col width="24%">
5664
- <col width="16%">`}
5665
-
5666
- </colgroup>
5667
- <tbody>
5668
-
5669
- </tbody>
5670
- </table>
5662
+ <col width="52%">
5663
+ <col width="24%">
5664
+ <col width="16%">`}
5665
+ </colgroup>
5666
+ <tbody></tbody>
5667
+ </table>
5671
5668
  </div>
5672
5669
  </div>
5673
5670
  </div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
@@ -5679,7 +5676,7 @@ const PopsFolder = {
5679
5676
  // folderListElement,
5680
5677
  // folderListHeaderElement,
5681
5678
  // folderListHeaderRowElement,
5682
- folderListBodyElement, folderFileListBreadcrumbPrimaryElement, headerCloseBtnElement: $btnCloseBtn, btnOkElement, btnCancelElement, btnOtherElement, folderListSortFileNameElement, folderListSortLatestTimeElement, folderListSortFileSizeElement, } = PopsHandler.handleQueryElement($anim, PopsType);
5679
+ folderListBodyElement, folderFileListBreadcrumbPrimaryElement, headerCloseBtnElement: $btnCloseBtn, btnOkElement, btnCancelElement, btnOtherElement, folderListSortFileNameElement, folderListSortLatestTimeElement, folderListSortFileSizeElement, } = PopsHandler.handleQueryElement($anim, popsType);
5683
5680
  /**
5684
5681
  * 遮罩层元素
5685
5682
  */
@@ -5690,7 +5687,7 @@ const PopsFolder = {
5690
5687
  let elementList = [$anim];
5691
5688
  if (config.mask.enable) {
5692
5689
  let _handleMask_ = PopsHandler.handleMask({
5693
- type: PopsType,
5690
+ type: popsType,
5694
5691
  guid: guid,
5695
5692
  config: config,
5696
5693
  animElement: $anim,
@@ -5700,7 +5697,7 @@ const PopsFolder = {
5700
5697
  elementList.push($mask);
5701
5698
  }
5702
5699
  /* 事件 */
5703
- let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, PopsType, $anim, $pops, $mask, config);
5700
+ let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
5704
5701
  PopsHandler.handleClickEvent("close", $btnCloseBtn, eventDetails, config.btn.close.callback);
5705
5702
  PopsHandler.handleClickEvent("ok", btnOkElement, eventDetails, config.btn.ok.callback);
5706
5703
  PopsHandler.handleClickEvent("cancel", btnCancelElement, eventDetails, config.btn.cancel.callback);
@@ -5793,10 +5790,10 @@ const PopsFolder = {
5793
5790
  fileSize: origin_fileSize,
5794
5791
  isFolder: isFolder,
5795
5792
  };
5796
- fileNameElement["__value__"] = __value__;
5797
- fileTimeElement["__value__"] = __value__;
5798
- fileFormatSize["__value__"] = __value__;
5799
- folderELement["__value__"] = __value__;
5793
+ Reflect.set(fileNameElement, "__value__", __value__);
5794
+ Reflect.set(fileTimeElement, "__value__", __value__);
5795
+ Reflect.set(fileFormatSize, "__value__", __value__);
5796
+ Reflect.set(folderELement, "__value__", __value__);
5800
5797
  folderELement.appendChild(fileNameElement);
5801
5798
  folderELement.appendChild(fileTimeElement);
5802
5799
  folderELement.appendChild(fileFormatSize);
@@ -5863,8 +5860,8 @@ const PopsFolder = {
5863
5860
  fileSize: origin_fileSize,
5864
5861
  isFolder: isFolder,
5865
5862
  };
5866
- fileNameElement["__value__"] = __value__;
5867
- folderELement["__value__"] = __value__;
5863
+ Reflect.set(fileNameElement, "__value__", __value__);
5864
+ Reflect.set(folderELement, "__value__", __value__);
5868
5865
  folderELement.appendChild(fileNameElement);
5869
5866
  return {
5870
5867
  folderELement,
@@ -5874,10 +5871,13 @@ const PopsFolder = {
5874
5871
  /**
5875
5872
  * 清空每行的元素
5876
5873
  */
5877
- function clearFolerRow() {
5874
+ function clearFolderRow() {
5878
5875
  PopsSafeUtils.setSafeHTML(folderListBodyElement, "");
5879
5876
  }
5880
- function getArrowIconElement() {
5877
+ /**
5878
+ * 创建顶部导航的箭头图标
5879
+ */
5880
+ function createHeaderArrowIcon() {
5881
5881
  let iconArrowElement = popsDOMUtils.createElement("div", {
5882
5882
  className: "iconArrow",
5883
5883
  });
@@ -5885,17 +5885,16 @@ const PopsFolder = {
5885
5885
  }
5886
5886
  /**
5887
5887
  * 添加顶部导航
5888
- * @param name
5889
- * @param _config_
5890
- * @returns
5888
+ * @param folderName 文件夹名
5889
+ * @param folderDataConfig 文件夹配置
5891
5890
  */
5892
- function getBreadcrumbAllFilesElement(name, _config_) {
5891
+ function createHeaderFileLinkNavgiation(folderName, folderDataConfig) {
5893
5892
  let spanElement = popsDOMUtils.createElement("span", {
5894
5893
  className: "pops-folder-file-list-breadcrumb-allFiles cursor-p",
5895
- innerHTML: `<a>${name}</a>`,
5896
- _config_: _config_,
5894
+ innerHTML: `<a>${folderName}</a>`,
5895
+ _config_: folderDataConfig,
5897
5896
  }, {
5898
- title: "name",
5897
+ title: folderName,
5899
5898
  });
5900
5899
  return spanElement;
5901
5900
  }
@@ -5903,10 +5902,10 @@ const PopsFolder = {
5903
5902
  * 顶部导航的点击事件
5904
5903
  * @param event
5905
5904
  * @param isTop 是否是全部文件按钮
5906
- * @param _config_ 配置
5905
+ * @param folderDataConfigList 配置
5907
5906
  */
5908
- function breadcrumbAllFilesElementClickEvent(event, isTop, _config_) {
5909
- clearFolerRow();
5907
+ function breadcrumbAllFilesElementClickEvent(event, isTop, folderDataConfigList) {
5908
+ clearFolderRow();
5910
5909
  /* 获取当前的导航元素 */
5911
5910
  let $click = event.target;
5912
5911
  let currentBreadcrumb = $click.closest("span.pops-folder-file-list-breadcrumb-allFiles");
@@ -5932,16 +5931,16 @@ const PopsFolder = {
5932
5931
  },
5933
5932
  addIndexCSS: false,
5934
5933
  });
5935
- addFolderElement(_config_);
5934
+ addFolderElement(folderDataConfigList);
5936
5935
  loadingMask.close();
5937
5936
  }
5938
5937
  /**
5939
5938
  * 刷新文件列表界面信息
5940
5939
  * @param event
5941
- * @param _config_
5940
+ * @param folderDataConfig
5942
5941
  */
5943
- async function refreshFolderInfoClickEvent(event, _config_) {
5944
- clearFolerRow();
5942
+ async function refreshFolderInfoClickEvent(event, folderDataConfig) {
5943
+ clearFolderRow();
5945
5944
  let loadingMask = PopsLoading.init({
5946
5945
  parent: $content,
5947
5946
  content: {
@@ -5952,12 +5951,12 @@ const PopsFolder = {
5952
5951
  },
5953
5952
  addIndexCSS: false,
5954
5953
  });
5955
- if (typeof _config_.clickEvent === "function") {
5956
- let childConfig = await _config_.clickEvent(event, _config_);
5954
+ if (typeof folderDataConfig.clickEvent === "function") {
5955
+ let childConfig = await folderDataConfig.clickEvent(event, folderDataConfig);
5957
5956
  /* 添加顶部导航的箭头 */
5958
- folderFileListBreadcrumbPrimaryElement.appendChild(getArrowIconElement());
5959
- /* 获取顶部导航 */
5960
- let breadcrumbAllFilesElement = getBreadcrumbAllFilesElement(_config_["fileName"], childConfig);
5957
+ folderFileListBreadcrumbPrimaryElement.appendChild(createHeaderArrowIcon());
5958
+ /* 添加顶部导航的链接文字 */
5959
+ let breadcrumbAllFilesElement = createHeaderFileLinkNavgiation(folderDataConfig.fileName, childConfig);
5961
5960
  folderFileListBreadcrumbPrimaryElement.appendChild(breadcrumbAllFilesElement);
5962
5961
  /* 设置顶部导航点击事件 */
5963
5962
  popsDOMUtils.on(breadcrumbAllFilesElement, "click", function (event) {
@@ -6252,7 +6251,7 @@ const PopsFolder = {
6252
6251
  endCallBack: config.dragEndCallBack,
6253
6252
  });
6254
6253
  }
6255
- PopsHandler.handlePush(PopsType, {
6254
+ PopsHandler.handlePush(popsType, {
6256
6255
  guid: guid,
6257
6256
  animElement: $anim,
6258
6257
  popsElement: $pops,
@@ -7344,14 +7343,14 @@ const PopsTooltip = {
7344
7343
  init(details) {
7345
7344
  const guid = popsUtils.getRandomGUID();
7346
7345
  // 设置当前类型
7347
- const PopsType = "tooltip";
7346
+ const popsType = "tooltip";
7348
7347
  let config = PopsTooltipConfig();
7349
7348
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
7350
7349
  config = popsUtils.assign(config, details);
7351
7350
  if (!(config.target instanceof HTMLElement)) {
7352
7351
  throw new TypeError("config.target 必须是HTMLElement类型");
7353
7352
  }
7354
- config = PopsHandler.handleOnly(PopsType, config);
7353
+ config = PopsHandler.handleOnly(popsType, config);
7355
7354
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
7356
7355
  PopsHandler.handleInit($shadowRoot, [
7357
7356
  {
@@ -7658,7 +7657,10 @@ const PanelHandlerComponents = () => {
7658
7657
  },
7659
7658
  init() {
7660
7659
  this.setStatus(this.$data.value);
7661
- if (formConfig.disabled) {
7660
+ let disabled = typeof formConfig.disabled === "function"
7661
+ ? formConfig.disabled()
7662
+ : formConfig.disabled;
7663
+ if (disabled) {
7662
7664
  this.disable();
7663
7665
  }
7664
7666
  this.setClickEvent();
@@ -8395,7 +8397,7 @@ const PanelHandlerComponents = () => {
8395
8397
  <div class="pops-panel-item-left-text">
8396
8398
  <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
8397
8399
  <div class="pops-panel-input pops-user-select-none">
8398
- <input type="${inputType}" placeholder="${formConfig.placeholder}">
8400
+ <input type="${inputType}" placeholder="${formConfig.placeholder ?? ""}">
8399
8401
  </div>
8400
8402
  `);
8401
8403
  const PopsPanelInput = {
@@ -8427,7 +8429,11 @@ const PanelHandlerComponents = () => {
8427
8429
  }
8428
8430
  }
8429
8431
  this.setInputChangeEvent();
8430
- if (formConfig.disabled) {
8432
+ // 是否禁用复选框
8433
+ let disabled = typeof formConfig.disabled === "function"
8434
+ ? formConfig.disabled()
8435
+ : formConfig.disabled;
8436
+ if (disabled) {
8431
8437
  this.disable();
8432
8438
  }
8433
8439
  if (typeof formConfig.handlerCallBack === "function") {
@@ -8605,7 +8611,10 @@ const PanelHandlerComponents = () => {
8605
8611
  init() {
8606
8612
  this.setValue(this.$data.value);
8607
8613
  this.setChangeEvent();
8608
- if (formConfig.disabled) {
8614
+ let disabled = typeof formConfig.disabled === "function"
8615
+ ? formConfig.disabled()
8616
+ : formConfig.disabled;
8617
+ if (disabled) {
8609
8618
  this.disable();
8610
8619
  }
8611
8620
  },
@@ -8684,7 +8693,10 @@ const PanelHandlerComponents = () => {
8684
8693
  this.initOption();
8685
8694
  this.setChangeEvent();
8686
8695
  this.setClickEvent();
8687
- if (formConfig.disabled) {
8696
+ let disabled = typeof formConfig.disabled === "function"
8697
+ ? formConfig.disabled()
8698
+ : formConfig.disabled;
8699
+ if (disabled) {
8688
8700
  this.disable();
8689
8701
  }
8690
8702
  },
@@ -10083,14 +10095,14 @@ const PopsPanel = {
10083
10095
  init(details) {
10084
10096
  const guid = popsUtils.getRandomGUID();
10085
10097
  // 设置当前类型
10086
- const PopsType = "panel";
10098
+ const popsType = "panel";
10087
10099
  let config = PopsPanelConfig();
10088
10100
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
10089
10101
  config = popsUtils.assign(config, details);
10090
10102
  if (details && Array.isArray(details.content)) {
10091
10103
  config.content = details.content;
10092
10104
  }
10093
- config = PopsHandler.handleOnly(PopsType, config);
10105
+ config = PopsHandler.handleOnly(popsType, config);
10094
10106
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
10095
10107
  PopsHandler.handleInit($shadowRoot, [
10096
10108
  {
@@ -10125,21 +10137,21 @@ const PopsPanel = {
10125
10137
  // 先把z-index提取出来
10126
10138
  let zIndex = PopsHandler.handleZIndex(config.zIndex);
10127
10139
  let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
10128
- let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
10129
- let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
10130
- let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
10140
+ let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
10141
+ let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
10142
+ let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
10131
10143
  /*html*/ `
10132
- <div class="pops-title pops-${PopsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
10144
+ <div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
10133
10145
  ? config.title.text
10134
- : `<p pops class="pops-${PopsType}-title-text" class="pops-${PopsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
10135
- <div class="pops-content pops-${PopsType}-content">
10136
- <aside class="pops-${PopsType}-aside">
10137
- <ul class="pops-${PopsType}-aside-top-container"></ul>
10138
- <ul class="pops-${PopsType}-aside-bottom-container"></ul>
10146
+ : `<p pops class="pops-${popsType}-title-text" class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
10147
+ <div class="pops-content pops-${popsType}-content">
10148
+ <aside class="pops-${popsType}-aside">
10149
+ <ul class="pops-${popsType}-aside-top-container"></ul>
10150
+ <ul class="pops-${popsType}-aside-bottom-container"></ul>
10139
10151
  </aside>
10140
- <section class="pops-${PopsType}-container">
10141
- <ul class="pops-${PopsType}-container-header-ul"></ul>
10142
- <ul class="pops-${PopsType}-container-main-ul"></ul>
10152
+ <section class="pops-${popsType}-container">
10153
+ <ul class="pops-${popsType}-container-header-ul"></ul>
10154
+ <ul class="pops-${popsType}-container-main-ul"></ul>
10143
10155
  </section>
10144
10156
  </div>`, "", zIndex);
10145
10157
  /**
@@ -10147,7 +10159,7 @@ const PopsPanel = {
10147
10159
  */
10148
10160
  let $anim = PopsElementHandler.parseElement(animHTML);
10149
10161
  /* 结构元素 */
10150
- let { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, titleElement: $title, contentElement: $content, contentAsideElement: $contentAside, contentSectionContainerElement: $contentSectionContainer, } = PopsHandler.handleQueryElement($anim, PopsType);
10162
+ let { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, titleElement: $title, contentElement: $content, contentAsideElement: $contentAside, contentSectionContainerElement: $contentSectionContainer, } = PopsHandler.handleQueryElement($anim, popsType);
10151
10163
  if (config.isMobile || popsUtils.isPhone()) {
10152
10164
  popsDOMUtils.addClassName($pops, config.mobileClassName);
10153
10165
  }
@@ -10162,7 +10174,7 @@ const PopsPanel = {
10162
10174
  /* 遮罩层元素 */
10163
10175
  if (config.mask.enable) {
10164
10176
  let { maskElement } = PopsHandler.handleMask({
10165
- type: PopsType,
10177
+ type: popsType,
10166
10178
  guid: guid,
10167
10179
  config: config,
10168
10180
  animElement: $anim,
@@ -10172,7 +10184,7 @@ const PopsPanel = {
10172
10184
  isCreatedElementList.push($mask);
10173
10185
  }
10174
10186
  /* 处理返回的配置 */
10175
- let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, PopsType, $anim, $pops, $mask, config);
10187
+ let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
10176
10188
  /* 为顶部右边的关闭按钮添加点击事件 */
10177
10189
  PopsHandler.handleClickEvent("close", $headerCloseBtn, eventDetails, config.btn.close.callback);
10178
10190
  /* 创建到页面中 */
@@ -10198,7 +10210,7 @@ const PopsPanel = {
10198
10210
  $contentSectionContainer: $contentSectionContainer,
10199
10211
  },
10200
10212
  });
10201
- PopsHandler.handlePush(PopsType, {
10213
+ PopsHandler.handlePush(popsType, {
10202
10214
  guid: guid,
10203
10215
  animElement: $anim,
10204
10216
  popsElement: $pops,
@@ -10360,11 +10372,11 @@ const PopsRightClickMenu = {
10360
10372
  init(details) {
10361
10373
  const guid = popsUtils.getRandomGUID();
10362
10374
  // 设置当前类型
10363
- const PopsType = "rightClickMenu";
10375
+ const popsType = "rightClickMenu";
10364
10376
  let config = rightClickMenuConfig();
10365
10377
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
10366
10378
  config = popsUtils.assign(config, details);
10367
- config = PopsHandler.handleOnly(PopsType, config);
10379
+ config = PopsHandler.handleOnly(popsType, config);
10368
10380
  if (config.target == null) {
10369
10381
  throw new Error("config.target 不能为空");
10370
10382
  }
@@ -10413,7 +10425,7 @@ const PopsRightClickMenu = {
10413
10425
  return;
10414
10426
  }
10415
10427
  let $click = event.target;
10416
- if ($click.closest(`.pops-${PopsType}`)) {
10428
+ if ($click.closest(`.pops-${popsType}`)) {
10417
10429
  return;
10418
10430
  }
10419
10431
  if ($click.className &&
@@ -10432,7 +10444,7 @@ const PopsRightClickMenu = {
10432
10444
  return;
10433
10445
  }
10434
10446
  let $click = event.target;
10435
- if ($click.closest(`.pops-${PopsType}`)) {
10447
+ if ($click.closest(`.pops-${popsType}`)) {
10436
10448
  return;
10437
10449
  }
10438
10450
  PopsContextMenu.closeAllMenu(PopsContextMenu.rootElement);
@@ -10478,14 +10490,14 @@ const PopsRightClickMenu = {
10478
10490
  if (config.preventDefault) {
10479
10491
  popsDOMUtils.preventEvent(event);
10480
10492
  }
10481
- PopsHandler.handleOnly(PopsType, config);
10493
+ PopsHandler.handleOnly(popsType, config);
10482
10494
  if (PopsContextMenu.rootElement) {
10483
10495
  PopsContextMenu.closeAllMenu(PopsContextMenu.rootElement);
10484
10496
  }
10485
10497
  let rootElement = PopsContextMenu.showMenu(event, config.data, selectorTarget);
10486
10498
  PopsContextMenu.rootElement = rootElement;
10487
10499
  if (config.only) {
10488
- PopsHandler.handlePush(PopsType, {
10500
+ PopsHandler.handlePush(popsType, {
10489
10501
  $shadowRoot: $shadowRoot,
10490
10502
  $shadowContainer: $shadowContainer,
10491
10503
  guid: guid,
@@ -10527,12 +10539,12 @@ const PopsRightClickMenu = {
10527
10539
  });
10528
10540
  element.remove();
10529
10541
  }
10530
- if (element.classList.contains(`pops-${PopsType}-anim-show`)) {
10542
+ if (element.classList.contains(`pops-${popsType}-anim-show`)) {
10531
10543
  /* 有动画 */
10532
10544
  popsDOMUtils.on(element, popsDOMUtils.getTransitionEndNameList(), transitionEndEvent, {
10533
10545
  capture: true,
10534
10546
  });
10535
- element.classList.remove(`pops-${PopsType}-anim-show`);
10547
+ element.classList.remove(`pops-${popsType}-anim-show`);
10536
10548
  }
10537
10549
  else {
10538
10550
  /* 无动画 */
@@ -10564,7 +10576,7 @@ const PopsRightClickMenu = {
10564
10576
  */
10565
10577
  getMenuContainerElement(isChildren) {
10566
10578
  let $menu = popsDOMUtils.createElement("div", {
10567
- className: `pops-${PopsType}`,
10579
+ className: `pops-${popsType}`,
10568
10580
  innerHTML: /*html*/ `
10569
10581
  <ul></ul>
10570
10582
  `,
@@ -10578,7 +10590,7 @@ const PopsRightClickMenu = {
10578
10590
  }
10579
10591
  /* 添加动画 */
10580
10592
  if (config.isAnimation) {
10581
- popsDOMUtils.addClassName($menu, `pops-${PopsType}-anim-grid`);
10593
+ popsDOMUtils.addClassName($menu, `pops-${popsType}-anim-grid`);
10582
10594
  }
10583
10595
  return $menu;
10584
10596
  },
@@ -10718,7 +10730,7 @@ const PopsRightClickMenu = {
10718
10730
  });
10719
10731
  /* 过渡动画 */
10720
10732
  if (config.isAnimation) {
10721
- popsDOMUtils.addClassName(menuElement, `pops-${PopsType}-anim-show`);
10733
+ popsDOMUtils.addClassName(menuElement, `pops-${popsType}-anim-show`);
10722
10734
  }
10723
10735
  return menuElement;
10724
10736
  },
@@ -10758,7 +10770,7 @@ const PopsRightClickMenu = {
10758
10770
  popsDOMUtils.css(menuElement, { ...offset, display: "" });
10759
10771
  /* 过渡动画 */
10760
10772
  if (config.isAnimation) {
10761
- popsDOMUtils.addClassName(menuElement, `pops-${PopsType}-anim-show`);
10773
+ popsDOMUtils.addClassName(menuElement, `pops-${popsType}-anim-show`);
10762
10774
  }
10763
10775
  return menuElement;
10764
10776
  },
@@ -10779,19 +10791,19 @@ const PopsRightClickMenu = {
10779
10791
  if (typeof item.icon === "string" && item.icon.trim() !== "") {
10780
10792
  let iconSVGHTML = PopsIcon.getIcon(item.icon) ?? item.icon;
10781
10793
  let iconElement = popsDOMUtils.parseTextToDOM(
10782
- /*html*/ `<i class="pops-${PopsType}-icon" is-loading="${item.iconIsLoading ?? false}">${iconSVGHTML}</i>`);
10794
+ /*html*/ `<i class="pops-${popsType}-icon" is-loading="${item.iconIsLoading ?? false}">${iconSVGHTML}</i>`);
10783
10795
  menuLiElement.appendChild(iconElement);
10784
10796
  }
10785
10797
  /* 插入文字 */
10786
10798
  menuLiElement.insertAdjacentHTML("beforeend", PopsSafeUtils.getSafeHTML(`<span>${item.text}</span>`));
10787
10799
  /* 如果存在子数据,显示 */
10788
10800
  if (item.item && Array.isArray(item.item)) {
10789
- popsDOMUtils.addClassName(menuLiElement, `pops-${PopsType}-item`);
10801
+ popsDOMUtils.addClassName(menuLiElement, `pops-${popsType}-item`);
10790
10802
  }
10791
10803
  /* 鼠标|触摸 移入事件 */
10792
10804
  function liElementHoverEvent() {
10793
10805
  Array.from(menuULElement.children).forEach((liElement) => {
10794
- popsDOMUtils.removeClassName(liElement, `pops-${PopsType}-is-visited`);
10806
+ popsDOMUtils.removeClassName(liElement, `pops-${popsType}-is-visited`);
10795
10807
  if (!liElement.__menuData__) {
10796
10808
  return;
10797
10809
  }
@@ -10816,7 +10828,7 @@ const PopsRightClickMenu = {
10816
10828
  index--;
10817
10829
  }
10818
10830
  }
10819
- popsDOMUtils.addClassName(menuLiElement, `pops-${PopsType}-is-visited`);
10831
+ popsDOMUtils.addClassName(menuLiElement, `pops-${popsType}-is-visited`);
10820
10832
  if (!item.item) {
10821
10833
  return;
10822
10834
  }
@@ -10939,7 +10951,7 @@ const PopsSearchSuggestion = {
10939
10951
  init(details) {
10940
10952
  const guid = popsUtils.getRandomGUID();
10941
10953
  // 设置当前类型
10942
- const PopsType = "searchSuggestion";
10954
+ const popsType = "searchSuggestion";
10943
10955
  let config = searchSuggestionConfig();
10944
10956
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
10945
10957
  config = popsUtils.assign(config, details);
@@ -11005,7 +11017,7 @@ const PopsSearchSuggestion = {
11005
11017
  SearchSuggestion.changeHintULElementPosition();
11006
11018
  SearchSuggestion.hide();
11007
11019
  if (config.isAnimation) {
11008
- SearchSuggestion.$el.root.classList.add(`pops-${PopsType}-animation`);
11020
+ SearchSuggestion.$el.root.classList.add(`pops-${popsType}-animation`);
11009
11021
  }
11010
11022
  $shadowRoot.appendChild(SearchSuggestion.$el.root);
11011
11023
  parentElement.appendChild($shadowContainer);
@@ -11022,16 +11034,16 @@ const PopsSearchSuggestion = {
11022
11034
  */
11023
11035
  getSearchSelectElement() {
11024
11036
  let element = popsDOMUtils.createElement("div", {
11025
- className: `pops pops-${PopsType}-search-suggestion`,
11037
+ className: `pops pops-${popsType}-search-suggestion`,
11026
11038
  innerHTML: /*html*/ `
11027
11039
  <style data-dynamic="true">
11028
11040
  ${this.getDynamicCSS()}
11029
11041
  </style>
11030
- <ul class="pops-${PopsType}-search-suggestion-hint">${config.toSearhNotResultHTML}</ul>
11042
+ <ul class="pops-${popsType}-search-suggestion-hint">${config.toSearhNotResultHTML}</ul>
11031
11043
  `,
11032
11044
  }, {
11033
11045
  "data-guid": guid,
11034
- "type-value": PopsType,
11046
+ "type-value": popsType,
11035
11047
  });
11036
11048
  if (config.className !== "" && config.className != null) {
11037
11049
  popsDOMUtils.addClassName(element, config.className);
@@ -11041,24 +11053,24 @@ const PopsSearchSuggestion = {
11041
11053
  /** 动态获取CSS */
11042
11054
  getDynamicCSS() {
11043
11055
  return /*css*/ `
11044
- .pops-${PopsType}-animation{
11056
+ .pops-${popsType}-animation{
11045
11057
  -moz-animation: searchSelectFalIn 0.5s 1 linear;
11046
11058
  -webkit-animation: searchSelectFalIn 0.5s 1 linear;
11047
11059
  -o-animation: searchSelectFalIn 0.5s 1 linear;
11048
11060
  -ms-animation: searchSelectFalIn 0.5s 1 linear;
11049
11061
  }
11050
- .pops-${PopsType}-search-suggestion{
11062
+ .pops-${popsType}-search-suggestion{
11051
11063
  --search-suggestion-bg-color: #ffffff;
11052
11064
  --search-suggestion-box-shadow-color: rgb(0 0 0 / 20%);
11053
11065
  --search-suggestion-item-color: #515a6e;
11054
11066
  --search-suggestion-item-none-color: #8e8e8e;
11055
11067
  --search-suggestion-item-hover-bg-color: rgba(0, 0, 0, .1);
11056
11068
  }
11057
- .pops-${PopsType}-search-suggestion{
11069
+ .pops-${popsType}-search-suggestion{
11058
11070
  border: initial;
11059
11071
  overflow: initial;
11060
11072
  }
11061
- ul.pops-${PopsType}-search-suggestion-hint{
11073
+ ul.pops-${popsType}-search-suggestion-hint{
11062
11074
  position: ${config.isAbsolute ? "absolute" : "fixed"};
11063
11075
  z-index: ${PopsHandler.handleZIndex(config.zIndex)};
11064
11076
  width: 0;
@@ -11073,14 +11085,14 @@ const PopsSearchSuggestion = {
11073
11085
  box-shadow: 0 1px 6px var(--search-suggestion-box-shadow-color);
11074
11086
  }
11075
11087
  /* 建议框在上面时 */
11076
- ul.pops-${PopsType}-search-suggestion-hint[data-top-reverse]{
11088
+ ul.pops-${popsType}-search-suggestion-hint[data-top-reverse]{
11077
11089
  display: flex;
11078
11090
  flex-direction: column-reverse;
11079
11091
  }
11080
- ul.pops-${PopsType}-search-suggestion-hint[data-top-reverse] li{
11092
+ ul.pops-${popsType}-search-suggestion-hint[data-top-reverse] li{
11081
11093
  flex-shrink: 0;
11082
11094
  }
11083
- ul.pops-${PopsType}-search-suggestion-hint li{
11095
+ ul.pops-${popsType}-search-suggestion-hint li{
11084
11096
  padding: 7px;
11085
11097
  margin: 0;
11086
11098
  clear: both;
@@ -11093,17 +11105,17 @@ const PopsSearchSuggestion = {
11093
11105
  text-overflow: ellipsis;
11094
11106
  width: 100%;
11095
11107
  }
11096
- ul.pops-${PopsType}-search-suggestion-hint li[data-none]{
11108
+ ul.pops-${popsType}-search-suggestion-hint li[data-none]{
11097
11109
  text-align: center;
11098
11110
  font-size: 12px;
11099
11111
  color: var(--search-suggestion-item-none-color);
11100
11112
  }
11101
- ul.pops-${PopsType}-search-suggestion-hint li:hover{
11113
+ ul.pops-${popsType}-search-suggestion-hint li:hover{
11102
11114
  background-color: var(--search-suggestion-item-hover-bg-color);
11103
11115
  }
11104
11116
 
11105
11117
  @media (prefers-color-scheme: dark){
11106
- .pops-${PopsType}-search-suggestion{
11118
+ .pops-${popsType}-search-suggestion{
11107
11119
  --search-suggestion-bg-color: #1d1e1f;
11108
11120
  --search-suggestion-item-color: #cfd3d4;
11109
11121
  --search-suggestion-item-hover-bg-color: rgba(175, 175, 175, .1);
@@ -11118,7 +11130,7 @@ const PopsSearchSuggestion = {
11118
11130
  */
11119
11131
  getSearchItemLiElement(data, index) {
11120
11132
  return popsDOMUtils.createElement("li", {
11121
- className: `pops-${PopsType}-search-suggestion-hint-item pops-flex-items-center pops-flex-y-center`,
11133
+ className: `pops-${popsType}-search-suggestion-hint-item pops-flex-items-center pops-flex-y-center`,
11122
11134
  "data-index": index,
11123
11135
  "data-value": SearchSuggestion.getItemDataValue(data),
11124
11136
  innerHTML: `${config.getItemHTML(data)}${config.deleteIcon.enable ? SearchSuggestion.getDeleteIconHTML() : ""}`,
@@ -11139,7 +11151,7 @@ const PopsSearchSuggestion = {
11139
11151
  popsDOMUtils.on(liElement, "click", void 0, (event) => {
11140
11152
  popsDOMUtils.preventEvent(event);
11141
11153
  let $click = event.target;
11142
- if ($click.closest(`.pops-${PopsType}-delete-icon`)) {
11154
+ if ($click.closest(`.pops-${popsType}-delete-icon`)) {
11143
11155
  /* 点击的是删除按钮 */
11144
11156
  if (typeof config.deleteIcon.callback === "function") {
11145
11157
  config.deleteIcon.callback(event, liElement, liElement["data-value"]);
@@ -11331,7 +11343,7 @@ const PopsSearchSuggestion = {
11331
11343
  */
11332
11344
  getDeleteIconHTML(size = 16, fill = "#bababa") {
11333
11345
  return /*html*/ `
11334
- <svg class="pops-${PopsType}-delete-icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="${fill}">
11346
+ <svg class="pops-${popsType}-delete-icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="${fill}">
11335
11347
  <path d="M512 883.2A371.2 371.2 0 1 0 140.8 512 371.2 371.2 0 0 0 512 883.2z m0 64a435.2 435.2 0 1 1 435.2-435.2 435.2 435.2 0 0 1-435.2 435.2z"></path>
11336
11348
  <path d="M557.056 512l122.368 122.368a31.744 31.744 0 1 1-45.056 45.056L512 557.056l-122.368 122.368a31.744 31.744 0 1 1-45.056-45.056L466.944 512 344.576 389.632a31.744 31.744 0 1 1 45.056-45.056L512 466.944l122.368-122.368a31.744 31.744 0 1 1 45.056 45.056z"></path>
11337
11349
  </svg>
@@ -11342,7 +11354,7 @@ const PopsSearchSuggestion = {
11342
11354
  */
11343
11355
  setPromptsInSearch() {
11344
11356
  let isSearchingElement = popsDOMUtils.createElement("li", {
11345
- className: `pops-${PopsType}-search-suggestion-hint-searching-item`,
11357
+ className: `pops-${popsType}-search-suggestion-hint-searching-item`,
11346
11358
  innerHTML: config.searchingTip,
11347
11359
  });
11348
11360
  SearchSuggestion.$el.$hintULContainer.appendChild(isSearchingElement);
@@ -11352,7 +11364,7 @@ const PopsSearchSuggestion = {
11352
11364
  */
11353
11365
  removePromptsInSearch() {
11354
11366
  SearchSuggestion.$el.$hintULContainer
11355
- .querySelector(`li.pops-${PopsType}-search-suggestion-hint-searching-item`)
11367
+ .querySelector(`li.pops-${popsType}-search-suggestion-hint-searching-item`)
11356
11368
  ?.remove();
11357
11369
  },
11358
11370
  /**
@@ -11505,7 +11517,7 @@ class Pops {
11505
11517
  /** 配置 */
11506
11518
  config = {
11507
11519
  /** 版本号 */
11508
- version: "2025.7.13",
11520
+ version: "2025.7.15",
11509
11521
  cssText: PopsCSS,
11510
11522
  /** icon图标的svg代码 */
11511
11523
  iconSVG: PopsIcon.$data,