@whitesev/pops 2.0.2 → 2.0.4

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 (38) hide show
  1. package/dist/index.amd.js +217 -328
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +217 -328
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +217 -328
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +217 -328
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +217 -328
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +217 -328
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/Pops.d.ts +3 -3
  14. package/dist/types/src/components/searchSuggestion/indexType.d.ts +1 -1
  15. package/dist/types/src/handler/PopsElementHandler.d.ts +4 -4
  16. package/dist/types/src/types/event.d.ts +3 -3
  17. package/dist/types/src/types/mask.d.ts +1 -1
  18. package/dist/types/src/utils/PopsInstanceUtils.d.ts +3 -3
  19. package/package.json +1 -1
  20. package/src/Pops.ts +1 -1
  21. package/src/components/alert/index.ts +13 -20
  22. package/src/components/confirm/index.ts +10 -20
  23. package/src/components/drawer/index.ts +11 -26
  24. package/src/components/folder/index.ts +11 -20
  25. package/src/components/iframe/index.ts +14 -23
  26. package/src/components/loading/index.ts +10 -9
  27. package/src/components/panel/PanelHandleContentDetails.ts +14 -36
  28. package/src/components/panel/index.ts +7 -11
  29. package/src/components/prompt/index.ts +16 -23
  30. package/src/components/rightClickMenu/index.ts +9 -7
  31. package/src/components/searchSuggestion/index.ts +8 -13
  32. package/src/components/searchSuggestion/indexType.ts +1 -1
  33. package/src/handler/PopsElementHandler.ts +33 -72
  34. package/src/handler/PopsHandler.ts +9 -11
  35. package/src/types/event.d.ts +3 -3
  36. package/src/types/mask.d.ts +1 -1
  37. package/src/utils/PopsDOMUtils.ts +21 -19
  38. package/src/utils/PopsInstanceUtils.ts +120 -96
package/dist/index.umd.js CHANGED
@@ -1225,30 +1225,32 @@
1225
1225
  if (element == null) {
1226
1226
  return;
1227
1227
  }
1228
+ let setStyleProperty = (propertyName, propertyValue) => {
1229
+ if (typeof propertyValue === "string" &&
1230
+ propertyValue.trim().endsWith("!important")) {
1231
+ propertyValue = propertyValue
1232
+ .trim()
1233
+ .replace(/!important$/gi, "")
1234
+ .trim();
1235
+ element.style.setProperty(propertyName, propertyValue, "important");
1236
+ }
1237
+ else {
1238
+ propertyValue = handlePixe(propertyName, propertyValue);
1239
+ element.style.setProperty(propertyName, propertyValue);
1240
+ }
1241
+ };
1228
1242
  if (typeof property === "string") {
1229
1243
  if (value == null) {
1230
1244
  return getComputedStyle(element).getPropertyValue(property);
1231
1245
  }
1232
1246
  else {
1233
- if (value === "string" && value.includes("!important")) {
1234
- element.style.setProperty(property, value, "important");
1235
- }
1236
- else {
1237
- value = handlePixe(property, value);
1238
- element.style.setProperty(property, value);
1239
- }
1247
+ setStyleProperty(property, value);
1240
1248
  }
1241
1249
  }
1242
1250
  else if (typeof property === "object") {
1243
1251
  for (let prop in property) {
1244
- if (typeof property[prop] === "string" &&
1245
- property[prop].includes("!important")) {
1246
- element.style.setProperty(prop, property[prop], "important");
1247
- }
1248
- else {
1249
- property[prop] = handlePixe(prop, property[prop]);
1250
- element.style.setProperty(prop, property[prop]);
1251
- }
1252
+ let value = property[prop];
1253
+ setStyleProperty(prop, value);
1252
1254
  }
1253
1255
  }
1254
1256
  }
@@ -1907,31 +1909,37 @@
1907
1909
  * @param maskElement
1908
1910
  */
