@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
@@ -1222,30 +1222,32 @@ var pops = (function () {
1222
1222
  if (element == null) {
1223
1223
  return;
1224
1224
  }
1225
+ let setStyleProperty = (propertyName, propertyValue) => {
1226
+ if (typeof propertyValue === "string" &&
1227
+ propertyValue.trim().endsWith("!important")) {
1228
+ propertyValue = propertyValue
1229
+ .trim()
1230
+ .replace(/!important$/gi, "")
1231
+ .trim();
1232
+ element.style.setProperty(propertyName, propertyValue, "important");
1233
+ }
1234
+ else {
1235
+ propertyValue = handlePixe(propertyName, propertyValue);
1236
+ element.style.setProperty(propertyName, propertyValue);
1237
+ }
1238
+ };
1225
1239
  if (typeof property === "string") {
1226
1240
  if (value == null) {
1227
1241
  return getComputedStyle(element).getPropertyValue(property);
1228
1242
  }
1229
1243
  else {
1230
- if (value === "string" && value.includes("!important")) {
1231
- element.style.setProperty(property, value, "important");
1232
- }
1233
- else {
1234
- value = handlePixe(property, value);
1235
- element.style.setProperty(property, value);
1236
- }
1244
+ setStyleProperty(property, value);
1237
1245
  }
1238
1246
  }
1239
1247
  else if (typeof property === "object") {
1240
1248
  for (let prop in property) {
1241
- if (typeof property[prop] === "string" &&
1242
- property[prop].includes("!important")) {
1243
- element.style.setProperty(prop, property[prop], "important");
1244
- }
1245
- else {
1246
- property[prop] = handlePixe(prop, property[prop]);
1247
- element.style.setProperty(prop, property[prop]);
1248
- }
1249
+ let value = property[prop];
1250
+ setStyleProperty(prop, value);
1249
1251
  }
1250
1252
  }
1251
1253
  }
@@ -1904,31 +1906,37 @@ var pops = (function () {
1904
1906
  * @param maskElement
1905
1907
  */
1906
1908
  hide(popsType, layerConfigList, guid, config, animElement, maskElement) {
1907
- let popsElement = animElement.querySelector(".pops[type-value]");
1908
- if (popsType === "drawer") {
1909
- let drawerConfig = config;
1910
- setTimeout(() => {
1911
- maskElement.style.setProperty("display", "none");
1912
- if (["top", "bottom"].includes(drawerConfig.direction)) {
1913
- popsElement.style.setProperty("height", "0");
1914
- }
1915
- else if (["left", "right"].includes(drawerConfig.direction)) {
1916
- popsElement.style.setProperty("width", "0");
1917
- }
1918
- else {
1919
- console.error("未知direction:", drawerConfig.direction);
1920
- }
1921
- }, drawerConfig.closeDelay);
1922
- }
1923
- else {
1924
- layerConfigList.forEach((layerConfigItem) => {
1925
- if (layerConfigItem.guid === guid) {
1909
+ return new Promise((resolve) => {
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
+ resolve();
1925
+ }, drawerConfig.closeDelay);
1926
+ }
1927
+ else {
1928
+ let findLayerIns = layerConfigList.find((layerConfigItem) => layerConfigItem.guid === guid);
1929
+ if (findLayerIns) {
1926
1930
  /* 存在动画 */
1931
+ let layerConfigItem = findLayerIns;
1927
1932
  layerConfigItem.animElement.style.width = "100%";
1928
1933
  layerConfigItem.animElement.style.height = "100%";
1929
1934
  layerConfigItem.animElement.style["animation-name"] =
1930
1935
  layerConfigItem.animElement.getAttribute("anim") + "-reverse";
1931
1936
  if (pops.config.animation.hasOwnProperty(layerConfigItem.animElement.style["animation-name"])) {
1937
+ /**
1938
+ * 动画结束的回调
1939
+ */
1932
1940
  function animationendCallBack() {
1933
1941
  layerConfigItem.animElement.style.display = "none";
1934
1942
  if (layerConfigItem.maskElement) {
@@ -1937,6 +1945,7 @@ var pops = (function () {
1937
1945
  popsDOMUtils.off(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
1938
1946
  capture: true,
1939
1947
  });
1948
+ resolve();
1940
1949
  }
1941
1950
  popsDOMUtils.on(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
1942
1951
  capture: true,
@@ -1947,11 +1956,11 @@ var pops = (function () {
1947
1956
  if (layerConfigItem.maskElement) {
1948
1957
  layerConfigItem.maskElement.style.display = "none";
1949
1958
  }
1959
+ resolve();
1950
1960
  }
1951
- return;
1952
1961
  }
1953
- });
1954
- }
1962
+ }
1963
+ });
1955
1964
  },
1956
1965
  /**
1957
1966
  * 显示
@@ -1963,27 +1972,30 @@ var pops = (function () {
1963
1972
  * @param maskElement
1964
1973
  */
1965
1974
  show(popsType, layerConfigList, guid, config, animElement, maskElement) {
1966
- let popsElement = animElement.querySelector(".pops[type-value]");
1967
- if (popsType === "drawer") {
1968
- let drawerConfig = config;
1969
- setTimeout(() => {
1970
- maskElement.style.setProperty("display", "");
1971
- let direction = drawerConfig.direction;
1972
- let size = drawerConfig.size.toString();
1973
- if (["top", "bottom"].includes(direction)) {
1974
- popsElement.style.setProperty("height", size);
1975
- }
1976
- else if (["left", "right"].includes(direction)) {
1977
- popsElement.style.setProperty("width", size);
1978
- }
1979
- else {
1980
- console.error("未知direction:", direction);
1981
- }
1982
- }, drawerConfig.openDelay);
1983
- }
1984
- else {
1985
- layerConfigList.forEach((layerConfigItem) => {
1986
- if (layerConfigItem.guid === guid) {
1975
+ return new Promise((resolve) => {
1976
+ let popsElement = animElement.querySelector(".pops[type-value]");
1977
+ if (popsType === "drawer") {
1978
+ let drawerConfig = config;
1979
+ setTimeout(() => {
1980
+ popsDOMUtils.css(maskElement, "display", "");
1981
+ let direction = drawerConfig.direction;
1982
+ let size = drawerConfig.size.toString();
1983
+ if (["top", "bottom"].includes(direction)) {
1984
+ popsElement.style.setProperty("height", size);
1985
+ }
1986
+ else if (["left", "right"].includes(direction)) {
1987
+ popsElement.style.setProperty("width", size);
1988
+ }
1989
+ else {
1990
+ console.error("未知direction:", direction);
1991
+ }
1992
+ resolve();
1993
+ }, drawerConfig.openDelay);
1994
+ }
1995
+ else {
1996
+ let findLayerIns = layerConfigList.find((layerConfigItem) => layerConfigItem.guid === guid);
1997
+ if (findLayerIns) {
1998
+ let layerConfigItem = findLayerIns;
1987
1999
  layerConfigItem.animElement.style.width = "";
1988
2000
  layerConfigItem.animElement.style.height = "";
1989
2001
  layerConfigItem.animElement.style["animation-name"] =
@@ -1991,14 +2003,18 @@ var pops = (function () {
1991
2003
  .animElement.getAttribute("anim")
1992
2004
  .replace("-reverse", "");
1993
2005
  if (pops.config.animation.hasOwnProperty(layerConfigItem.animElement.style["animation-name"])) {
1994
- layerConfigItem.animElement.style.display = "";
1995
- if (layerConfigItem.maskElement) {
1996
- layerConfigItem.maskElement.style.display = "";
1997
- }
2006
+ /**
2007
+ * 动画结束的回调
2008
+ */
1998
2009
  function animationendCallBack() {
1999
2010
  popsDOMUtils.off(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
2000
2011
  capture: true,
2001
2012
  });
2013
+ resolve();
2014
+ }
2015
+ layerConfigItem.animElement.style.display = "";
2016
+ if (layerConfigItem.maskElement) {
2017
+ layerConfigItem.maskElement.style.display = "";
2002
2018
  }
2003
2019
  popsDOMUtils.on(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
2004
2020
  capture: true,
@@ -2009,11 +2025,11 @@ var pops = (function () {
2009
2025
  if (layerConfigItem.maskElement) {
2010
2026
  layerConfigItem.maskElement.style.display = "";
2011
2027
  }
2028
+ resolve();
2012
2029
  }
2013
2030
  }
2014
- return;
2015
- });
2016
- }
2031
+ }
2032
+ });
2017
2033
  },
2018
2034
  /**
2019
2035
  * 关闭
@@ -2024,50 +2040,57 @@ var pops = (function () {
2024
2040
  * @param animElement
2025
2041
  */
2026
2042
  close(popsType, layerConfigList, guid, config, animElement) {
2027
- let popsElement = animElement.querySelector(".pops[type-value]");
2028
- let drawerConfig = config;
2029
- /**
2030
- * 动画结束事件
2031
- */
2032
- function transitionendEvent() {
2033
- function closeCallBack(event) {
2034
- if (event.propertyName !== "transform") {
2043
+ return new Promise((resolve) => {
2044
+ let popsElement = animElement.querySelector(".pops[type-value]");
2045
+ let drawerConfig = config;
2046
+ /**
2047
+ * 动画结束事件
2048
+ */
2049
+ function transitionendEvent() {
2050
+ /**
2051
+ * 弹窗已关闭的回调
2052
+ */
2053
+ function closeCallBack(event) {
2054
+ if (event.propertyName !== "transform") {
2055
+ return;
2056
+ }
2057
+ popsDOMUtils.off(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, closeCallBack);
2058
+ PopsInstanceUtils.removeInstance([layerConfigList], guid);
2059
+ resolve();
2060
+ }
2061
+ /* 监听过渡结束 */
2062
+ popsDOMUtils.on(popsElement, popsDOMUtils.getTransitionEndNameList(), closeCallBack);
2063
+ let popsTransForm = getComputedStyle(popsElement).transform;
2064
+ if (popsTransForm !== "none") {
2065
+ popsDOMUtils.trigger(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, true);
2035
2066
  return;
2036
2067
  }
2037
- popsDOMUtils.off(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, closeCallBack);
2038
- PopsInstanceUtils.removeInstance([layerConfigList], guid);
2039
- }
2040
- /* 监听过渡结束 */
2041
- popsDOMUtils.on(popsElement, popsDOMUtils.getTransitionEndNameList(), closeCallBack);
2042
- let popsTransForm = getComputedStyle(popsElement).transform;
2043
- if (popsTransForm !== "none") {
2044
- popsDOMUtils.trigger(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, true);
2045
- return;
2046
- }
2047
- if (["top"].includes(drawerConfig.direction)) {
2048
- popsElement.style.setProperty("transform", "translateY(-100%)");
2049
- }
2050
- else if (["bottom"].includes(drawerConfig.direction)) {
2051
- popsElement.style.setProperty("transform", "translateY(100%)");
2052
- }
2053
- else if (["left"].includes(drawerConfig.direction)) {
2054
- popsElement.style.setProperty("transform", "translateX(-100%)");
2068
+ if (["top"].includes(drawerConfig.direction)) {
2069
+ popsElement.style.setProperty("transform", "translateY(-100%)");
2070
+ }
2071
+ else if (["bottom"].includes(drawerConfig.direction)) {
2072
+ popsElement.style.setProperty("transform", "translateY(100%)");
2073
+ }
2074
+ else if (["left"].includes(drawerConfig.direction)) {
2075
+ popsElement.style.setProperty("transform", "translateX(-100%)");
2076
+ }
2077
+ else if (["right"].includes(drawerConfig.direction)) {
2078
+ popsElement.style.setProperty("transform", "translateX(100%)");
2079
+ }
2080
+ else {
2081
+ console.error("未知direction:", drawerConfig.direction);
2082
+ }
2055
2083
  }
2056
- else if (["right"].includes(drawerConfig.direction)) {
2057
- popsElement.style.setProperty("transform", "translateX(100%)");
2084
+ if (popsType === "drawer") {
2085
+ setTimeout(() => {
2086
+ transitionendEvent();
2087
+ }, drawerConfig.closeDelay);
2058
2088
  }
2059
2089
  else {
2060
- console.error("未知direction:", drawerConfig.direction);
2090
+ PopsInstanceUtils.removeInstance([layerConfigList], guid);
2091
+ resolve();
2061
2092
  }
2062
- }
2063
- if (popsType === "drawer") {
2064
- setTimeout(() => {
2065
- transitionendEvent();
2066
- }, drawerConfig.closeDelay);
2067
- }
2068
- else {
2069
- PopsInstanceUtils.removeInstance([layerConfigList], guid);
2070
- }
2093
+ });
2071
2094
  },
2072
2095
  /**
2073
2096
  * 拖拽元素
@@ -2472,7 +2495,7 @@ var pops = (function () {
2472
2495
  if (style.startsWith(";")) {
2473
2496
  style = style.replace(";", "");
2474
2497
  }
2475
- return `<div class="pops-mask" data-guid="${guid}" style="z-index:${zIndex};${style}"></div>`;
2498
+ return /*html*/ `<div class="pops-mask" data-guid="${guid}" style="z-index:${zIndex};${style}"></div>`;
2476
2499
  },
2477
2500
  /**
2478
2501
  * 获取动画层HTML
@@ -2500,23 +2523,10 @@ var pops = (function () {
2500
2523
  }
2501
2524
  let hasBottomBtn = bottomBtnHTML.trim() === "" ? false : true;
2502
2525
  return /*html*/ `
2503
- <div
2504
- class="pops-anim"
2505
- anim="${__config.animation || ""}"
2506
- style="${popsAnimStyle}"
2507
- data-guid="${guid}">
2508
- ${config.style != null
2526
+ <div class="pops-anim" anim="${__config.animation || ""}" style="${popsAnimStyle}" data-guid="${guid}">${config.style != null
2509
2527
  ? `<style tyle="text/css">${config.style}</style>`
2510
2528
  : ""}
2511
- <div
2512
- class="pops ${config.class || ""}"
2513
- data-bottom-btn="${hasBottomBtn}"
2514
- type-value="${type}"
2515
- style="${popsStyle}"
2516
- position="${popsPosition}"
2517
- data-guid="${guid}">
2518
- ${html}
2519
- </div>
2529
+ <div class="pops ${config.class || ""}" data-bottom-btn="${hasBottomBtn}" type-value="${type}" style="${popsStyle}" position="${popsPosition}" data-guid="${guid}">${html}</div>
2520
2530
  </div>`;
2521
2531
  },
2522
2532
  /**
@@ -2541,22 +2551,20 @@ var pops = (function () {
2541
2551
  let topRightButtonHTML = "";
2542
2552
  __config_iframe.topRightButton.split("|").forEach((item) => {
2543
2553
  item = item.toLowerCase();
2544
- topRightButtonHTML += `
2554
+ topRightButtonHTML += /*html*/ `
2545
2555
  <button class="pops-header-control" type="${item}">
2546
2556
  <i class="pops-icon">${pops.config.iconSVG[item]}</i>
2547
2557
  </button>`;
2548
2558
  });
2549
- resultHTML = `
2550
- <div class="pops-header-controls" data-margin>
2551
- ${topRightButtonHTML}
2552
- </div>`;
2559
+ resultHTML = /*html*/ `
2560
+ <div class="pops-header-controls" data-margin>${topRightButtonHTML}</div>`;
2553
2561
  }
2554
2562
  else {
2555
2563
  if (__config_confirm.btn?.close?.enable) {
2556
- closeHTML = `
2564
+ closeHTML = /*html*/ `
2557
2565
  <div class="pops-header-controls">
2558
2566
  <button class="pops-header-control" type="close" data-header>
2559
- <i class="pops-icon">${pops.config.iconSVG["close"]}</i>
2567
+ <i class="pops-icon">${pops.config.iconSVG["close"]}</i>
2560
2568
  </button>
2561
2569
  </div>`;
2562
2570
  }
@@ -2613,20 +2621,15 @@ var pops = (function () {
2613
2621
  iconHTML = okIcon;
2614
2622
  }
2615
2623
  iconHTML = iconHTML || "";
2616
- okIconHTML = `
2617
- <i class="pops-bottom-icon" is-loading="${config.btn.ok.iconIsLoading}">
2618
- ${iconHTML}
2619
- </i>`;
2624
+ okIconHTML = /*html*/ `<i class="pops-bottom-icon" is-loading="${config.btn.ok.iconIsLoading}">${iconHTML}</i>`;
2620
2625
  }
2621
- okHTML = `
2626
+ okHTML = /*html*/ `
2622
2627
  <button
2623
2628
  class="pops-${type}-btn-ok ${okButtonSizeClassName}"
2624
2629
  type="${__config_confirm.btn.ok?.type}"
2625
2630
  data-has-icon="${(__config_confirm.btn.ok.icon || "") !== ""}"
2626
2631
  data-rightIcon="${__config_confirm.btn.ok?.rightIcon}"
2627
- >
2628
- ${okIconHTML}
2629
- <span>${config.btn.ok.text}</span>
2632
+ >${okIconHTML}<span>${config.btn.ok.text}</span>
2630
2633
  </button>`;
2631
2634
  }
2632
2635
  if (__config_confirm.btn?.cancel?.enable) {
@@ -2652,20 +2655,15 @@ var pops = (function () {
2652
2655
  iconHTML = cancelIcon;
2653
2656
  }
2654
2657
  iconHTML = iconHTML || "";
2655
- cancelIconHTML = `
2656
- <i class="pops-bottom-icon" is-loading="${__config_confirm.btn.cancel.iconIsLoading}">
2657
- ${iconHTML}
2658
- </i>`;
2658
+ cancelIconHTML = /*html*/ `<i class="pops-bottom-icon" is-loading="${__config_confirm.btn.cancel.iconIsLoading}">${iconHTML}</i>`;
2659
2659
  }
2660
- cancelHTML = `
2660
+ cancelHTML = /*html*/ `
2661
2661
  <button
2662
2662
  class="pops-${type}-btn-cancel ${cancelButtonSizeClassName}"
2663
2663
  type="${__config_confirm.btn.cancel.type}"
2664
2664
  data-has-icon="${(__config_confirm.btn.cancel.icon || "") !== ""}"
2665
2665
  data-rightIcon="${__config_confirm.btn.cancel.rightIcon}"
2666
- >
2667
- ${cancelIconHTML}
2668
- <span>${__config_confirm.btn.cancel.text}</span>
2666
+ >${cancelIconHTML}<span>${__config_confirm.btn.cancel.text}</span>
2669
2667
  </button>`;
2670
2668
  }
2671
2669
  if (__config_confirm.btn?.other?.enable) {
@@ -2688,20 +2686,15 @@ var pops = (function () {
2688
2686
  iconHTML = pops.config.iconSVG[otherIcon];
2689
2687
  }
2690
2688
  iconHTML = iconHTML || "";
2691
- otherIconHTML = `
2692
- <i class="pops-bottom-icon" is-loading="${__config_confirm.btn.other.iconIsLoading}">
2693
- ${iconHTML}
2694
- </i>`;
2689
+ otherIconHTML = /*html*/ `<i class="pops-bottom-icon" is-loading="${__config_confirm.btn.other.iconIsLoading}">${iconHTML}</i>`;
2695
2690
  }
2696
- ohterHTML = `
2691
+ ohterHTML = /*html*/ `
2697
2692
  <button
2698
2693
  class="pops-${type}-btn-other ${otherButtonSizeClassName}"
2699
2694
  type="${__config_confirm.btn.other.type}"
2700
2695
  data-has-icon="${(__config_confirm.btn.other.icon || "") !== ""}"
2701
2696
  data-rightIcon="${__config_confirm.btn.other.rightIcon}"
2702
- >
2703
- ${otherIconHTML}
2704
- <span>${__config_confirm.btn.other.text}</span>
2697
+ >${otherIconHTML}<span>${__config_confirm.btn.other.text}</span>
2705
2698
  </button>`;
2706
2699
  }
2707
2700
  if (__config_confirm.btn.merge) {
@@ -2712,33 +2705,22 @@ var pops = (function () {
2712
2705
  else {
2713
2706
  flexStyle += "flex-direction: row;";
2714
2707
  }
2715
- resultHTML = `
2716
- <div class="pops-${type}-btn" style="${btnStyle}">
2717
- ${ohterHTML}
2718
- <div
2708
+ resultHTML = /*html*/ `
2709
+ <div class="pops-${type}-btn" style="${btnStyle}">${ohterHTML}<div
2719
2710
  class="pops-${type}-btn-merge"
2720
- style="${flexStyle}">
2721
- ${okHTML}
2722
- ${cancelHTML}
2723
- </div>
2711
+ style="${flexStyle}">${okHTML}${cancelHTML}</div>
2724
2712
  </div>
2725
2713
  `;
2726
2714
  }
2727
2715
  else {
2728
- resultHTML = `
2729
- <div class="pops-${type}-btn" style="${btnStyle}">
2730
- ${okHTML}
2731
- ${cancelHTML}
2732
- ${ohterHTML}
2733
- </div>
2734
- `;
2716
+ resultHTML = /*html*/ `<div class="pops-${type}-btn" style="${btnStyle}">${okHTML}${cancelHTML}${ohterHTML}</div>`;
2735
2717
  }
2736
2718
  return resultHTML;
2737
2719
  },
2738
2720
  /**
2739
2721
  * 获取标题style
2740
- * @param type
2741
- * @param config
2722
+ * @param type 弹窗类型
2723
+ * @param config 弹窗配置
2742
2724
  */
2743
2725
  getHeaderStyle(type, config) {
2744
2726
  return {
@@ -2748,8 +2730,8 @@ var pops = (function () {
2748
2730
  },
2749
2731
  /**
2750
2732
  * 获取内容style
2751
- * @param type
2752
- * @param config
2733
+ * @param type 弹窗类型
2734
+ * @param config 弹窗配置
2753
2735
  */
2754
2736
  getContentStyle(type, config) {
2755
2737
  return {
@@ -2837,11 +2819,11 @@ var pops = (function () {
2837
2819
  function originalRun() {
2838
2820
  if (details.config.mask.clickEvent.toClose) {
2839
2821
  /* 关闭 */
2840
- PopsInstanceUtils.close(details.type, targetLayer, details.guid, details.config, details.animElement);
2822
+ return PopsInstanceUtils.close(details.type, targetLayer, details.guid, details.config, details.animElement);
2841
2823
  }
2842
2824
  else if (details.config.mask.clickEvent.toHide) {
2843
2825
  /* 隐藏 */
2844
- PopsInstanceUtils.hide(details.type, targetLayer, details.guid, details.config, details.animElement, result.maskElement);
2826
+ return PopsInstanceUtils.hide(details.type, targetLayer, details.guid, details.config, details.animElement, result.maskElement);
2845
2827
  }
2846
2828
  }
2847
2829
  if (typeof details.config.mask.clickCallBack === "function") {
@@ -3020,13 +3002,13 @@ var pops = (function () {
3020
3002
  mode: mode,
3021
3003
  guid: guid,
3022
3004
  close() {
3023
- PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
3005
+ return PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
3024
3006
  },
3025
3007
  hide() {
3026
- PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3008
+ return PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3027
3009
  },
3028
3010
  show() {
3029
- PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3011
+ return PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3030
3012
  },
3031
3013
  };
3032
3014
  },
@@ -3048,13 +3030,13 @@ var pops = (function () {
3048
3030
  mode: mode,
3049
3031
  guid: guid,
3050
3032
  close() {
3051
- PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
3033
+ return PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
3052
3034
  },
3053
3035
  hide() {
3054
- PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3036
+ return PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3055
3037
  },
3056
3038
  show() {
3057
- PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3039
+ return PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
3058
3040
  },
3059
3041
  };
3060
3042
  },
@@ -3293,21 +3275,12 @@ var pops = (function () {
3293
3275
  let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
3294
3276
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
3295
3277
  /*html*/ `
3296
- <div
3297
- class="pops-alert-title"
3298
- style="text-align: ${config.title.position};
3299
- ${headerStyle}">
3300
- ${config.title.html
3278
+ <div class="pops-alert-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
3301
3279
  ? config.title.text
3302
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
3303
- ${headerBtnHTML}
3304
- </div>
3305
- <div class="pops-alert-content" style="${contentStyle}">
3306
- ${config.content.html
3280
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
3281
+ <div class="pops-alert-content" style="${contentStyle}">${config.content.html
3307
3282
  ? config.content.text
3308
- : `<p pops style="${contentPStyle}">${config.content.text}</p>`}
3309
- </div>
3310
- ${bottomBtnHTML}`, bottomBtnHTML, zIndex);
3283
+ : `<p pops style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
3311
3284
  /**
3312
3285
  * 弹窗的主元素,包括动画层
3313
3286
  */
@@ -3484,22 +3457,12 @@ var pops = (function () {
3484
3457
  let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
3485
3458
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
3486
3459
  /*html*/ `
3487
- <div class="pops-confirm-title" style="text-align: ${config.title.position};${headerStyle}">
3488
- ${config.title.html
3460
+ <div class="pops-confirm-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
3489
3461
  ? config.title.text
3490
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
3491
- ${headerBtnHTML}
3492
- </div>
3493
- <div class="pops-confirm-content" style="${contentStyle}">
3494
- ${config.content.html
3462
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
3463
+ <div class="pops-confirm-content" style="${contentStyle}">${config.content.html
3495
3464
  ? config.content.text
3496
- : `<p pops style="${contentPStyle}">${config.content.text}</p>`}
3497
-
3498
- </div>
3499
-
3500
-
3501
- ${bottomBtnHTML}
3502
- `, bottomBtnHTML, zIndex);
3465
+ : `<p pops style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
3503
3466
  /**
3504
3467
  * 弹窗的主元素,包括动画层
3505
3468
  */
@@ -3681,14 +3644,10 @@ var pops = (function () {
3681
3644
  let { contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
3682
3645
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
3683
3646
  /*html*/ `
3684
- <div class="pops-prompt-title" style="text-align: ${config.title.position};${headerStyle}">
3685
- ${config.title.html
3647
+ <div class="pops-prompt-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
3686
3648
  ? config.title.text
3687
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
3688
- ${headerBtnHTML}
3689
- </div>
3690
- <div class="pops-prompt-content" style="${contentPStyle}">
3691
- ${config.content.row
3649
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
3650
+ <div class="pops-prompt-content" style="${contentPStyle}">${config.content.row
3692
3651
  ? '<textarea pops="" placeholder="' +
3693
3652
  config.content.placeholder +
3694
3653
  '"></textarea>'
@@ -3696,10 +3655,7 @@ var pops = (function () {
3696
3655
  config.content.placeholder +
3697
3656
  '" type="' +
3698
3657
  (config.content.password ? "password" : "text") +
3699
- '">'}
3700
- </div>
3701
- ${bottomBtnHTML}
3702
- `, bottomBtnHTML, zIndex);
3658
+ '">'}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
3703
3659
  /**
3704
3660
  * 弹窗的主元素,包括动画层
3705
3661
  */
@@ -3812,9 +3768,8 @@ var pops = (function () {
3812
3768
  let { contentPStyle } = PopsElementHandler.getContentStyle("loading", config);
3813
3769
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
3814
3770
  /*html*/ `
3815
- <div class="pops-loading-content">
3816
- ${config.addIndexCSS
3817
- ? `
3771
+ <div class="pops-loading-content">${config.addIndexCSS
3772
+ ? /*html*/ `
3818
3773
  <style data-model-name="index">${pops.config.cssText.index}</style>
3819
3774
  <style data-model-name="anim">${pops.config.cssText.anim}</style>
3820
3775
  <style data-model-name="common">${pops.config.cssText.common}</style>
@@ -3824,9 +3779,8 @@ var pops = (function () {
3824
3779
  ${pops.config.cssText.loadingCSS}
3825
3780
  </style>
3826
3781
  ${config.style != null ? `<style>${config.style}</style>` : ""}
3827
- <p pops style="${contentPStyle}">${config.content.text}</p>
3828
- </div>
3829
- `, "", zIndex);
3782
+ <p pops style="${contentPStyle}">${config.content.text}</p>
3783
+ </div>`, "", zIndex);
3830
3784
  /**
3831
3785
  * 弹窗的主元素,包括动画层
3832
3786
  */
@@ -3850,6 +3804,9 @@ var pops = (function () {
3850
3804
  maskHTML: maskHTML,
3851
3805
  });
3852
3806
  $mask = _handleMask_.maskElement;
3807
+ // 遮罩层必须是跟随主内容
3808
+ // 即设置主内容position: relative,mask:position: absolute
3809
+ popsDOMUtils.css($mask, "position", "absolute !important");
3853
3810
  elementList.push($mask);
3854
3811
  }
3855
3812
  let eventDetails = PopsHandler.handleLoadingEventDetails(guid, PopsType, $anim, $pops, $mask, config);
@@ -3960,27 +3917,16 @@ var pops = (function () {
3960
3917
  let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
3961
3918
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
3962
3919
  /*html*/ `
3963
- <div
3964
- class="pops-iframe-title"
3965
- style="text-align: ${config.title.position};${headerStyle}"
3966
- >
3967
- ${config.title.html
3920
+ <div class="pops-iframe-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
3968
3921
  ? titleText
3969
- : `<p pops style="${headerPStyle}">${titleText}</p>`}
3970
- ${headerBtnHTML}
3971
- </div>
3972
- <div class="pops-iframe-content">
3922
+ : `<p pops style="${headerPStyle}">${titleText}</p>`}${headerBtnHTML}</div>
3923
+ <div class="pops-iframe-content">
3973
3924
  <div class="pops-iframe-content-global-loading"></div>
3974
- <iframe
3975
- src="${config.url}"
3976
- pops
3977
- ${config.sandbox
3925
+ <iframe src="${config.url}" pops ${config.sandbox
3978
3926
  ? "sandbox='allow-forms allow-same-origin allow-scripts'"
3979
3927
  : ""}>
3980
3928
  </iframe>
3981
- </div>
3982
- ${config.loading.enable ? iframeLoadingHTML : ""}
3983
- `, "", zIndex);
3929
+ </div>${config.loading.enable ? iframeLoadingHTML : ""}`, "", zIndex);
3984
3930
  /**
3985
3931
  * 弹窗的主元素,包括动画层
3986
3932
  */
@@ -4286,29 +4232,14 @@ var pops = (function () {
4286
4232
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
4287
4233
  /*html*/ `
4288
4234
  ${config.title.enable
4289
- ? `
4290
- <div class="pops-${PopsType}-title" style="${headerStyle}">
4291
- ${config.title.html
4235
+ ? /*html*/ `
4236
+ <div class="pops-${PopsType}-title" style="${headerStyle}">${config.title.html
4292
4237
  ? config.title.text
4293
- : `<p
4294
- pops
4295
- style="
4296
- width: 100%;
4297
- text-align: ${config.title.position};
4298
- ${headerPStyle}">${config.title.text}</p>`}
4299
- ${headerBtnHTML}
4300
- </div>
4301
- `
4238
+ : /*html*/ `<p pops style="width: 100%;text-align: ${config.title.position};${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>`
4302
4239
  : ""}
4303
-
4304
- <div class="pops-${PopsType}-content" style="${contentStyle}">
4305
- ${config.content.html
4240
+ <div class="pops-${PopsType}-content" style="${contentStyle}">${config.content.html
4306
4241
  ? config.content.text
4307
- : `<p pops style="${contentPStyle}">${config.content.text}</p>`}
4308
- </div>
4309
-
4310
- ${bottomBtnHTML}
4311
- `, bottomBtnHTML, zIndex);
4242
+ : `<p pops style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
4312
4243
  /**
4313
4244
  * 弹窗的主元素,包括动画层
4314
4245
  */
@@ -4690,14 +4621,12 @@ var pops = (function () {
4690
4621
  let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
4691
4622
  let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
4692
4623
  let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
4693
- let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config, `
4694
- <div class="pops-folder-title" style="text-align: ${config.title.position};${headerStyle}">
4695
- ${config.title.html
4624
+ let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
4625
+ /*html*/ `
4626
+ <div class="pops-folder-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
4696
4627
  ? config.title.text
4697
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
4698
- ${headerBtnHTML}
4699
- </div>
4700
- <div class="pops-folder-content ${pops.isPhone() ? "pops-mobile-folder-content" : ""}">
4628
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
4629
+ <div class="pops-folder-content ${pops.isPhone() ? "pops-mobile-folder-content" : ""}">
4701
4630
  <div class="pops-folder-list">
4702
4631
  <div class="pops-folder-file-list-breadcrumb">
4703
4632
  <div class="pops-folder-file-list-breadcrumb-primary">
@@ -4709,7 +4638,6 @@ var pops = (function () {
4709
4638
  <div class="pops-folder-list-table__header-div">
4710
4639
  <table class="pops-folder-list-table__header">
4711
4640
  <colgroup>
4712
- <!-- <col width="8%"> --!>
4713
4641
  <col width="52%">
4714
4642
  <col width="24%">
4715
4643
  <col width="16%">
@@ -4780,7 +4708,6 @@ var pops = (function () {
4780
4708
  <div class="pops-folder-list-table__body-div">
4781
4709
  <table class="pops-folder-list-table__body">
4782
4710
  <colgroup>
4783
- <!-- <col width="8%"> --!>
4784
4711
  ${pops.isPhone()
4785
4712
  ? `<col width="100%">`
4786
4713
  : `
@@ -4795,9 +4722,7 @@ var pops = (function () {
4795
4722
  </table>
4796
4723
  </div>
4797
4724
  </div>
4798
- </div>
4799
- ${bottomBtnHTML}
4800
- `, bottomBtnHTML, zIndex);
4725
+ </div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
4801
4726
  /**
4802
4727
  * 弹窗的主元素,包括动画层
4803
4728
  */
@@ -4978,9 +4903,7 @@ var pops = (function () {
4978
4903
  <div class="pops-folder-list-file-name pops-mobile-folder-list-file-name cursor-p">
4979
4904
  <img src="${fileIcon}" alt="${fileType}" class="pops-folder-list-file-icon u-file-icon u-file-icon--list">
4980
4905
  <div>
4981
- <a title="${fileName}" class="pops-folder-list-file-name-title-text inline-block-v-middle text-ellip list-name-text">
4982
- ${fileName}
4983
- </a>
4906
+ <a title="${fileName}" class="pops-folder-list-file-name-title-text inline-block-v-middle text-ellip list-name-text">${fileName}</a>
4984
4907
  <span>${latestTime} ${fileSize}</span>
4985
4908
  </div>
4986
4909
  </div>
@@ -6123,9 +6046,7 @@ var pops = (function () {
6123
6046
  PopsSafeUtils.setSafeHTML(liElement,
6124
6047
  /*html*/ `
6125
6048
  <div class="pops-panel-item-left-text">
6126
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
6127
- ${leftDescriptionText}
6128
- </div>
6049
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
6129
6050
  <div class="pops-panel-switch">
6130
6051
  <input class="pops-panel-switch__input" type="checkbox">
6131
6052
  <span class="pops-panel-switch__core">
@@ -6225,9 +6146,7 @@ var pops = (function () {
6225
6146
  PopsSafeUtils.setSafeHTML(liElement,
6226
6147
  /*html*/ `
6227
6148
  <div class="pops-panel-item-left-text">
6228
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
6229
- ${leftDescriptionText}
6230
- </div>
6149
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
6231
6150
  <div class="pops-panel-slider">
6232
6151
  <input type="range" min="${formConfig.min}" max="${formConfig.max}">
6233
6152
  </div>
@@ -6290,9 +6209,7 @@ var pops = (function () {
6290
6209
  PopsSafeUtils.setSafeHTML(liElement,
6291
6210
  /*html*/ `
6292
6211
  <div class="pops-panel-item-left-text" style="flex: 1;">
6293
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
6294
- ${leftDescriptionText}
6295
- </div>
6212
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
6296
6213
  <div class="pops-slider pops-slider-width">
6297
6214
  <div class="pops-slider__runway">
6298
6215
  <div class="pops-slider__bar" style="width: 0%; left: 0%"></div>
@@ -6853,9 +6770,7 @@ var pops = (function () {
6853
6770
  PopsSafeUtils.setSafeHTML(liElement,
6854
6771
  /*html*/ `
6855
6772
  <div class="pops-panel-item-left-text">
6856
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
6857
- ${leftDescriptionText}
6858
- </div>
6773
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
6859
6774
  <div class="pops-panel-input pops-user-select-none">
6860
6775
  <input type="${inputType}" placeholder="${formConfig.placeholder}">
6861
6776
  </div>
@@ -7050,12 +6965,9 @@ var pops = (function () {
7050
6965
  PopsSafeUtils.setSafeHTML(liElement,
7051
6966
  /*html*/ `
7052
6967
  <div class="pops-panel-item-left-text">
7053
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
7054
- ${leftDescriptionText}
7055
- </div>
6968
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
7056
6969
  <div class="pops-panel-textarea">
7057
- <textarea placeholder="${formConfig.placeholder ?? ""}">
7058
- </textarea>
6970
+ <textarea placeholder="${formConfig.placeholder ?? ""}"></textarea>
7059
6971
  </div>
7060
6972
  `);
7061
6973
  const PopsPanelTextArea = {
@@ -7125,9 +7037,7 @@ var pops = (function () {
7125
7037
  PopsSafeUtils.setSafeHTML(liElement,
7126
7038
  /*html*/ `
7127
7039
  <div class="pops-panel-item-left-text">
7128
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
7129
- ${leftDescriptionText}
7130
- </div>
7040
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
7131
7041
  <div class="pops-panel-select pops-user-select-none">
7132
7042
  <select></select>
7133
7043
  </div>
@@ -7321,9 +7231,7 @@ var pops = (function () {
7321
7231
  PopsSafeUtils.setSafeHTML(liElement,
7322
7232
  /*html*/ `
7323
7233
  <div class="pops-panel-item-left-text">
7324
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
7325
- ${leftDescriptionText}
7326
- </div>
7234
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
7327
7235
  <div class="pops-panel-select-multiple">
7328
7236
  <div class="el-select__wrapper">
7329
7237
  <div class="el-select__selection">
@@ -7616,9 +7524,7 @@ var pops = (function () {
7616
7524
  function createSelectItemElement(dataInfo) {
7617
7525
  let $item = popsDOMUtils.createElement("li", {
7618
7526
  className: "select-item",
7619
- innerHTML: /*html*/ `
7620
- <span>${dataInfo.text}</span>
7621
- `,
7527
+ innerHTML: /*html*/ `<span>${dataInfo.text}</span>`,
7622
7528
  });
7623
7529
  Reflect.set($item, "data-info", dataInfo);
7624
7530
  return $item;
@@ -7880,9 +7786,7 @@ var pops = (function () {
7880
7786
  PopsSafeUtils.setSafeHTML(liElement,
7881
7787
  /*html*/ `
7882
7788
  <div class="pops-panel-item-left-text">
7883
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
7884
- ${leftDescriptionText}
7885
- </div>
7789
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
7886
7790
  <div class="pops-panel-button">
7887
7791
  <button class="pops-panel-button_inner">
7888
7792
  <i class="pops-bottom-icon"></i>
@@ -8047,13 +7951,8 @@ var pops = (function () {
8047
7951
  PopsSafeUtils.setSafeHTML($li,
8048
7952
  /*html*/ `
8049
7953
  <div class="pops-panel-item-left-text">
8050
- <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
8051
- ${leftDescriptionText}
8052
- </div>
8053
- <div class="pops-panel-deepMenu">
8054
- ${rightText}
8055
- ${arrowRightIconHTML}
8056
- </div>
7954
+ <p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
7955
+ <div class="pops-panel-deepMenu">${rightText}${arrowRightIconHTML}</div>
8057
7956
  `);
8058
7957
  const PopsPanelDeepMenu = {
8059
7958
  [Symbol.toStringTag]: "PopsPanelDeepMenu",
@@ -8436,15 +8335,9 @@ var pops = (function () {
8436
8335
  let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
8437
8336
  let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
8438
8337
  /*html*/ `
8439
- <div
8440
- class="pops-${PopsType}-title"
8441
- style="text-align: ${config.title.position};
8442
- ${headerStyle}">
8443
- ${config.title.html
8338
+ <div class="pops-${PopsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
8444
8339
  ? config.title.text
8445
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`}
8446
- ${headerBtnHTML}
8447
- </div>
8340
+ : `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
8448
8341
  <div class="pops-${PopsType}-content">
8449
8342
  <aside class="pops-${PopsType}-aside">
8450
8343
  <ul></ul>
@@ -8989,7 +8882,8 @@ var pops = (function () {
8989
8882
  /* 判断有无图标,有就添加进去 */
8990
8883
  if (typeof item.icon === "string" && item.icon.trim() !== "") {
8991
8884
  let iconSVGHTML = pops.config.iconSVG[item.icon] ?? item.icon;
8992
- let iconElement = popsUtils.parseTextToDOM(`<i class="pops-${PopsType}-icon" is-loading="${item.iconIsLoading}">${iconSVGHTML}</i>`);
8885
+ let iconElement = popsUtils.parseTextToDOM(
8886
+ /*html*/ `<i class="pops-${PopsType}-icon" is-loading="${item.iconIsLoading}">${iconSVGHTML}</i>`);
8993
8887
  menuLiElement.appendChild(iconElement);
8994
8888
  }
8995
8889
  /* 插入文字 */
@@ -9006,7 +8900,9 @@ var pops = (function () {
9006
8900
  return;
9007
8901
  }
9008
8902
  function removeElement(element) {
9009
- element.querySelectorAll("ul li").forEach((ele) => {
8903
+ element
8904
+ .querySelectorAll("ul li")
8905
+ .forEach((ele) => {
9010
8906
  if (ele?.__menuData__?.child) {
9011
8907
  removeElement(ele.__menuData__.child);
9012
8908
  }
@@ -9223,9 +9119,7 @@ var pops = (function () {
9223
9119
  <style data-dynamic="true">
9224
9120
  ${this.getDynamicCSS()}
9225
9121
  </style>
9226
- <ul class="pops-${PopsType}-search-suggestion-hint">
9227
- ${config.toSearhNotResultHTML}
9228
- </ul>
9122
+ <ul class="pops-${PopsType}-search-suggestion-hint">${config.toSearhNotResultHTML}</ul>
9229
9123
  `,
9230
9124
  }, {
9231
9125
  "data-guid": guid,
@@ -9304,12 +9198,7 @@ var pops = (function () {
9304
9198
  className: `pops-${PopsType}-search-suggestion-hint-item pops-flex-items-center pops-flex-y-center`,
9305
9199
  "data-index": index,
9306
9200
  "data-value": SearchSuggestion.getItemDataValue(data),
9307
- innerHTML: `
9308
- ${config.getItemHTML(data)}
9309
- ${config.deleteIcon.enable
9310
- ? SearchSuggestion.getDeleteIconHTML()
9311
- : ""}
9312
- `,
9201
+ innerHTML: `${config.getItemHTML(data)}${config.deleteIcon.enable ? SearchSuggestion.getDeleteIconHTML() : ""}`,
9313
9202
  });
9314
9203
  },
9315
9204
  /**
@@ -10192,7 +10081,7 @@ var pops = (function () {
10192
10081
  /** 配置 */
10193
10082
  config = {
10194
10083
  /** 版本号 */
10195
- version: "2025.3.2",
10084
+ version: "2025.5.12",
10196
10085
  cssText: {
10197
10086
  /** 主CSS */
10198
10087
  index: indexCSS,