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