1909
1911
  hide(popsType, layerConfigList, guid, config, animElement, maskElement) {
1910
- let popsElement = animElement.querySelector(".pops[type-value]");
1911
- if (popsType === "drawer") {
1912
- let drawerConfig = config;
1913
- setTimeout(() => {
1914
- maskElement.style.setProperty("display", "none");
1915
- if (["top", "bottom"].includes(drawerConfig.direction)) {
1916
- popsElement.style.setProperty("height", "0");
1917
- }
1918
- else if (["left", "right"].includes(drawerConfig.direction)) {
1919
- popsElement.style.setProperty("width", "0");
1920
- }
1921
- else {
1922
- console.error("未知direction:", drawerConfig.direction);
1923
- }
1924
- }, drawerConfig.closeDelay);
1925
- }
1926
- else {
1927
- layerConfigList.forEach((layerConfigItem) => {
1928
- if (layerConfigItem.guid === guid) {
1912
+ return new Promise((resolve) => {
1913
+ let popsElement = animElement.querySelector(".pops[type-value]");
1914
+ if (popsType === "drawer") {
1915
+ let drawerConfig = config;
1916
+ setTimeout(() => {
1917
+ maskElement.style.setProperty("display", "none");
1918
+ if (["top", "bottom"].includes(drawerConfig.direction)) {
1919
+ popsElement.style.setProperty("height", "0");
1920
+ }
1921
+ else if (["left", "right"].includes(drawerConfig.direction)) {
1922
+ popsElement.style.setProperty("width", "0");
1923
+ }
1924
+ else {
1925
+ console.error("未知direction:", drawerConfig.direction);
1926
+ }
1927
+ resolve();
1928
+ }, drawerConfig.closeDelay);
1929
+ }
1930
+ else {
1931
+ let findLayerIns = layerConfigList.find((layerConfigItem) => layerConfigItem.guid === guid);
1932
+ if (findLayerIns) {
1929
1933
  /* 存在动画 */
1934
+ let layerConfigItem = findLayerIns;
1930
1935
  layerConfigItem.animElement.style.width = "100%";
1931
1936
  layerConfigItem.animElement.style.height = "100%";
1932
1937
  layerConfigItem.animElement.style["animation-name"] =
1933
1938
  layerConfigItem.animElement.getAttribute("anim") + "-reverse";
1934
1939
  if (pops.config.animation.hasOwnProperty(layerConfigItem.animElement.style["animation-name"])) {
1940
+ /**
1941
+ * 动画结束的回调
1942
+ */
1935
1943
  function animationendCallBack() {
1936
1944
  layerConfigItem.animElement.style.display = "none";
1937
1945
  if (layerConfigItem.maskElement) {
@@ -1940,6 +1948,7 @@
1940
1948
  popsDOMUtils.off(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
1941
1949
  capture: true,
1942
1950
  });
1951
+ resolve();
1943
1952
  }
1944
1953
  popsDOMUtils.on(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
1945
1954
  capture: true,
@@ -1950,11 +1959,11 @@
1950
1959
  if (layerConfigItem.maskElement) {
1951
1960
  layerConfigItem.maskElement.style.display = "none";
1952
1961
  }
1962
+ resolve();
1953
1963
  }
1954
- return;
1955
1964
  }
1956
- });
1957
- }
1965
+ }
1966
+ });
1958
1967
  },
1959
1968
  /**
1960
1969
  * 显示
@@ -1966,27 +1975,30 @@
1966
1975
  * @param maskElement
1967
1976
  */
1968
1977
  show(popsType, layerConfigList, guid, config, animElement, maskElement) {
1969
- let popsElement = animElement.querySelector(".pops[type-value]");
1970
- if (popsType === "drawer") {
1971
- let drawerConfig = config;
1972
- setTimeout(() => {
1973
- maskElement.style.setProperty("display", "");
1974
- let direction = drawerConfig.direction;
1975
- let size = drawerConfig.size.toString();
1976
- if (["top", "bottom"].includes(direction)) {
1977
- popsElement.style.setProperty("height", size);
1978
- }
1979
- else if (["left", "right"].includes(direction)) {
1980
- popsElement.style.setProperty("width", size);
1981
- }
1982
- else {
1983
- console.error("未知direction:", direction);
1984
- }
1985
- }, drawerConfig.openDelay);
1986
- }
1987
- else {
1988
- layerConfigList.forEach((layerConfigItem) => {
1989
- if (layerConfigItem.guid === guid) {
1978
+ return new Promise((resolve) => {
1979
+ let popsElement = animElement.querySelector(".pops[type-value]");
1980
+ if (popsType === "drawer") {
1981
+ let drawerConfig = config;
1982
+ setTimeout(() => {
1983
+ popsDOMUtils.css(maskElement, "display", "");
1984
+ let direction = drawerConfig.direction;
1985
+ let size = drawerConfig.size.toString();
1986
+ if (["top", "bottom"].includes(direction)) {
1987
+ popsElement.style.setProperty("height", size);
1988
+ }
1989
+ else if (["left", "right"].includes(direction)) {
1990
+ popsElement.style.setProperty("width", size);
1991
+ }
1992
+ else {
1993
+ console.error("未知direction:", direction);
1994
+ }
1995
+ resolve();
1996
+ }, drawerConfig.openDelay);
1997
+ }
1998
+ else {
1999
+ let findLayerIns = layerConfigList.find((layerConfigItem) => layerConfigItem.guid === guid);
2000
+ if (findLayerIns) {
2001
+ let layerConfigItem = findLayerIns;
1990
2002
  layerConfigItem.animElement.style.width = "";
1991
2003
  layerConfigItem.animElement.style.height = "";
1992
2004
  layerConfigItem.animElement.style["animation-name"] =
@@ -1994,14 +2006,18 @@
1994
2006
  .animElement.getAttribute("anim")
1995
2007
  .replace("-reverse", "");
1996
2008
  if (pops.config.animation.hasOwnProperty(layerConfigItem.animElement.style["animation-name"])) {
1997
- layerConfigItem.animElement.style.display = "";
1998
- if (layerConfigItem.maskElement) {
1999
- layerConfigItem.maskElement.style.display = "";
2000
- }
2009
+ /**
2010
+ * 动画结束的回调
2011
+ */
2001
2012
  function animationendCallBack() {
2002
2013
  popsDOMUtils.off(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
2003
2014
  capture: true,
2004
2015
  });
2016
+ resolve();
2017
+ }
2018
+ layerConfigItem.animElement.style.display = "";
2019
+ if (layerConfigItem.maskElement) {
2020
+ layerConfigItem.maskElement.style.display = "";
2005
2021
  }
2006
2022
  popsDOMUtils.on(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
2007
2023
  capture: true,
@@ -2012,11 +2028,11 @@
2012
2028
  if (layerConfigItem.maskElement) {
2013
2029
  layerConfigItem.maskElement.style.display = "";
2014
2030
  }
2031
+ resolve();
2015
2032
  }
2016
2033
  }
2017
- return;
2018
- });
2019
- }
2034
+ }
2035
+ });
2020
2036
  },
2021
2037
  /**
2022
2038
  * 关闭
@@ -2027,50 +2043,57 @@
2027
2043
  * @param animElement
2028
2044
  */
2029
2045
  close(popsType, layerConfigList, guid, config, animElement) {
2030
- let popsElement = animElement.querySelector(".pops[type-value]");
2031
- let drawerConfig = config;
2032
- /**
2033
- * 动画结束事件
2034
- */
2035
- function transitionendEvent() {
2036
- function closeCallBack(event) {
2037
- if (event.propertyName !== "transform") {
2046
+ return new Promise((resolve) => {
2047
+ let popsElement = animElement.querySelector(".pops[type-value]");
2048
+ let drawerConfig = config;
2049
+ /**
2050
+ * 动画结束事件
2051
+ */
2052
+ function transitionendEvent() {
2053
+ /**
2054
+ * 弹窗已关闭的回调
2055
+ */
2056
+ function closeCallBack(event) {
2057
+ if (event.propertyName !== "transform") {
2058
+ return;
2059
+ }
2060
+ popsDOMUtils.off(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, closeCallBack);
2061
+ PopsInstanceUtils.removeInstance([layerConfigList], guid);
2062
+ resolve();
2063
+ }
2064
+ /* 监听过渡结束 */
2065
+ popsDOMUtils.on(popsElement, popsDOMUtils.getTransitionEndNameList(), closeCallBack);
2066
+ let popsTransForm = getComputedStyle(popsElement).transform;
2067
+ if (popsTransForm !== "none") {
2068
+ popsDOMUtils.trigger(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, true);
2038
2069
  return;
2039
2070
  }
2040
- popsDOMUtils.off(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, closeCallBack);
2041
- PopsInstanceUtils.removeInstance([layerConfigList], guid);
2042
- }
2043
- /* 监听过渡结束 */
2044
- popsDOMUtils.on(popsElement, popsDOMUtils.getTransitionEndNameList(), closeCallBack);
2045
- let popsTransForm = getComputedStyle(popsElement).transform;
2046
- if (popsTransForm !== "none") {
2047
- popsDOMUtils.trigger(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, true);
2048
- return;
2049
- }
2050
- if (["top"].includes(drawerConfig.direction)) {
2051
- popsElement.style.setProperty("transform", "translateY(-100%)");
2052
- }
2053
- else if (["bottom"].includes(drawerConfig.direction)) {
2054
- popsElement.style.setProperty("transform", "translateY(100%)");
2055
- }
2056
- else if (["left"].includes(drawerConfig.direction)) {
2057
- popsElement.style.setProperty("transform", "translateX(-100%)");
2071
+ if (["top"].includes(drawerConfig.direction)) {
2072
+ popsElement.style.setProperty("transform", "translateY(-100%)");
2073
+ }
2074
+ else if (["bottom"].includes(drawerConfig.direction)) {
2075
+ popsElement.style.setProperty("transform", "translateY(100%)");
2076
+ }
2077
+ else if (["left"].includes(drawerConfig.direction)) {
2078
+ popsElement.style.setProperty("transform", "translateX(-100%)");
2079
+ }
2080
+ else if (["right"].includes(drawerConfig.direction)) {
2081
+ popsElement.style.setProperty("transform", "translateX(100%)");
2082
+ }
2083
+ else {
2084
+ console.error("未知direction:", drawerConfig.direction);
2085
+ }
2058
2086
  }
2059
- else if (["right"].includes(drawerConfig.direction)) {
2060
- popsElement.style.setProperty("transform", "translateX(100%)");
2087
+ if (popsType === "drawer") {
2088
+ setTimeout(() => {
2089
+ transitionendEvent();
2090
+ }, drawerConfig.closeDelay);
2061
2091
  }
2062
2092
  else {
2063
- console.error("未知direction:", drawerConfig.direction);
2093
+ PopsInstanceUtils.removeInstance([layerConfigList], guid);
2094
+ resolve();
2064
2095
  }
2065
- }
2066
- if (popsType === "drawer") {
2067
- setTimeout(() => {
2068
- transitionendEvent();
2069
- }, drawerConfig.closeDelay);
2070
- }
2071
- else {
2072
- PopsInstanceUtils.removeInstance([layerConfigList], guid);
2073
- }
2096
+ });
2074
2097
  },
2075
2098
  /**
2076
2099
  * 拖拽元素
@@ -2475,7 +2498,7 @@
2475
2498
  if (style.startsWith(";")) {
2476
2499
  style = style.replace(";", "");
2477
2500
  }
2478
- return `<div class="pops-mask" data-guid="${guid}" style="z-index:${zIndex};${style}"></div>`;
2501
+ return /*html*/ `<div class="pops-mask" data-guid="${guid}" style="z-index:${zIndex};${style}"></div>`;
2479
2502
  },
2480
2503
  /**
2481
2504
  * 获取动画层HTML
@@ -2503,23 +2526,10 @@
2503
2526
  }
2504
2527
  let hasBottomBtn = bottomBtnHTML.trim() === "" ? false : true;
2505
2528
  return /*html*/ `
2506
- <div
2507
- class="pops-anim"
2508
- anim="${__config.animation || ""}"
2509
- style="${popsAnimStyle}"
2510
- data-guid="${guid}">
2511
- ${config.style != null
2529
+ <div class="pops-anim" anim="${__config.animation || ""}" style="${popsAnimStyle}" data-guid="${guid}">${config.style != null
2512
2530
  ? `<style tyle="text/css">${config.style}</style>`
2513
2531
  : ""}
2514
- <div
2515
- class="pops ${config.class || ""}"
2516
- data-bottom-btn="${hasBottomBtn}"
2517
- type-value="${type}"
2518
- style="${popsStyle}"
2519
- position="${popsPosition}"
2520
- data-guid="${guid}">
2521
- ${html}
2522
- </div>
2532
+ <div class="pops ${config.class || ""}" data-bottom-btn="${hasBottomBtn}" type-value="${type}" style="${popsStyle}" position="${popsPosition}" data-guid="${guid}">${html}</div>
2523
2533
  </div>`;
2524
2534
  },
2525
2535
  /**
@@ -2544,22 +2554,20 @@
2544
2554
  let topRightButtonHTML = "";
2545
2555
  __config_iframe.topRightButton.split("|").forEach((item) => {
2546
2556
  item = item.toLowerCase();
2547
- topRightButtonHTML += `
2557
+ topRightButtonHTML += /*html*/ `
2548
2558
  <button class="pops-header-control" type="${item}">
2549
2559
  <i class="pops-icon">${pops.config.iconSVG[item]}</i>
2550
2560
  </button>`;
2551
2561
  });
2552
- resultHTML = `
2553
- <div class="pops-header-controls" data-margin>
2554
- ${topRightButtonHTML}
2555
- </div>`;
2562
+ resultHTML = /*html*/ `
2563
+ <div class="pops-header-controls" data-margin>${topRightButtonHTML}</div>`;
2556
2564
  }
2557
2565
  else {
2558
2566
  if (__config_confirm.btn?.close?.enable) {
2559
- closeHTML = `
2567
+ closeHTML = /*html*/ `
2560
2568
  <div class="pops-header-controls">
2561
2569
  <button class="pops-header-control" type="close" data-header>
2562
- <i class="pops-icon">${pops.config.iconSVG["close"]}</i>
2570
+ <i class="pops-icon">${pops.config.iconSVG["close"]}</i>
2563
2571
  </button>
2564
2572
  </div>`;
2565
2573
  }
@@ -2616,20 +2624,15 @@
2616
2624
  iconHTML = okIcon;
2617
2625
  }
2618
2626
  iconHTML = iconHTML || "";
2619
- okIconHTML = `
2620
- <i class="pops-bottom-icon" is-loading="${config.btn.ok.iconIsLoading}">
2621
- ${iconHTML}
2622
- </i>`;
2627
+ okIconHTML = /*html*/ `<i class="pops-bottom-icon" is-loading="${config.btn.ok.iconIsLoading}">${iconHTML}</i>`;
2623
2628
  }
2624
- okHTML = `
2629
+ okHTML = /*html*/ `
2625
2630
  <button
2626
2631
  class="pops-${type}-btn-ok ${okButtonSizeClassName}"
2627
2632
  type="${__config_confirm.btn.ok?.type}"
2628
2633
  data-has-icon="${(__config_confirm.btn.ok.icon || "") !== ""}"
2629
2634
  data-rightIcon="${__config_confirm.btn.ok?.rightIcon}"
2630
- >
2631
- ${okIconHTML}
2632
- <span>${config.btn.ok.text}</span>
2635
+ >${okIconHTML}<span>${config.btn.ok.text}</span>
2633
2636
  </button>`;
2634
2637
  }
2635
2638
  if (__config_confirm.btn?.cancel?.enable) {
@@ -2655,20 +2658,15 @@
2655
2658
  iconHTML = cancelIcon;
2656
2659
  }
2657
2660
  iconHTML = iconHTML || "";
2658
- cancelIconHTML = `
2659
- <i class="pops-bottom-icon" is-loading="${__config_confirm.btn.cancel.iconIsLoading}">
2660
- ${iconHTML}
2661
- </i>`;
2661
+ cancelIconHTML = /*html*/ `<i class="pops-bottom-icon" is-loading="${__config_confirm.btn.cancel.iconIsLoading}">${iconHTML}</i>`;
2662
2662
  }
2663
- cancelHTML = `
2663
+ cancelHTML = /*html*/ `
2664
2664
  <button
2665
2665
  class="pops-${type}-btn-cancel ${cancelButtonSizeClassName}"
2666
2666
  type="${__config_confirm.btn.cancel.type}"
2667
2667
  data-has-icon="${(__config_confirm.btn.cancel.icon || "") !== ""}"
2668
2668
  data-rightIcon="${__config_confirm.btn.cancel.rightIcon}"
2669
- >
2670
- ${cancelIconHTML}
2671
- <span>${__config_confirm.btn.cancel.text}</span>
2669
+ >${cancelIconHTML}<span>${__config_confirm.btn.cancel.text}</span>
2672
2670
  </button>`;
2673
2671
  }
2674
2672
  if (__config_confirm.btn?.other?.enable) {
@@ -2691,20 +2689,15 @@
2691
2689
  iconHTML = pops.config.iconSVG[otherIcon];
2692
2690
  }
2693
2691
  iconHTML = iconHTML || "";
2694
- otherIconHTML = `
2695
- <i class="pops-bottom-icon" is-loading="${__config_confirm.btn.other.iconIsLoading}">
2696
- ${iconHTML}
2697
- </i>`;
2692
+ otherIconHTML = /*html*/ `<i class="pops-bottom-icon" is-loading="${__config_confirm.btn.other.iconIsLoading}">${iconHTML}</i>`;
2698
2693
  }
2699
- ohterHTML = `
2694
+ ohterHTML = /*html*/ `
2700
2695
  <button
2701
2696
  class="pops-${type}-btn-other ${otherButtonSizeClassName}"
2702
2697
  type="${__config_confirm.btn.other.type}"
2703
2698
  data-has-icon="${(__config_confirm.btn.other.icon || "") !== ""}"
2704
2699
  data-rightIcon="${__config_confirm.btn.other.rightIcon}"
2705
- >
2706
- ${otherIconHTML}
2707
- <span>${__config_confirm.btn.other.text}</span>
2700
+ >${otherIconHTML}<span>${__config_confirm.btn.other.text}</span>
2708
2701
  </button>`;
2709
2702
  }
