@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.
- package/dist/index.amd.js +217 -328
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +217 -328
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +217 -328
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +217 -328
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +217 -328
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +217 -328
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +3 -3
- package/dist/types/src/components/searchSuggestion/indexType.d.ts +1 -1
- package/dist/types/src/handler/PopsElementHandler.d.ts +4 -4
- package/dist/types/src/types/event.d.ts +3 -3
- package/dist/types/src/types/mask.d.ts +1 -1
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +3 -3
- package/package.json +1 -1
- package/src/Pops.ts +1 -1
- package/src/components/alert/index.ts +13 -20
- package/src/components/confirm/index.ts +10 -20
- package/src/components/drawer/index.ts +11 -26
- package/src/components/folder/index.ts +11 -20
- package/src/components/iframe/index.ts +14 -23
- package/src/components/loading/index.ts +10 -9
- package/src/components/panel/PanelHandleContentDetails.ts +14 -36
- package/src/components/panel/index.ts +7 -11
- package/src/components/prompt/index.ts +16 -23
- package/src/components/rightClickMenu/index.ts +9 -7
- package/src/components/searchSuggestion/index.ts +8 -13
- package/src/components/searchSuggestion/indexType.ts +1 -1
- package/src/handler/PopsElementHandler.ts +33 -72
- package/src/handler/PopsHandler.ts +9 -11
- package/src/types/event.d.ts +3 -3
- package/src/types/mask.d.ts +1 -1
- package/src/utils/PopsDOMUtils.ts +21 -19
- package/src/utils/PopsInstanceUtils.ts +120 -96
package/dist/index.esm.js
CHANGED
|
@@ -1219,30 +1219,32 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1219
1219
|
if (element == null) {
|
|
1220
1220
|
return;
|
|
1221
1221
|
}
|
|
1222
|
+
let setStyleProperty = (propertyName, propertyValue) => {
|
|
1223
|
+
if (typeof propertyValue === "string" &&
|
|
1224
|
+
propertyValue.trim().endsWith("!important")) {
|
|
1225
|
+
propertyValue = propertyValue
|
|
1226
|
+
.trim()
|
|
1227
|
+
.replace(/!important$/gi, "")
|
|
1228
|
+
.trim();
|
|
1229
|
+
element.style.setProperty(propertyName, propertyValue, "important");
|
|
1230
|
+
}
|
|
1231
|
+
else {
|
|
1232
|
+
propertyValue = handlePixe(propertyName, propertyValue);
|
|
1233
|
+
element.style.setProperty(propertyName, propertyValue);
|
|
1234
|
+
}
|
|
1235
|
+
};
|
|
1222
1236
|
if (typeof property === "string") {
|
|
1223
1237
|
if (value == null) {
|
|
1224
1238
|
return getComputedStyle(element).getPropertyValue(property);
|
|
1225
1239
|
}
|
|
1226
1240
|
else {
|
|
1227
|
-
|
|
1228
|
-
element.style.setProperty(property, value, "important");
|
|
1229
|
-
}
|
|
1230
|
-
else {
|
|
1231
|
-
value = handlePixe(property, value);
|
|
1232
|
-
element.style.setProperty(property, value);
|
|
1233
|
-
}
|
|
1241
|
+
setStyleProperty(property, value);
|
|
1234
1242
|
}
|
|
1235
1243
|
}
|
|
1236
1244
|
else if (typeof property === "object") {
|
|
1237
1245
|
for (let prop in property) {
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
element.style.setProperty(prop, property[prop], "important");
|
|
1241
|
-
}
|
|
1242
|
-
else {
|
|
1243
|
-
property[prop] = handlePixe(prop, property[prop]);
|
|
1244
|
-
element.style.setProperty(prop, property[prop]);
|
|
1245
|
-
}
|
|
1246
|
+
let value = property[prop];
|
|
1247
|
+
setStyleProperty(prop, value);
|
|
1246
1248
|
}
|
|
1247
1249
|
}
|
|
1248
1250
|
}
|
|
@@ -1901,31 +1903,37 @@ const PopsInstanceUtils = {
|
|
|
1901
1903
|
* @param maskElement
|
|
1902
1904
|
*/
|
|
1903
1905
|
hide(popsType, layerConfigList, guid, config, animElement, maskElement) {
|
|
1904
|
-
|
|
1905
|
-
|
|
1906
|
-
|
|
1907
|
-
|
|
1908
|
-
|
|
1909
|
-
|
|
1910
|
-
|
|
1911
|
-
|
|
1912
|
-
|
|
1913
|
-
|
|
1914
|
-
|
|
1915
|
-
|
|
1916
|
-
|
|
1917
|
-
|
|
1918
|
-
|
|
1919
|
-
|
|
1920
|
-
|
|
1921
|
-
|
|
1922
|
-
|
|
1906
|
+
return new Promise((resolve) => {
|
|
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
|
+
resolve();
|
|
1922
|
+
}, drawerConfig.closeDelay);
|
|
1923
|
+
}
|
|
1924
|
+
else {
|
|
1925
|
+
let findLayerIns = layerConfigList.find((layerConfigItem) => layerConfigItem.guid === guid);
|
|
1926
|
+
if (findLayerIns) {
|
|
1923
1927
|
/* 存在动画 */
|
|
1928
|
+
let layerConfigItem = findLayerIns;
|
|
1924
1929
|
layerConfigItem.animElement.style.width = "100%";
|
|
1925
1930
|
layerConfigItem.animElement.style.height = "100%";
|
|
1926
1931
|
layerConfigItem.animElement.style["animation-name"] =
|
|
1927
1932
|
layerConfigItem.animElement.getAttribute("anim") + "-reverse";
|
|
1928
1933
|
if (pops.config.animation.hasOwnProperty(layerConfigItem.animElement.style["animation-name"])) {
|
|
1934
|
+
/**
|
|
1935
|
+
* 动画结束的回调
|
|
1936
|
+
*/
|
|
1929
1937
|
function animationendCallBack() {
|
|
1930
1938
|
layerConfigItem.animElement.style.display = "none";
|
|
1931
1939
|
if (layerConfigItem.maskElement) {
|
|
@@ -1934,6 +1942,7 @@ const PopsInstanceUtils = {
|
|
|
1934
1942
|
popsDOMUtils.off(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
|
|
1935
1943
|
capture: true,
|
|
1936
1944
|
});
|
|
1945
|
+
resolve();
|
|
1937
1946
|
}
|
|
1938
1947
|
popsDOMUtils.on(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
|
|
1939
1948
|
capture: true,
|
|
@@ -1944,11 +1953,11 @@ const PopsInstanceUtils = {
|
|
|
1944
1953
|
if (layerConfigItem.maskElement) {
|
|
1945
1954
|
layerConfigItem.maskElement.style.display = "none";
|
|
1946
1955
|
}
|
|
1956
|
+
resolve();
|
|
1947
1957
|
}
|
|
1948
|
-
return;
|
|
1949
1958
|
}
|
|
1950
|
-
}
|
|
1951
|
-
}
|
|
1959
|
+
}
|
|
1960
|
+
});
|
|
1952
1961
|
},
|
|
1953
1962
|
/**
|
|
1954
1963
|
* 显示
|
|
@@ -1960,27 +1969,30 @@ const PopsInstanceUtils = {
|
|
|
1960
1969
|
* @param maskElement
|
|
1961
1970
|
*/
|
|
1962
1971
|
show(popsType, layerConfigList, guid, config, animElement, maskElement) {
|
|
1963
|
-
|
|
1964
|
-
|
|
1965
|
-
|
|
1966
|
-
|
|
1967
|
-
|
|
1968
|
-
|
|
1969
|
-
|
|
1970
|
-
|
|
1971
|
-
|
|
1972
|
-
|
|
1973
|
-
|
|
1974
|
-
|
|
1975
|
-
|
|
1976
|
-
|
|
1977
|
-
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
|
|
1981
|
-
|
|
1982
|
-
|
|
1983
|
-
|
|
1972
|
+
return new Promise((resolve) => {
|
|
1973
|
+
let popsElement = animElement.querySelector(".pops[type-value]");
|
|
1974
|
+
if (popsType === "drawer") {
|
|
1975
|
+
let drawerConfig = config;
|
|
1976
|
+
setTimeout(() => {
|
|
1977
|
+
popsDOMUtils.css(maskElement, "display", "");
|
|
1978
|
+
let direction = drawerConfig.direction;
|
|
1979
|
+
let size = drawerConfig.size.toString();
|
|
1980
|
+
if (["top", "bottom"].includes(direction)) {
|
|
1981
|
+
popsElement.style.setProperty("height", size);
|
|
1982
|
+
}
|
|
1983
|
+
else if (["left", "right"].includes(direction)) {
|
|
1984
|
+
popsElement.style.setProperty("width", size);
|
|
1985
|
+
}
|
|
1986
|
+
else {
|
|
1987
|
+
console.error("未知direction:", direction);
|
|
1988
|
+
}
|
|
1989
|
+
resolve();
|
|
1990
|
+
}, drawerConfig.openDelay);
|
|
1991
|
+
}
|
|
1992
|
+
else {
|
|
1993
|
+
let findLayerIns = layerConfigList.find((layerConfigItem) => layerConfigItem.guid === guid);
|
|
1994
|
+
if (findLayerIns) {
|
|
1995
|
+
let layerConfigItem = findLayerIns;
|
|
1984
1996
|
layerConfigItem.animElement.style.width = "";
|
|
1985
1997
|
layerConfigItem.animElement.style.height = "";
|
|
1986
1998
|
layerConfigItem.animElement.style["animation-name"] =
|
|
@@ -1988,14 +2000,18 @@ const PopsInstanceUtils = {
|
|
|
1988
2000
|
.animElement.getAttribute("anim")
|
|
1989
2001
|
.replace("-reverse", "");
|
|
1990
2002
|
if (pops.config.animation.hasOwnProperty(layerConfigItem.animElement.style["animation-name"])) {
|
|
1991
|
-
|
|
1992
|
-
|
|
1993
|
-
|
|
1994
|
-
}
|
|
2003
|
+
/**
|
|
2004
|
+
* 动画结束的回调
|
|
2005
|
+
*/
|
|
1995
2006
|
function animationendCallBack() {
|
|
1996
2007
|
popsDOMUtils.off(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
|
|
1997
2008
|
capture: true,
|
|
1998
2009
|
});
|
|
2010
|
+
resolve();
|
|
2011
|
+
}
|
|
2012
|
+
layerConfigItem.animElement.style.display = "";
|
|
2013
|
+
if (layerConfigItem.maskElement) {
|
|
2014
|
+
layerConfigItem.maskElement.style.display = "";
|
|
1999
2015
|
}
|
|
2000
2016
|
popsDOMUtils.on(layerConfigItem.animElement, popsDOMUtils.getAnimationEndNameList(), animationendCallBack, {
|
|
2001
2017
|
capture: true,
|
|
@@ -2006,11 +2022,11 @@ const PopsInstanceUtils = {
|
|
|
2006
2022
|
if (layerConfigItem.maskElement) {
|
|
2007
2023
|
layerConfigItem.maskElement.style.display = "";
|
|
2008
2024
|
}
|
|
2025
|
+
resolve();
|
|
2009
2026
|
}
|
|
2010
2027
|
}
|
|
2011
|
-
|
|
2012
|
-
|
|
2013
|
-
}
|
|
2028
|
+
}
|
|
2029
|
+
});
|
|
2014
2030
|
},
|
|
2015
2031
|
/**
|
|
2016
2032
|
* 关闭
|
|
@@ -2021,50 +2037,57 @@ const PopsInstanceUtils = {
|
|
|
2021
2037
|
* @param animElement
|
|
2022
2038
|
*/
|
|
2023
2039
|
close(popsType, layerConfigList, guid, config, animElement) {
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
function
|
|
2031
|
-
|
|
2040
|
+
return new Promise((resolve) => {
|
|
2041
|
+
let popsElement = animElement.querySelector(".pops[type-value]");
|
|
2042
|
+
let drawerConfig = config;
|
|
2043
|
+
/**
|
|
2044
|
+
* 动画结束事件
|
|
2045
|
+
*/
|
|
2046
|
+
function transitionendEvent() {
|
|
2047
|
+
/**
|
|
2048
|
+
* 弹窗已关闭的回调
|
|
2049
|
+
*/
|
|
2050
|
+
function closeCallBack(event) {
|
|
2051
|
+
if (event.propertyName !== "transform") {
|
|
2052
|
+
return;
|
|
2053
|
+
}
|
|
2054
|
+
popsDOMUtils.off(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, closeCallBack);
|
|
2055
|
+
PopsInstanceUtils.removeInstance([layerConfigList], guid);
|
|
2056
|
+
resolve();
|
|
2057
|
+
}
|
|
2058
|
+
/* 监听过渡结束 */
|
|
2059
|
+
popsDOMUtils.on(popsElement, popsDOMUtils.getTransitionEndNameList(), closeCallBack);
|
|
2060
|
+
let popsTransForm = getComputedStyle(popsElement).transform;
|
|
2061
|
+
if (popsTransForm !== "none") {
|
|
2062
|
+
popsDOMUtils.trigger(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, true);
|
|
2032
2063
|
return;
|
|
2033
2064
|
}
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
}
|
|
2050
|
-
else if (["left"].includes(drawerConfig.direction)) {
|
|
2051
|
-
popsElement.style.setProperty("transform", "translateX(-100%)");
|
|
2065
|
+
if (["top"].includes(drawerConfig.direction)) {
|
|
2066
|
+
popsElement.style.setProperty("transform", "translateY(-100%)");
|
|
2067
|
+
}
|
|
2068
|
+
else if (["bottom"].includes(drawerConfig.direction)) {
|
|
2069
|
+
popsElement.style.setProperty("transform", "translateY(100%)");
|
|
2070
|
+
}
|
|
2071
|
+
else if (["left"].includes(drawerConfig.direction)) {
|
|
2072
|
+
popsElement.style.setProperty("transform", "translateX(-100%)");
|
|
2073
|
+
}
|
|
2074
|
+
else if (["right"].includes(drawerConfig.direction)) {
|
|
2075
|
+
popsElement.style.setProperty("transform", "translateX(100%)");
|
|
2076
|
+
}
|
|
2077
|
+
else {
|
|
2078
|
+
console.error("未知direction:", drawerConfig.direction);
|
|
2079
|
+
}
|
|
2052
2080
|
}
|
|
2053
|
-
|
|
2054
|
-
|
|
2081
|
+
if (popsType === "drawer") {
|
|
2082
|
+
setTimeout(() => {
|
|
2083
|
+
transitionendEvent();
|
|
2084
|
+
}, drawerConfig.closeDelay);
|
|
2055
2085
|
}
|
|
2056
2086
|
else {
|
|
2057
|
-
|
|
2087
|
+
PopsInstanceUtils.removeInstance([layerConfigList], guid);
|
|
2088
|
+
resolve();
|
|
2058
2089
|
}
|
|
2059
|
-
}
|
|
2060
|
-
if (popsType === "drawer") {
|
|
2061
|
-
setTimeout(() => {
|
|
2062
|
-
transitionendEvent();
|
|
2063
|
-
}, drawerConfig.closeDelay);
|
|
2064
|
-
}
|
|
2065
|
-
else {
|
|
2066
|
-
PopsInstanceUtils.removeInstance([layerConfigList], guid);
|
|
2067
|
-
}
|
|
2090
|
+
});
|
|
2068
2091
|
},
|
|
2069
2092
|
/**
|
|
2070
2093
|
* 拖拽元素
|
|
@@ -2469,7 +2492,7 @@ const PopsElementHandler = {
|
|
|
2469
2492
|
if (style.startsWith(";")) {
|
|
2470
2493
|
style = style.replace(";", "");
|
|
2471
2494
|
}
|
|
2472
|
-
return `<div class="pops-mask" data-guid="${guid}" style="z-index:${zIndex};${style}"></div>`;
|
|
2495
|
+
return /*html*/ `<div class="pops-mask" data-guid="${guid}" style="z-index:${zIndex};${style}"></div>`;
|
|
2473
2496
|
},
|
|
2474
2497
|
/**
|
|
2475
2498
|
* 获取动画层HTML
|
|
@@ -2497,23 +2520,10 @@ const PopsElementHandler = {
|
|
|
2497
2520
|
}
|
|
2498
2521
|
let hasBottomBtn = bottomBtnHTML.trim() === "" ? false : true;
|
|
2499
2522
|
return /*html*/ `
|
|
2500
|
-
<div
|
|
2501
|
-
class="pops-anim"
|
|
2502
|
-
anim="${__config.animation || ""}"
|
|
2503
|
-
style="${popsAnimStyle}"
|
|
2504
|
-
data-guid="${guid}">
|
|
2505
|
-
${config.style != null
|
|
2523
|
+
<div class="pops-anim" anim="${__config.animation || ""}" style="${popsAnimStyle}" data-guid="${guid}">${config.style != null
|
|
2506
2524
|
? `<style tyle="text/css">${config.style}</style>`
|
|
2507
2525
|
: ""}
|
|
2508
|
-
<div
|
|
2509
|
-
class="pops ${config.class || ""}"
|
|
2510
|
-
data-bottom-btn="${hasBottomBtn}"
|
|
2511
|
-
type-value="${type}"
|
|
2512
|
-
style="${popsStyle}"
|
|
2513
|
-
position="${popsPosition}"
|
|
2514
|
-
data-guid="${guid}">
|
|
2515
|
-
${html}
|
|
2516
|
-
</div>
|
|
2526
|
+
<div class="pops ${config.class || ""}" data-bottom-btn="${hasBottomBtn}" type-value="${type}" style="${popsStyle}" position="${popsPosition}" data-guid="${guid}">${html}</div>
|
|
2517
2527
|
</div>`;
|
|
2518
2528
|
},
|
|
2519
2529
|
/**
|
|
@@ -2538,22 +2548,20 @@ const PopsElementHandler = {
|
|
|
2538
2548
|
let topRightButtonHTML = "";
|
|
2539
2549
|
__config_iframe.topRightButton.split("|").forEach((item) => {
|
|
2540
2550
|
item = item.toLowerCase();
|
|
2541
|
-
topRightButtonHTML += `
|
|
2551
|
+
topRightButtonHTML += /*html*/ `
|
|
2542
2552
|
<button class="pops-header-control" type="${item}">
|
|
2543
2553
|
<i class="pops-icon">${pops.config.iconSVG[item]}</i>
|
|
2544
2554
|
</button>`;
|
|
2545
2555
|
});
|
|
2546
|
-
resultHTML = `
|
|
2547
|
-
<div class="pops-header-controls" data-margin
|
|
2548
|
-
${topRightButtonHTML}
|
|
2549
|
-
</div>`;
|
|
2556
|
+
resultHTML = /*html*/ `
|
|
2557
|
+
<div class="pops-header-controls" data-margin>${topRightButtonHTML}</div>`;
|
|
2550
2558
|
}
|
|
2551
2559
|
else {
|
|
2552
2560
|
if (__config_confirm.btn?.close?.enable) {
|
|
2553
|
-
closeHTML = `
|
|
2561
|
+
closeHTML = /*html*/ `
|
|
2554
2562
|
<div class="pops-header-controls">
|
|
2555
2563
|
<button class="pops-header-control" type="close" data-header>
|
|
2556
|
-
|
|
2564
|
+
<i class="pops-icon">${pops.config.iconSVG["close"]}</i>
|
|
2557
2565
|
</button>
|
|
2558
2566
|
</div>`;
|
|
2559
2567
|
}
|
|
@@ -2610,20 +2618,15 @@ const PopsElementHandler = {
|
|
|
2610
2618
|
iconHTML = okIcon;
|
|
2611
2619
|
}
|
|
2612
2620
|
iconHTML = iconHTML || "";
|
|
2613
|
-
okIconHTML =
|
|
2614
|
-
<i class="pops-bottom-icon" is-loading="${config.btn.ok.iconIsLoading}">
|
|
2615
|
-
${iconHTML}
|
|
2616
|
-
</i>`;
|
|
2621
|
+
okIconHTML = /*html*/ `<i class="pops-bottom-icon" is-loading="${config.btn.ok.iconIsLoading}">${iconHTML}</i>`;
|
|
2617
2622
|
}
|
|
2618
|
-
okHTML = `
|
|
2623
|
+
okHTML = /*html*/ `
|
|
2619
2624
|
<button
|
|
2620
2625
|
class="pops-${type}-btn-ok ${okButtonSizeClassName}"
|
|
2621
2626
|
type="${__config_confirm.btn.ok?.type}"
|
|
2622
2627
|
data-has-icon="${(__config_confirm.btn.ok.icon || "") !== ""}"
|
|
2623
2628
|
data-rightIcon="${__config_confirm.btn.ok?.rightIcon}"
|
|
2624
|
-
>
|
|
2625
|
-
${okIconHTML}
|
|
2626
|
-
<span>${config.btn.ok.text}</span>
|
|
2629
|
+
>${okIconHTML}<span>${config.btn.ok.text}</span>
|
|
2627
2630
|
</button>`;
|
|
2628
2631
|
}
|
|
2629
2632
|
if (__config_confirm.btn?.cancel?.enable) {
|
|
@@ -2649,20 +2652,15 @@ const PopsElementHandler = {
|
|
|
2649
2652
|
iconHTML = cancelIcon;
|
|
2650
2653
|
}
|
|
2651
2654
|
iconHTML = iconHTML || "";
|
|
2652
|
-
cancelIconHTML =
|
|
2653
|
-
<i class="pops-bottom-icon" is-loading="${__config_confirm.btn.cancel.iconIsLoading}">
|
|
2654
|
-
${iconHTML}
|
|
2655
|
-
</i>`;
|
|
2655
|
+
cancelIconHTML = /*html*/ `<i class="pops-bottom-icon" is-loading="${__config_confirm.btn.cancel.iconIsLoading}">${iconHTML}</i>`;
|
|
2656
2656
|
}
|
|
2657
|
-
cancelHTML = `
|
|
2657
|
+
cancelHTML = /*html*/ `
|
|
2658
2658
|
<button
|
|
2659
2659
|
class="pops-${type}-btn-cancel ${cancelButtonSizeClassName}"
|
|
2660
2660
|
type="${__config_confirm.btn.cancel.type}"
|
|
2661
2661
|
data-has-icon="${(__config_confirm.btn.cancel.icon || "") !== ""}"
|
|
2662
2662
|
data-rightIcon="${__config_confirm.btn.cancel.rightIcon}"
|
|
2663
|
-
>
|
|
2664
|
-
${cancelIconHTML}
|
|
2665
|
-
<span>${__config_confirm.btn.cancel.text}</span>
|
|
2663
|
+
>${cancelIconHTML}<span>${__config_confirm.btn.cancel.text}</span>
|
|
2666
2664
|
</button>`;
|
|
2667
2665
|
}
|
|
2668
2666
|
if (__config_confirm.btn?.other?.enable) {
|
|
@@ -2685,20 +2683,15 @@ const PopsElementHandler = {
|
|
|
2685
2683
|
iconHTML = pops.config.iconSVG[otherIcon];
|
|
2686
2684
|
}
|
|
2687
2685
|
iconHTML = iconHTML || "";
|
|
2688
|
-
otherIconHTML =
|
|
2689
|
-
<i class="pops-bottom-icon" is-loading="${__config_confirm.btn.other.iconIsLoading}">
|
|
2690
|
-
${iconHTML}
|
|
2691
|
-
</i>`;
|
|
2686
|
+
otherIconHTML = /*html*/ `<i class="pops-bottom-icon" is-loading="${__config_confirm.btn.other.iconIsLoading}">${iconHTML}</i>`;
|
|
2692
2687
|
}
|
|
2693
|
-
ohterHTML = `
|
|
2688
|
+
ohterHTML = /*html*/ `
|
|
2694
2689
|
<button
|
|
2695
2690
|
class="pops-${type}-btn-other ${otherButtonSizeClassName}"
|
|
2696
2691
|
type="${__config_confirm.btn.other.type}"
|
|
2697
2692
|
data-has-icon="${(__config_confirm.btn.other.icon || "") !== ""}"
|
|
2698
2693
|
data-rightIcon="${__config_confirm.btn.other.rightIcon}"
|
|
2699
|
-
>
|
|
2700
|
-
${otherIconHTML}
|
|
2701
|
-
<span>${__config_confirm.btn.other.text}</span>
|
|
2694
|
+
>${otherIconHTML}<span>${__config_confirm.btn.other.text}</span>
|
|
2702
2695
|
</button>`;
|
|
2703
2696
|
}
|
|
2704
2697
|
if (__config_confirm.btn.merge) {
|
|
@@ -2709,33 +2702,22 @@ const PopsElementHandler = {
|
|
|
2709
2702
|
else {
|
|
2710
2703
|
flexStyle += "flex-direction: row;";
|
|
2711
2704
|
}
|
|
2712
|
-
resultHTML = `
|
|
2713
|
-
<div class="pops-${type}-btn" style="${btnStyle}"
|
|
2714
|
-
${ohterHTML}
|
|
2715
|
-
<div
|
|
2705
|
+
resultHTML = /*html*/ `
|
|
2706
|
+
<div class="pops-${type}-btn" style="${btnStyle}">${ohterHTML}<div
|
|
2716
2707
|
class="pops-${type}-btn-merge"
|
|
2717
|
-
style="${flexStyle}">
|
|
2718
|
-
${okHTML}
|
|
2719
|
-
${cancelHTML}
|
|
2720
|
-
</div>
|
|
2708
|
+
style="${flexStyle}">${okHTML}${cancelHTML}</div>
|
|
2721
2709
|
</div>
|
|
2722
2710
|
`;
|
|
2723
2711
|
}
|
|
2724
2712
|
else {
|
|
2725
|
-
resultHTML =
|
|
2726
|
-
<div class="pops-${type}-btn" style="${btnStyle}">
|
|
2727
|
-
${okHTML}
|
|
2728
|
-
${cancelHTML}
|
|
2729
|
-
${ohterHTML}
|
|
2730
|
-
</div>
|
|
2731
|
-
`;
|
|
2713
|
+
resultHTML = /*html*/ `<div class="pops-${type}-btn" style="${btnStyle}">${okHTML}${cancelHTML}${ohterHTML}</div>`;
|
|
2732
2714
|
}
|
|
2733
2715
|
return resultHTML;
|
|
2734
2716
|
},
|
|
2735
2717
|
/**
|
|
2736
2718
|
* 获取标题style
|
|
2737
|
-
* @param type
|
|
2738
|
-
* @param config
|
|
2719
|
+
* @param type 弹窗类型
|
|
2720
|
+
* @param config 弹窗配置
|
|
2739
2721
|
*/
|
|
2740
2722
|
getHeaderStyle(type, config) {
|
|
2741
2723
|
return {
|
|
@@ -2745,8 +2727,8 @@ const PopsElementHandler = {
|
|
|
2745
2727
|
},
|
|
2746
2728
|
/**
|
|
2747
2729
|
* 获取内容style
|
|
2748
|
-
* @param type
|
|
2749
|
-
* @param config
|
|
2730
|
+
* @param type 弹窗类型
|
|
2731
|
+
* @param config 弹窗配置
|
|
2750
2732
|
*/
|
|
2751
2733
|
getContentStyle(type, config) {
|
|
2752
2734
|
return {
|
|
@@ -2834,11 +2816,11 @@ const PopsHandler = {
|
|
|
2834
2816
|
function originalRun() {
|
|
2835
2817
|
if (details.config.mask.clickEvent.toClose) {
|
|
2836
2818
|
/* 关闭 */
|
|
2837
|
-
PopsInstanceUtils.close(details.type, targetLayer, details.guid, details.config, details.animElement);
|
|
2819
|
+
return PopsInstanceUtils.close(details.type, targetLayer, details.guid, details.config, details.animElement);
|
|
2838
2820
|
}
|
|
2839
2821
|
else if (details.config.mask.clickEvent.toHide) {
|
|
2840
2822
|
/* 隐藏 */
|
|
2841
|
-
PopsInstanceUtils.hide(details.type, targetLayer, details.guid, details.config, details.animElement, result.maskElement);
|
|
2823
|
+
return PopsInstanceUtils.hide(details.type, targetLayer, details.guid, details.config, details.animElement, result.maskElement);
|
|
2842
2824
|
}
|
|
2843
2825
|
}
|
|
2844
2826
|
if (typeof details.config.mask.clickCallBack === "function") {
|
|
@@ -3017,13 +2999,13 @@ const PopsHandler = {
|
|
|
3017
2999
|
mode: mode,
|
|
3018
3000
|
guid: guid,
|
|
3019
3001
|
close() {
|
|
3020
|
-
PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
|
|
3002
|
+
return PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
|
|
3021
3003
|
},
|
|
3022
3004
|
hide() {
|
|
3023
|
-
PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
|
|
3005
|
+
return PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
|
|
3024
3006
|
},
|
|
3025
3007
|
show() {
|
|
3026
|
-
PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
|
|
3008
|
+
return PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
|
|
3027
3009
|
},
|
|
3028
3010
|
};
|
|
3029
3011
|
},
|
|
@@ -3045,13 +3027,13 @@ const PopsHandler = {
|
|
|
3045
3027
|
mode: mode,
|
|
3046
3028
|
guid: guid,
|
|
3047
3029
|
close() {
|
|
3048
|
-
PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
|
|
3030
|
+
return PopsInstanceUtils.close(mode, pops.config.layer[mode], guid, config, animElement);
|
|
3049
3031
|
},
|
|
3050
3032
|
hide() {
|
|
3051
|
-
PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
|
|
3033
|
+
return PopsInstanceUtils.hide(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
|
|
3052
3034
|
},
|
|
3053
3035
|
show() {
|
|
3054
|
-
PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
|
|
3036
|
+
return PopsInstanceUtils.show(mode, pops.config.layer[mode], guid, config, animElement, maskElement);
|
|
3055
3037
|
},
|
|
3056
3038
|
};
|
|
3057
3039
|
},
|
|
@@ -3290,21 +3272,12 @@ class PopsAlert {
|
|
|
3290
3272
|
let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
|
|
3291
3273
|
let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
|
|
3292
3274
|
/*html*/ `
|
|
3293
|
-
<div
|
|
3294
|
-
class="pops-alert-title"
|
|
3295
|
-
style="text-align: ${config.title.position};
|
|
3296
|
-
${headerStyle}">
|
|
3297
|
-
${config.title.html
|
|
3275
|
+
<div class="pops-alert-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
3298
3276
|
? config.title.text
|
|
3299
|
-
: `<p pops style="${headerPStyle}">${config.title.text}</p>`}
|
|
3300
|
-
|
|
3301
|
-
</div>
|
|
3302
|
-
<div class="pops-alert-content" style="${contentStyle}">
|
|
3303
|
-
${config.content.html
|
|
3277
|
+
: `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
|
|
3278
|
+
<div class="pops-alert-content" style="${contentStyle}">${config.content.html
|
|
3304
3279
|
? config.content.text
|
|
3305
|
-
: `<p pops style="${contentPStyle}">${config.content.text}</p>`}
|
|
3306
|
-
</div>
|
|
3307
|
-
${bottomBtnHTML}`, bottomBtnHTML, zIndex);
|
|
3280
|
+
: `<p pops style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
|
|
3308
3281
|
/**
|
|
3309
3282
|
* 弹窗的主元素,包括动画层
|
|
3310
3283
|
*/
|
|
@@ -3481,22 +3454,12 @@ class PopsConfirm {
|
|
|
3481
3454
|
let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
|
|
3482
3455
|
let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
|
|
3483
3456
|
/*html*/ `
|
|
3484
|
-
<div class="pops-confirm-title" style="text-align: ${config.title.position};${headerStyle}"
|
|
3485
|
-
${config.title.html
|
|
3457
|
+
<div class="pops-confirm-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
3486
3458
|
? config.title.text
|
|
3487
|
-
: `<p pops style="${headerPStyle}">${config.title.text}</p>`}
|
|
3488
|
-
|
|
3489
|
-
</div>
|
|
3490
|
-
<div class="pops-confirm-content" style="${contentStyle}">
|
|
3491
|
-
${config.content.html
|
|
3459
|
+
: `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
|
|
3460
|
+
<div class="pops-confirm-content" style="${contentStyle}">${config.content.html
|
|
3492
3461
|
? config.content.text
|
|
3493
|
-
: `<p pops style="${contentPStyle}">${config.content.text}</p>`}
|
|
3494
|
-
|
|
3495
|
-
</div>
|
|
3496
|
-
|
|
3497
|
-
|
|
3498
|
-
${bottomBtnHTML}
|
|
3499
|
-
`, bottomBtnHTML, zIndex);
|
|
3462
|
+
: `<p pops style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
|
|
3500
3463
|
/**
|
|
3501
3464
|
* 弹窗的主元素,包括动画层
|
|
3502
3465
|
*/
|
|
@@ -3678,14 +3641,10 @@ class PopsPrompt {
|
|
|
3678
3641
|
let { contentPStyle } = PopsElementHandler.getContentStyle(PopsType, config);
|
|
3679
3642
|
let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
|
|
3680
3643
|
/*html*/ `
|
|
3681
|
-
<div class="pops-prompt-title" style="text-align: ${config.title.position};${headerStyle}"
|
|
3682
|
-
${config.title.html
|
|
3644
|
+
<div class="pops-prompt-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
3683
3645
|
? config.title.text
|
|
3684
|
-
: `<p pops style="${headerPStyle}">${config.title.text}</p>`}
|
|
3685
|
-
${
|
|
3686
|
-
</div>
|
|
3687
|
-
<div class="pops-prompt-content" style="${contentPStyle}">
|
|
3688
|
-
${config.content.row
|
|
3646
|
+
: `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
|
|
3647
|
+
<div class="pops-prompt-content" style="${contentPStyle}">${config.content.row
|
|
3689
3648
|
? '<textarea pops="" placeholder="' +
|
|
3690
3649
|
config.content.placeholder +
|
|
3691
3650
|
'"></textarea>'
|
|
@@ -3693,10 +3652,7 @@ class PopsPrompt {
|
|
|
3693
3652
|
config.content.placeholder +
|
|
3694
3653
|
'" type="' +
|
|
3695
3654
|
(config.content.password ? "password" : "text") +
|
|
3696
|
-
'">'}
|
|
3697
|
-
</div>
|
|
3698
|
-
${bottomBtnHTML}
|
|
3699
|
-
`, bottomBtnHTML, zIndex);
|
|
3655
|
+
'">'}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
|
|
3700
3656
|
/**
|
|
3701
3657
|
* 弹窗的主元素,包括动画层
|
|
3702
3658
|
*/
|
|
@@ -3809,9 +3765,8 @@ class PopsLoading {
|
|
|
3809
3765
|
let { contentPStyle } = PopsElementHandler.getContentStyle("loading", config);
|
|
3810
3766
|
let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
|
|
3811
3767
|
/*html*/ `
|
|
3812
|
-
<div class="pops-loading-content"
|
|
3813
|
-
|
|
3814
|
-
? `
|
|
3768
|
+
<div class="pops-loading-content">${config.addIndexCSS
|
|
3769
|
+
? /*html*/ `
|
|
3815
3770
|
<style data-model-name="index">${pops.config.cssText.index}</style>
|
|
3816
3771
|
<style data-model-name="anim">${pops.config.cssText.anim}</style>
|
|
3817
3772
|
<style data-model-name="common">${pops.config.cssText.common}</style>
|
|
@@ -3821,9 +3776,8 @@ class PopsLoading {
|
|
|
3821
3776
|
${pops.config.cssText.loadingCSS}
|
|
3822
3777
|
</style>
|
|
3823
3778
|
${config.style != null ? `<style>${config.style}</style>` : ""}
|
|
3824
|
-
|
|
3825
|
-
</div
|
|
3826
|
-
`, "", zIndex);
|
|
3779
|
+
<p pops style="${contentPStyle}">${config.content.text}</p>
|
|
3780
|
+
</div>`, "", zIndex);
|
|
3827
3781
|
/**
|
|
3828
3782
|
* 弹窗的主元素,包括动画层
|
|
3829
3783
|
*/
|
|
@@ -3847,6 +3801,9 @@ class PopsLoading {
|
|
|
3847
3801
|
maskHTML: maskHTML,
|
|
3848
3802
|
});
|
|
3849
3803
|
$mask = _handleMask_.maskElement;
|
|
3804
|
+
// 遮罩层必须是跟随主内容
|
|
3805
|
+
// 即设置主内容position: relative,mask:position: absolute
|
|
3806
|
+
popsDOMUtils.css($mask, "position", "absolute !important");
|
|
3850
3807
|
elementList.push($mask);
|
|
3851
3808
|
}
|
|
3852
3809
|
let eventDetails = PopsHandler.handleLoadingEventDetails(guid, PopsType, $anim, $pops, $mask, config);
|
|
@@ -3957,27 +3914,16 @@ class PopsIframe {
|
|
|
3957
3914
|
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
|
|
3958
3915
|
let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
|
|
3959
3916
|
/*html*/ `
|
|
3960
|
-
<div
|
|
3961
|
-
class="pops-iframe-title"
|
|
3962
|
-
style="text-align: ${config.title.position};${headerStyle}"
|
|
3963
|
-
>
|
|
3964
|
-
${config.title.html
|
|
3917
|
+
<div class="pops-iframe-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
3965
3918
|
? titleText
|
|
3966
|
-
: `<p pops style="${headerPStyle}">${titleText}</p>`}
|
|
3967
|
-
|
|
3968
|
-
</div>
|
|
3969
|
-
<div class="pops-iframe-content">
|
|
3919
|
+
: `<p pops style="${headerPStyle}">${titleText}</p>`}${headerBtnHTML}</div>
|
|
3920
|
+
<div class="pops-iframe-content">
|
|
3970
3921
|
<div class="pops-iframe-content-global-loading"></div>
|
|
3971
|
-
<iframe
|
|
3972
|
-
src="${config.url}"
|
|
3973
|
-
pops
|
|
3974
|
-
${config.sandbox
|
|
3922
|
+
<iframe src="${config.url}" pops ${config.sandbox
|
|
3975
3923
|
? "sandbox='allow-forms allow-same-origin allow-scripts'"
|
|
3976
3924
|
: ""}>
|
|
3977
3925
|
</iframe>
|
|
3978
|
-
|
|
3979
|
-
${config.loading.enable ? iframeLoadingHTML : ""}
|
|
3980
|
-
`, "", zIndex);
|
|
3926
|
+
</div>${config.loading.enable ? iframeLoadingHTML : ""}`, "", zIndex);
|
|
3981
3927
|
/**
|
|
3982
3928
|
* 弹窗的主元素,包括动画层
|
|
3983
3929
|
*/
|
|
@@ -4283,29 +4229,14 @@ class PopsDrawer {
|
|
|
4283
4229
|
let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
|
|
4284
4230
|
/*html*/ `
|
|
4285
4231
|
${config.title.enable
|
|
4286
|
-
? `
|
|
4287
|
-
<div class="pops-${PopsType}-title" style="${headerStyle}"
|
|
4288
|
-
${config.title.html
|
|
4232
|
+
? /*html*/ `
|
|
4233
|
+
<div class="pops-${PopsType}-title" style="${headerStyle}">${config.title.html
|
|
4289
4234
|
? config.title.text
|
|
4290
|
-
: `<p
|
|
4291
|
-
pops
|
|
4292
|
-
style="
|
|
4293
|
-
width: 100%;
|
|
4294
|
-
text-align: ${config.title.position};
|
|
4295
|
-
${headerPStyle}">${config.title.text}</p>`}
|
|
4296
|
-
${headerBtnHTML}
|
|
4297
|
-
</div>
|
|
4298
|
-
`
|
|
4235
|
+
: /*html*/ `<p pops style="width: 100%;text-align: ${config.title.position};${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>`
|
|
4299
4236
|
: ""}
|
|
4300
|
-
|
|
4301
|
-
<div class="pops-${PopsType}-content" style="${contentStyle}">
|
|
4302
|
-
${config.content.html
|
|
4237
|
+
<div class="pops-${PopsType}-content" style="${contentStyle}">${config.content.html
|
|
4303
4238
|
? config.content.text
|
|
4304
|
-
: `<p pops style="${contentPStyle}">${config.content.text}</p>`}
|
|
4305
|
-
</div>
|
|
4306
|
-
|
|
4307
|
-
${bottomBtnHTML}
|
|
4308
|
-
`, bottomBtnHTML, zIndex);
|
|
4239
|
+
: `<p pops style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
|
|
4309
4240
|
/**
|
|
4310
4241
|
* 弹窗的主元素,包括动画层
|
|
4311
4242
|
*/
|
|
@@ -4687,14 +4618,12 @@ class PopsFolder {
|
|
|
4687
4618
|
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(PopsType, config);
|
|
4688
4619
|
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(PopsType, config);
|
|
4689
4620
|
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
|
|
4690
|
-
let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
|
|
4691
|
-
|
|
4692
|
-
|
|
4621
|
+
let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
|
|
4622
|
+
/*html*/ `
|
|
4623
|
+
<div class="pops-folder-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
4693
4624
|
? config.title.text
|
|
4694
|
-
: `<p pops style="${headerPStyle}">${config.title.text}</p>`}
|
|
4695
|
-
|
|
4696
|
-
</div>
|
|
4697
|
-
<div class="pops-folder-content ${pops.isPhone() ? "pops-mobile-folder-content" : ""}">
|
|
4625
|
+
: `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
|
|
4626
|
+
<div class="pops-folder-content ${pops.isPhone() ? "pops-mobile-folder-content" : ""}">
|
|
4698
4627
|
<div class="pops-folder-list">
|
|
4699
4628
|
<div class="pops-folder-file-list-breadcrumb">
|
|
4700
4629
|
<div class="pops-folder-file-list-breadcrumb-primary">
|
|
@@ -4706,7 +4635,6 @@ class PopsFolder {
|
|
|
4706
4635
|
<div class="pops-folder-list-table__header-div">
|
|
4707
4636
|
<table class="pops-folder-list-table__header">
|
|
4708
4637
|
<colgroup>
|
|
4709
|
-
<!-- <col width="8%"> --!>
|
|
4710
4638
|
<col width="52%">
|
|
4711
4639
|
<col width="24%">
|
|
4712
4640
|
<col width="16%">
|
|
@@ -4777,7 +4705,6 @@ class PopsFolder {
|
|
|
4777
4705
|
<div class="pops-folder-list-table__body-div">
|
|
4778
4706
|
<table class="pops-folder-list-table__body">
|
|
4779
4707
|
<colgroup>
|
|
4780
|
-
<!-- <col width="8%"> --!>
|
|
4781
4708
|
${pops.isPhone()
|
|
4782
4709
|
? `<col width="100%">`
|
|
4783
4710
|
: `
|
|
@@ -4792,9 +4719,7 @@ class PopsFolder {
|
|
|
4792
4719
|
</table>
|
|
4793
4720
|
</div>
|
|
4794
4721
|
</div>
|
|
4795
|
-
</div
|
|
4796
|
-
${bottomBtnHTML}
|
|
4797
|
-
`, bottomBtnHTML, zIndex);
|
|
4722
|
+
</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
|
|
4798
4723
|
/**
|
|
4799
4724
|
* 弹窗的主元素,包括动画层
|
|
4800
4725
|
*/
|
|
@@ -4975,9 +4900,7 @@ class PopsFolder {
|
|
|
4975
4900
|
<div class="pops-folder-list-file-name pops-mobile-folder-list-file-name cursor-p">
|
|
4976
4901
|
<img src="${fileIcon}" alt="${fileType}" class="pops-folder-list-file-icon u-file-icon u-file-icon--list">
|
|
4977
4902
|
<div>
|
|
4978
|
-
<a title="${fileName}" class="pops-folder-list-file-name-title-text inline-block-v-middle text-ellip list-name-text">
|
|
4979
|
-
${fileName}
|
|
4980
|
-
</a>
|
|
4903
|
+
<a title="${fileName}" class="pops-folder-list-file-name-title-text inline-block-v-middle text-ellip list-name-text">${fileName}</a>
|
|
4981
4904
|
<span>${latestTime} ${fileSize}</span>
|
|
4982
4905
|
</div>
|
|
4983
4906
|
</div>
|
|
@@ -6120,9 +6043,7 @@ const PanelHandleContentDetails = () => {
|
|
|
6120
6043
|
PopsSafeUtils.setSafeHTML(liElement,
|
|
6121
6044
|
/*html*/ `
|
|
6122
6045
|
<div class="pops-panel-item-left-text">
|
|
6123
|
-
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
6124
|
-
${leftDescriptionText}
|
|
6125
|
-
</div>
|
|
6046
|
+
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
6126
6047
|
<div class="pops-panel-switch">
|
|
6127
6048
|
<input class="pops-panel-switch__input" type="checkbox">
|
|
6128
6049
|
<span class="pops-panel-switch__core">
|
|
@@ -6222,9 +6143,7 @@ const PanelHandleContentDetails = () => {
|
|
|
6222
6143
|
PopsSafeUtils.setSafeHTML(liElement,
|
|
6223
6144
|
/*html*/ `
|
|
6224
6145
|
<div class="pops-panel-item-left-text">
|
|
6225
|
-
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
6226
|
-
${leftDescriptionText}
|
|
6227
|
-
</div>
|
|
6146
|
+
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
6228
6147
|
<div class="pops-panel-slider">
|
|
6229
6148
|
<input type="range" min="${formConfig.min}" max="${formConfig.max}">
|
|
6230
6149
|
</div>
|
|
@@ -6287,9 +6206,7 @@ const PanelHandleContentDetails = () => {
|
|
|
6287
6206
|
PopsSafeUtils.setSafeHTML(liElement,
|
|
6288
6207
|
/*html*/ `
|
|
6289
6208
|
<div class="pops-panel-item-left-text" style="flex: 1;">
|
|
6290
|
-
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
6291
|
-
${leftDescriptionText}
|
|
6292
|
-
</div>
|
|
6209
|
+
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
6293
6210
|
<div class="pops-slider pops-slider-width">
|
|
6294
6211
|
<div class="pops-slider__runway">
|
|
6295
6212
|
<div class="pops-slider__bar" style="width: 0%; left: 0%"></div>
|
|
@@ -6850,9 +6767,7 @@ const PanelHandleContentDetails = () => {
|
|
|
6850
6767
|
PopsSafeUtils.setSafeHTML(liElement,
|
|
6851
6768
|
/*html*/ `
|
|
6852
6769
|
<div class="pops-panel-item-left-text">
|
|
6853
|
-
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
6854
|
-
${leftDescriptionText}
|
|
6855
|
-
</div>
|
|
6770
|
+
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
6856
6771
|
<div class="pops-panel-input pops-user-select-none">
|
|
6857
6772
|
<input type="${inputType}" placeholder="${formConfig.placeholder}">
|
|
6858
6773
|
</div>
|
|
@@ -7047,12 +6962,9 @@ const PanelHandleContentDetails = () => {
|
|
|
7047
6962
|
PopsSafeUtils.setSafeHTML(liElement,
|
|
7048
6963
|
/*html*/ `
|
|
7049
6964
|
<div class="pops-panel-item-left-text">
|
|
7050
|
-
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
7051
|
-
${leftDescriptionText}
|
|
7052
|
-
</div>
|
|
6965
|
+
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
7053
6966
|
<div class="pops-panel-textarea">
|
|
7054
|
-
<textarea placeholder="${formConfig.placeholder ?? ""}">
|
|
7055
|
-
</textarea>
|
|
6967
|
+
<textarea placeholder="${formConfig.placeholder ?? ""}"></textarea>
|
|
7056
6968
|
</div>
|
|
7057
6969
|
`);
|
|
7058
6970
|
const PopsPanelTextArea = {
|
|
@@ -7122,9 +7034,7 @@ const PanelHandleContentDetails = () => {
|
|
|
7122
7034
|
PopsSafeUtils.setSafeHTML(liElement,
|
|
7123
7035
|
/*html*/ `
|
|
7124
7036
|
<div class="pops-panel-item-left-text">
|
|
7125
|
-
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
7126
|
-
${leftDescriptionText}
|
|
7127
|
-
</div>
|
|
7037
|
+
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
7128
7038
|
<div class="pops-panel-select pops-user-select-none">
|
|
7129
7039
|
<select></select>
|
|
7130
7040
|
</div>
|
|
@@ -7318,9 +7228,7 @@ const PanelHandleContentDetails = () => {
|
|
|
7318
7228
|
PopsSafeUtils.setSafeHTML(liElement,
|
|
7319
7229
|
/*html*/ `
|
|
7320
7230
|
<div class="pops-panel-item-left-text">
|
|
7321
|
-
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
7322
|
-
${leftDescriptionText}
|
|
7323
|
-
</div>
|
|
7231
|
+
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
7324
7232
|
<div class="pops-panel-select-multiple">
|
|
7325
7233
|
<div class="el-select__wrapper">
|
|
7326
7234
|
<div class="el-select__selection">
|
|
@@ -7613,9 +7521,7 @@ const PanelHandleContentDetails = () => {
|
|
|
7613
7521
|
function createSelectItemElement(dataInfo) {
|
|
7614
7522
|
let $item = popsDOMUtils.createElement("li", {
|
|
7615
7523
|
className: "select-item",
|
|
7616
|
-
innerHTML: /*html*/
|
|
7617
|
-
<span>${dataInfo.text}</span>
|
|
7618
|
-
`,
|
|
7524
|
+
innerHTML: /*html*/ `<span>${dataInfo.text}</span>`,
|
|
7619
7525
|
});
|
|
7620
7526
|
Reflect.set($item, "data-info", dataInfo);
|
|
7621
7527
|
return $item;
|
|
@@ -7877,9 +7783,7 @@ const PanelHandleContentDetails = () => {
|
|
|
7877
7783
|
PopsSafeUtils.setSafeHTML(liElement,
|
|
7878
7784
|
/*html*/ `
|
|
7879
7785
|
<div class="pops-panel-item-left-text">
|
|
7880
|
-
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
7881
|
-
${leftDescriptionText}
|
|
7882
|
-
</div>
|
|
7786
|
+
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
7883
7787
|
<div class="pops-panel-button">
|
|
7884
7788
|
<button class="pops-panel-button_inner">
|
|
7885
7789
|
<i class="pops-bottom-icon"></i>
|
|
@@ -8044,13 +7948,8 @@ const PanelHandleContentDetails = () => {
|
|
|
8044
7948
|
PopsSafeUtils.setSafeHTML($li,
|
|
8045
7949
|
/*html*/ `
|
|
8046
7950
|
<div class="pops-panel-item-left-text">
|
|
8047
|
-
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
8048
|
-
|
|
8049
|
-
</div>
|
|
8050
|
-
<div class="pops-panel-deepMenu">
|
|
8051
|
-
${rightText}
|
|
8052
|
-
${arrowRightIconHTML}
|
|
8053
|
-
</div>
|
|
7951
|
+
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
7952
|
+
<div class="pops-panel-deepMenu">${rightText}${arrowRightIconHTML}</div>
|
|
8054
7953
|
`);
|
|
8055
7954
|
const PopsPanelDeepMenu = {
|
|
8056
7955
|
[Symbol.toStringTag]: "PopsPanelDeepMenu",
|
|
@@ -8433,15 +8332,9 @@ class PopsPanel {
|
|
|
8433
8332
|
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(PopsType, config);
|
|
8434
8333
|
let animHTML = PopsElementHandler.getAnimHTML(guid, PopsType, config,
|
|
8435
8334
|
/*html*/ `
|
|
8436
|
-
<div
|
|
8437
|
-
class="pops-${PopsType}-title"
|
|
8438
|
-
style="text-align: ${config.title.position};
|
|
8439
|
-
${headerStyle}">
|
|
8440
|
-
${config.title.html
|
|
8335
|
+
<div class="pops-${PopsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
8441
8336
|
? config.title.text
|
|
8442
|
-
: `<p pops style="${headerPStyle}">${config.title.text}</p>`}
|
|
8443
|
-
${headerBtnHTML}
|
|
8444
|
-
</div>
|
|
8337
|
+
: `<p pops style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
|
|
8445
8338
|
<div class="pops-${PopsType}-content">
|
|
8446
8339
|
<aside class="pops-${PopsType}-aside">
|
|
8447
8340
|
<ul></ul>
|
|
@@ -8986,7 +8879,8 @@ class PopsRightClickMenu {
|
|
|
8986
8879
|
/* 判断有无图标,有就添加进去 */
|
|
8987
8880
|
if (typeof item.icon === "string" && item.icon.trim() !== "") {
|
|
8988
8881
|
let iconSVGHTML = pops.config.iconSVG[item.icon] ?? item.icon;
|
|
8989
|
-
let iconElement = popsUtils.parseTextToDOM(
|
|
8882
|
+
let iconElement = popsUtils.parseTextToDOM(
|
|
8883
|
+
/*html*/ `<i class="pops-${PopsType}-icon" is-loading="${item.iconIsLoading}">${iconSVGHTML}</i>`);
|
|
8990
8884
|
menuLiElement.appendChild(iconElement);
|
|
8991
8885
|
}
|
|
8992
8886
|
/* 插入文字 */
|
|
@@ -9003,7 +8897,9 @@ class PopsRightClickMenu {
|
|
|
9003
8897
|
return;
|
|
9004
8898
|
}
|
|
9005
8899
|
function removeElement(element) {
|
|
9006
|
-
element
|
|
8900
|
+
element
|
|
8901
|
+
.querySelectorAll("ul li")
|
|
8902
|
+
.forEach((ele) => {
|
|
9007
8903
|
if (ele?.__menuData__?.child) {
|
|
9008
8904
|
removeElement(ele.__menuData__.child);
|
|
9009
8905
|
}
|
|
@@ -9220,9 +9116,7 @@ class PopsSearchSuggestion {
|
|
|
9220
9116
|
<style data-dynamic="true">
|
|
9221
9117
|
${this.getDynamicCSS()}
|
|
9222
9118
|
</style>
|
|
9223
|
-
<ul class="pops-${PopsType}-search-suggestion-hint">
|
|
9224
|
-
${config.toSearhNotResultHTML}
|
|
9225
|
-
</ul>
|
|
9119
|
+
<ul class="pops-${PopsType}-search-suggestion-hint">${config.toSearhNotResultHTML}</ul>
|
|
9226
9120
|
`,
|
|
9227
9121
|
}, {
|
|
9228
9122
|
"data-guid": guid,
|
|
@@ -9301,12 +9195,7 @@ class PopsSearchSuggestion {
|
|
|
9301
9195
|
className: `pops-${PopsType}-search-suggestion-hint-item pops-flex-items-center pops-flex-y-center`,
|
|
9302
9196
|
"data-index": index,
|
|
9303
9197
|
"data-value": SearchSuggestion.getItemDataValue(data),
|
|
9304
|
-
innerHTML:
|
|
9305
|
-
${config.getItemHTML(data)}
|
|
9306
|
-
${config.deleteIcon.enable
|
|
9307
|
-
? SearchSuggestion.getDeleteIconHTML()
|
|
9308
|
-
: ""}
|
|
9309
|
-
`,
|
|
9198
|
+
innerHTML: `${config.getItemHTML(data)}${config.deleteIcon.enable ? SearchSuggestion.getDeleteIconHTML() : ""}`,
|
|
9310
9199
|
});
|
|
9311
9200
|
},
|
|
9312
9201
|
/**
|
|
@@ -10189,7 +10078,7 @@ class Pops {
|
|
|
10189
10078
|
/** 配置 */
|
|
10190
10079
|
config = {
|
|
10191
10080
|
/** 版本号 */
|
|
10192
|
-
version: "2025.
|
|
10081
|
+
version: "2025.5.12",
|
|
10193
10082
|
cssText: {
|
|
10194
10083
|
/** 主CSS */
|
|
10195
10084
|
index: indexCSS,
|