2710
2703
  if (__config_confirm.btn.merge) {
@@ -2715,33 +2708,22 @@
2715
2708
  else {
2716
2709
  flexStyle += "flex-direction: row;";
2717
2710
  }
2718
- resultHTML = `
2719
- <div class="pops-${type}-btn" style="${btnStyle}">
2720
- ${ohterHTML}
2721
- <div
2711
+ resultHTML = /*html*/ `
2712
+ <div class="pops-${type}-btn" style="${btnStyle}">${ohterHTML}<div
2722
2713
  class="pops-${type}-btn-merge"
2723
- style="${flexStyle}">
2724
- ${okHTML}
2725
- ${cancelHTML}
2726
- </div>
2714
+ style="${flexStyle}">${okHTML}${cancelHTML}</div>
2727
2715
  </div>
2728
2716
  `;
2729
2717
  }
2730
2718
  else {
2731
- resultHTML = `
2732
- <div class="pops-${type}-btn" style="${btnStyle}">
2733
- ${okHTML}
2734
- ${cancelHTML}
2735
- ${ohterHTML}
2736
- </div>
2737
- `;
2719
+ resultHTML = /*html*/ `<div class="pops-${type}-btn" style="${btnStyle}">${okHTML}${cancelHTML}${ohterHTML}</div>`;
2738
2720
  }
2739
2721
  return resultHTML;
2740
2722
  },
2741
2723
  /**
2742
2724
  * 获取标题style
2743
- * @param type
2744
- * @param config
2725
+ * @param type 弹窗类型
2726
+ * @param config 弹窗配置
2745
2727
  */
2746
2728
  getHeaderStyle(type, config) {
2747
2729
  return {
@@ -2751,8 +2733,8 @@
2751
2733
  },
2752
2734
  /**
2753
2735
  * 获取内容style
2754
- * @param type
2755
- * @param config
2736
+ * @param type 弹窗类型
2737
+ * @param config 弹窗配置
2756
2738
  */
2757
2739
  getContentStyle(type, config) {
2758
2740
  return {
@@ -2840,11 +2822,11 @@
2840
2822
  function originalRun() {
2841
2823
  if (details.config.mask.clickEvent.toClose) {
2842
2824
  /* 关闭 */
2843
- PopsInstanceUtils.close(details.type, targetLayer, details.guid, details.config, details.animElement);
2825
+ return PopsInstanceUtils.close(details.type, targetLayer, details.guid, details.config, details.animElement);
2844
2826
  }
2845
2827
  else if (details.config.mask.clickEvent.toHide) {
2846
2828
  /* 隐藏 */
2847
- PopsInstanceUtils.hide(details.type, targetLayer, details.guid, details.config, details.animElement, result.maskElement);
2829
+ return PopsInstanceUtils.hide(details.type, targetLayer, details.guid, details.config, details.animElement, result.maskElement);
2848
2830
  }
2849
2831
  }
2850
2832
  if (typeof details.config.mask.clickCallBack === "function") {
@@ -3023,13 +3005,13 @@
3023
3005
  mode: mode,
3024
3006
  guid: guid,
3025
3007
  close() {
3026
- PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
3008
+ return PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
3027
3009
  },
3028
3010
  hide() {
3029
- PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3011
+ return PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3030
3012
  },
3031
3013
  show() {
3032
- PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3014
+ return PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3033
3015
  },
3034
3016
  };
3035
3017
  },
@@ -3051,13 +3033,13 @@
3051
3033
  mode: mode,
3052
3034
  guid: guid,
3053
3035
  close() {
3054
- PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
3036
+ return PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
3055
3037
  },
3056
3038
  hide() {
3057
- PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3039
+ return PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3058
3040
  },
3059
3041
  show() {
3060
- PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3042
+ return PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3061
3043
  },
3062
3044
  };
3063
3045
  },
@@ -3296,21 +3278,12 @@
3296
3278
  let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
3297
3279
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
3298
3280
  /*html*/ `
3299
- <div
3300
- class="pops-alert-title"
3301
- style="text-align: ${config.title.position};
3302
- ${headerStyle}">
3303
- ${config.title.html
3281
+ <div class="pops-alert-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
3304
3282
  ? config.title.text
3305
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
3306
- ${headerBtnHTML}
3307
- </div>
3308
- <div class="pops-alert-content" style="${contentStyle}">
3309
- ${config.content.html
3283
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
3284
+ <div class="pops-alert-content" style="${contentStyle}">${config.content.html
3310
3285
  ? config.content.text
3311
- : `<p pops style="${contentPStyle}">${config.content.text}</p>`}
3312
- </div>
3313
- ${bottomBtnHTML}`, bottomBtnHTML, zIndex);
3286
+ : `<p pops style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
3314
3287
  /**
3315
3288
  * 弹窗的主元素,包括动画层
3316
3289
  */
@@ -3487,22 +3460,12 @@
3487
3460
  let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
3488
3461
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
3489
3462
  /*html*/ `
3490
- <div class="pops-confirm-title" style="text-align: ${config.title.position};${headerStyle}">
3491
- ${config.title.html
3463
+ <div class="pops-confirm-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
3492
3464
  ? config.title.text
3493
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
3494
- ${headerBtnHTML}
3495
- </div>
3496
- <div class="pops-confirm-content" style="${contentStyle}">
3497
- ${config.content.html
3465
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
3466
+ <div class="pops-confirm-content" style="${contentStyle}">${config.content.html
3498
3467
  ? config.content.text
3499
- : `<p pops style="${contentPStyle}">${config.content.text}</p>`}
3500
-
3501
- </div>
3502
-
3503
-
3504
- ${bottomBtnHTML}
3505
- `, bottomBtnHTML, zIndex);
3468
+ : `<p pops style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
3506
3469
  /**
3507
3470
  * 弹窗的主元素,包括动画层
3508
3471
  */
@@ -3684,14 +3647,10 @@
3684
3647
  let { contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
3685
3648
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
3686
3649
  /*html*/ `
3687
- <div class="pops-prompt-title" style="text-align: ${config.title.position};${headerStyle}">
3688
- ${config.title.html
3650
+ <div class="pops-prompt-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
3689
3651
  ? config.title.text
3690
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
3691
- ${headerBtnHTML}
3692
- </div>
3693
- <div class="pops-prompt-content" style="${contentPStyle}">
3694
- ${config.content.row
3652
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
3653
+ <div class="pops-prompt-content" style="${contentPStyle}">${config.content.row
3695
3654
  ? '<textarea pops="" placeholder="' +
3696
3655
  config.content.placeholder +
3697
3656
  '"></textarea>'
@@ -3699,10 +3658,7 @@
3699
3658
  config.content.placeholder +
3700
3659
  '" type="' +
3701
3660
  (config.content.password ? "password" : "text") +
3702
- '">'}
3703
- </div>
3704
- ${bottomBtnHTML}
3705
- `, bottomBtnHTML, zIndex);
3661
+ '">'}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
3706
3662
  /**
3707
3663
  * 弹窗的主元素,包括动画层
3708
3664
  */
@@ -3815,9 +3771,8 @@
3815
3771
  let { contentPStyle } = PopsElementHandler.getContentStyle("loading", config);
3816
3772
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
3817
3773
  /*html*/ `
3818
- <div class="pops-loading-content">
3819
- ${config.addIndexCSS
3820
- ? `
3774
+ <div class="pops-loading-content">${config.addIndexCSS
3775
+ ? /*html*/ `
3821
3776
  <style data-model-name="index">${pops.config.cssText.index}</style>
3822
3777
  <style data-model-name="anim">${pops.config.cssText.anim}</style>
3823
3778
  <style data-model-name="common">${pops.config.cssText.common}</style>
@@ -3827,9 +3782,8 @@
3827
3782
  ${pops.config.cssText.loadingCSS}
3828
3783
  </style>
3829
3784
  ${config.style != null ? `<style>${config.style}</style>` : ""}
3830
- <p pops style="${contentPStyle}">${config.content.text}</p>
3831
- </div>
3832
- `, "", zIndex);
3785
+ <p pops style="${contentPStyle}">${config.content.text}</p>
3786
+ </div>`, "", zIndex);
3833
3787
  /**
3834
3788
  * 弹窗的主元素,包括动画层
3835
3789
  */
@@ -3853,6 +3807,9 @@
3853
3807
  maskHTML: maskHTML,
3854
3808
  });
3855
3809
  $mask = _handleMask_.maskElement;
3810
+ // 遮罩层必须是跟随主内容
3811
+ // 即设置主内容position: relative,mask:position: absolute
3812
+ popsDOMUtils.css($mask, "position", "absolute !important");
3856
3813
  elementList.push($mask);
3857
3814
  }
3858
3815
  let eventDetails = PopsHandler.handleLoadingEventDetails(guid, PopsType, $anim, $pops, $mask, config);
@@ -3963,27 +3920,16 @@
3963
3920
  let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
3964
3921
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
3965
3922
  /*html*/ `
3966
- <div
3967
- class="pops-iframe-title"
3968
- style="text-align: ${config.title.position};${headerStyle}"
3969
- >
3970
- ${config.title.html
3923
+ <div class="pops-iframe-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
3971
3924
  ? titleText
3972
- : `<p pops style="${headerPStyle}">${titleText}</p>`}
3973
- ${headerBtnHTML}
3974
- </div>
3975
- <div class="pops-iframe-content">
3925
+ : `<p pops style="${headerPStyle}">${titleText}</p>`}${headerBtnHTML}</div>
3926
+ <div class="pops-iframe-content">
3976
3927
  <div class="pops-iframe-content-global-loading"></div>
3977
- <iframe
3978
- src="${config.url}"
3979
- pops
3980
- ${config.sandbox
3928
+ <iframe src="${config.url}" pops ${config.sandbox
3981
3929
  ? "sandbox='allow-forms allow-same-origin allow-scripts'"
3982
3930
  : ""}>
3983
3931
  </iframe>
3984
- </div>
3985
- ${config.loading.enable ? iframeLoadingHTML : ""}
3986
- `, "", zIndex);
3932
+ </div>${config.loading.enable ? iframeLoadingHTML : ""}`, "", zIndex);
3987
3933
  /**
3988
3934
  * 弹窗的主元素,包括动画层
3989
3935
  */
@@ -4289,29 +4235,14 @@
4289
4235
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
4290
4236
  /*html*/ `
4291
4237
  ${config.title.enable
4292
- ? `
4293
- <div class="pops-${PopsType}-title" style="${headerStyle}">
4294
- ${config.title.html
4238
+ ? /*html*/ `
4239
+ <div class="pops-${PopsType}-title" style="${headerStyle}">${config.title.html
4295
4240
  ? config.title.text
4296
- : `<p
4297
- pops
4298
- style="
4299
- width: 100%;
4300
- text-align: ${config.title.position};
4301
- ${headerPStyle}">${config.title.text}</p>`}
4302
- ${headerBtnHTML}
4303
- </div>
4304
- `
4241
+ : /*html*/ `<p pops style="width: 100%;text-align: ${config.title.position};${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>`
4305
4242
  : ""}
4306
-
4307
- <div class="pops-${PopsType}-content" style="${contentStyle}">
4308
- ${config.content.html
4243
+ <div class="pops-${PopsType}-content" style="${contentStyle}">${config.content.html
4309
4244
  ? config.content.text
4310
- : `<p pops style="${contentPStyle}">${config.content.text}</p>`}
4311
- </div>
4312
-
4313
- ${bottomBtnHTML}
4314
- `, bottomBtnHTML, zIndex);
4245
+ : `<p pops style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
4315
4246
  /**
4316
4247
  * 弹窗的主元素,包括动画层
4317
4248
  */
@@ -4693,14 +4624,12 @@
4693
4624
  let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
4694
4625
  let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
4695
4626
  let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
4696
- let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config, `
4697
- <div class="pops-folder-title" style="text-align: ${config.title.position};${headerStyle}">
4698
- ${config.title.html
4627
+ let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
4628
+ /*html*/ `
4629
+ <div class="pops-folder-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
4699
4630
  ? config.title.text
4700
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
4701
- ${headerBtnHTML}
4702
- </div>
4703
- <div class="pops-folder-content ${pops.isPhone() ? "pops-mobile-folder-content" : ""}">
4631
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
4632
+ <div class="pops-folder-content ${pops.isPhone() ? "pops-mobile-folder-content" : ""}">
4704
4633
  <div class="pops-folder-list">
4705
4634
  <div class="pops-folder-file-list-breadcrumb">
4706
4635
  <div class="pops-folder-file-list-breadcrumb-primary">
@@ -4712,7 +4641,6 @@
4712
4641
  <div class="pops-folder-list-table__header-div">
4713
4642
  <table class="pops-folder-list-table__header">
4714
4643
  <colgroup>
4715
- <!-- <col width="8%"> --!>
4716
4644
  <col width="52%">
4717
4645
  <col width="24%">
4718
4646
  <col width="16%">
@@ -4783,7 +4711,6 @@
4783
4711
  <div class="pops-folder-list-table__body-div">
4784
4712
  <table class="pops-folder-list-table__body">
4785
4713
  <colgroup>
4786
- <!-- <col width="8%"> --!>
4787
4714
  ${pops.isPhone()
4788
4715
  ? `<col width="100%">`
4789
4716
  : `
@@ -4798,9 +4725,7 @@
4798
4725
  </table>
4799
4726
  </div>
4800
4727
  </div>
4801
- </div>
4802
- ${bottomBtnHTML}
4803
- `, bottomBtnHTML, zIndex);
4728
+ </div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
4804
4729
  /**
4805
4730
  * 弹窗的主元素,包括动画层
4806
4731
  */
@@ -4981,9 +4906,7 @@
4981
4906
  <div class="pops-folder-list-file-name pops-mobile-folder-list-file-name cursor-p">
4982
4907
  <img src="${fileIcon}" alt="${fileType}" class="pops-folder-list-file-icon u-file-icon u-file-icon--list">
4983
4908
  <div>
4984
- <a title="${fileName}" class="pops-folder-list-file-name-title-text inline-block-v-middle text-ellip list-name-text">
4985
- ${fileName}
4986
- </a>
4909
+ <a title="${fileName}" class="pops-folder-list-file-name-title-text inline-block-v-middle text-ellip list-name-text">${fileName}</a>
4987
4910
  <span>${latestTime} ${fileSize}</span>
4988
4911
  </div>
4989
4912
  </div>
@@ -6126,9 +6049,7 @@
6126
6049
  PopsSafeUtils.setSafeHTML(liElement,
6127
6050
  /*html*/ `
6128
6051
  <div class="pops-panel-item-left-text">
6129
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
6130
- ${leftDescriptionText}
6131
- </div>
6052
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
6132
6053
  <div class="pops-panel-switch">
6133
6054
  <input class="pops-panel-switch__input" type="checkbox">
6134
6055
  <span class="pops-panel-switch__core">
@@ -6228,9 +6149,7 @@
6228
6149
  PopsSafeUtils.setSafeHTML(liElement,
6229
6150
  /*html*/ `
6230
6151
  <div class="pops-panel-item-left-text">
6231
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
6232
- ${leftDescriptionText}
6233
- </div>
6152
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
6234
6153
  <div class="pops-panel-slider">
6235
6154
  <input type="range" min="${formConfig.min}" max="${formConfig.max}">
6236
6155
  </div>
@@ -6293,9 +6212,7 @@
6293
6212
  PopsSafeUtils.setSafeHTML(liElement,
6294
6213
  /*html*/ `
6295
6214
  <div class="pops-panel-item-left-text" style="flex: 1;">
6296
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
6297
- ${leftDescriptionText}
6298
- </div>
6215
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
6299
6216
  <div class="pops-slider pops-slider-width">
6300
6217
  <div class="pops-slider__runway">
6301
6218
  <div class="pops-slider__bar" style="width: 0%; left: 0%"></div>
@@ -6856,9 +6773,7 @@
6856
6773
  PopsSafeUtils.setSafeHTML(liElement,
6857
6774
  /*html*/ `
6858
6775
  <div class="pops-panel-item-left-text">
6859
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
6860
- ${leftDescriptionText}
6861
- </div>
6776
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
6862
6777
  <div class="pops-panel-input pops-user-select-none">
6863
6778
  <input type="${inputType}" placeholder="${formConfig.placeholder}">
6864
6779
  </div>
@@ -7053,12 +6968,9 @@
7053
6968
  PopsSafeUtils.setSafeHTML(liElement,
7054
6969
  /*html*/ `
7055
6970
  <div class="pops-panel-item-left-text">
7056
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
7057
- ${leftDescriptionText}
7058
- </div>
6971
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
7059
6972
  <div class="pops-panel-textarea">
7060
- <textarea placeholder="${formConfig.placeholder ?? ""}">
7061
- </textarea>
6973
+ <textarea placeholder="${formConfig.placeholder ?? ""}"></textarea>
7062
6974
  </div>
7063
6975
  `);
7064
6976
  const PopsPanelTextArea = {
@@ -7128,9 +7040,7 @@
7128
7040
  PopsSafeUtils.setSafeHTML(liElement,
7129
7041
  /*html*/ `
7130
7042
  <div class="pops-panel-item-left-text">
7131
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
7132
- ${leftDescriptionText}
7133
- </div>
7043
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
7134
7044
  <div class="pops-panel-select pops-user-select-none">
7135
7045
  <select></select>
7136
7046
  </div>
@@ -7324,9 +7234,7 @@
7324
7234
  PopsSafeUtils.setSafeHTML(liElement,
7325
7235
  /*html*/ `
7326
7236
  <div class="pops-panel-item-left-text">
7327
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
7328
- ${leftDescriptionText}
7329
- </div>
7237
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
7330
7238
  <div class="pops-panel-select-multiple">
7331
7239
  <div class="el-select__wrapper">
7332
7240
  <div class="el-select__selection">
@@ -7619,9 +7527,7 @@
7619
7527
  function createSelectItemElement(dataInfo) {
7620
7528
  let $item = popsDOMUtils.createElement("li", {
7621
7529
  className: "select-item",
7622
- innerHTML: /*html*/ `
7623
- <span>${dataInfo.text}</span>
7624
- `,
7530
+ innerHTML: /*html*/ `<span>${dataInfo.text}</span>`,
7625
7531
  });
7626
7532
  Reflect.set($item, "data-info", dataInfo);
7627
7533
  return $item;
@@ -7883,9 +7789,7 @@
7883
7789
  PopsSafeUtils.setSafeHTML(liElement,
7884
7790
  /*html*/ `
7885
7791
  <div class="pops-panel-item-left-text">
7886
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
7887
- ${leftDescriptionText}
7888
- </div>
7792
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
7889
7793
  <div class="pops-panel-button">
7890
7794
  <button class="pops-panel-button_inner">
7891
7795
  <i class="pops-bottom-icon"></i>
@@ -8050,13 +7954,8 @@
8050
7954
  PopsSafeUtils.setSafeHTML($li,
8051
7955
  /*html*/ `
8052
7956
  <div class="pops-panel-item-left-text">
8053
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
8054
- ${leftDescriptionText}
8055
- </div>
8056
- <div class="pops-panel-deepMenu">
8057
- ${rightText}
8058
- ${arrowRightIconHTML}
8059
- </div>
7957
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
7958
+ <div class="pops-panel-deepMenu">${rightText}${arrowRightIconHTML}</div>
8060
7959
  `);
8061
7960
  const PopsPanelDeepMenu = {
8062
7961
  [Symbol.toStringTag]: "PopsPanelDeepMenu",
@@ -8439,15 +8338,9 @@
8439
8338
  let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
8440
8339
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
8441
8340
  /*html*/ `
8442
- <div
8443
- class="pops-${PopsType}-title"
8444
- style="text-align: ${config.title.position};
8445
- ${headerStyle}">
8446
- ${config.title.html
8341
+ <div class="pops-${PopsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
8447
8342
  ? config.title.text
8448
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
8449
- ${headerBtnHTML}
8450
- </div>
8343
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
8451
8344
  <div class="pops-${PopsType}-content">
8452
8345
  <aside class="pops-${PopsType}-aside">
8453
8346
  <ul></ul>
@@ -8992,7 +8885,8 @@
8992
8885
  /* 判断有无图标,有就添加进去 */
8993
8886
  if (typeof item.icon === "string" && item.icon.trim() !== "") {
8994
8887
  let iconSVGHTML = pops.config.iconSVG[item.icon] ?? item.icon;
8995
- let iconElement = popsUtils.parseTextToDOM(`<i class="pops-${PopsType}-icon" is-loading="${item.iconIsLoading}">${iconSVGHTML}</i>`);
8888
+ let iconElement = popsUtils.parseTextToDOM(
8889
+ /*html*/ `<i class="pops-${PopsType}-icon" is-loading="${item.iconIsLoading}">${iconSVGHTML}</i>`);
8996
8890
  menuLiElement.appendChild(iconElement);
8997
8891
  }
8998
8892
  /* 插入文字 */
@@ -9009,7 +8903,9 @@
9009
8903
  return;
9010
8904
  }
9011
8905
  function removeElement(element) {
9012
- element.querySelectorAll("ul li").forEach((ele) => {
8906
+ element
8907
+ .querySelectorAll("ul li")
8908
+ .forEach((ele) => {
9013
8909
  if (ele?.__menuData__?.child) {
9014
8910
  removeElement(ele.__menuData__.child);
9015
8911
  }
@@ -9226,9 +9122,7 @@
9226
9122
  <style data-dynamic="true">
9227
9123
  ${this.getDynamicCSS()}
9228
9124
  </style>
9229
- <ul class="pops-${PopsType}-search-suggestion-hint">
9230
- ${config.toSearhNotResultHTML}
9231
- </ul>
9125
+ <ul class="pops-${PopsType}-search-suggestion-hint">${config.toSearhNotResultHTML}</ul>
9232
9126
  `,
9233
9127
  }, {
9234
9128
  "data-guid": guid,
@@ -9307,12 +9201,7 @@
9307
9201
  className: `pops-${PopsType}-search-suggestion-hint-item pops-flex-items-center pops-flex-y-center`,
9308
9202
  "data-index": index,
9309
9203
  "data-value": SearchSuggestion.getItemDataValue(data),
9310
- innerHTML: `
9311
- ${config.getItemHTML(data)}
9312
- ${config.deleteIcon.enable
9313
- ? SearchSuggestion.getDeleteIconHTML()
9314
- : ""}
9315
- `,
9204
+ innerHTML: `${config.getItemHTML(data)}${config.deleteIcon.enable ? SearchSuggestion.getDeleteIconHTML() : ""}`,
9316
9205
  });
9317
9206
  },
9318
9207
  /**
@@ -10195,7 +10084,7 @@
10195
10084
  /** 配置 */
10196
10085
  config = {
10197
10086
  /** 版本号 */
10198
- version: "2025.3.2",
10087
+ version: "2025.5.12",
10199
10088
  cssText: {
10200
10089
  /** 主CSS */
10201
10090
  index: indexCSS,