@whitesev/pops 1.9.0 → 1.9.2
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 +288 -170
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +288 -170
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +288 -170
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +288 -170
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +288 -170
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +288 -170
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/GlobalConfig.d.ts +1 -0
- package/dist/types/src/Pops.d.ts +2 -0
- package/dist/types/src/components/alert/config.d.ts +1 -1
- package/dist/types/src/components/confirm/config.d.ts +1 -1
- package/dist/types/src/components/drawer/config.d.ts +1 -1
- package/dist/types/src/components/folder/config.d.ts +1 -1
- package/dist/types/src/components/iframe/config.d.ts +1 -1
- package/dist/types/src/components/loading/config.d.ts +1 -1
- package/dist/types/src/components/panel/config.d.ts +1 -1
- package/dist/types/src/components/prompt/config.d.ts +1 -1
- package/dist/types/src/components/rightClickMenu/config.d.ts +1 -1
- package/dist/types/src/components/rightClickMenu/indexType.d.ts +4 -21
- package/dist/types/src/components/searchSuggestion/config.d.ts +1 -1
- package/dist/types/src/components/searchSuggestion/indexType.d.ts +2 -10
- package/dist/types/src/components/tooltip/config.d.ts +1 -1
- package/dist/types/src/components/tooltip/index.d.ts +5 -5
- package/dist/types/src/components/tooltip/indexType.d.ts +28 -28
- package/dist/types/src/handler/PopsElementHandler.d.ts +1 -1
- package/dist/types/src/handler/PopsHandler.d.ts +7 -3
- package/dist/types/src/types/button.d.ts +13 -19
- package/dist/types/src/types/components.d.ts +26 -11
- package/dist/types/src/types/event.d.ts +1 -1
- package/dist/types/src/types/global.d.ts +9 -0
- package/dist/types/src/types/layer.d.ts +1 -1
- package/dist/types/src/types/mask.d.ts +14 -11
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +2 -1
- package/package.json +1 -1
- package/src/Pops.ts +1 -1
- package/src/components/alert/config.ts +10 -9
- package/src/components/alert/index.ts +9 -9
- package/src/components/confirm/config.ts +18 -24
- package/src/components/confirm/index.ts +9 -9
- package/src/components/drawer/config.ts +22 -21
- package/src/components/drawer/index.ts +9 -9
- package/src/components/folder/config.ts +17 -16
- package/src/components/folder/index.ts +32 -24
- package/src/components/iframe/config.ts +3 -3
- package/src/components/iframe/index.ts +15 -11
- package/src/components/loading/config.ts +3 -3
- package/src/components/loading/index.ts +1 -1
- package/src/components/panel/config.ts +65 -2
- package/src/components/panel/index.ts +13 -11
- package/src/components/prompt/config.ts +17 -27
- package/src/components/prompt/index.ts +10 -8
- package/src/components/rightClickMenu/config.ts +117 -109
- package/src/components/rightClickMenu/index.ts +13 -12
- package/src/components/rightClickMenu/indexType.ts +13 -24
- package/src/components/searchSuggestion/config.ts +2 -1
- package/src/components/searchSuggestion/index.ts +11 -10
- package/src/components/searchSuggestion/indexType.ts +4 -10
- package/src/components/tooltip/config.ts +7 -5
- package/src/components/tooltip/index.ts +34 -21
- package/src/components/tooltip/indexType.ts +38 -35
- package/src/css/index.css +1 -1
- package/src/handler/PopsElementHandler.ts +2 -2
- package/src/handler/PopsHandler.ts +24 -20
- package/src/types/button.d.ts +13 -19
- package/src/types/components.d.ts +26 -11
- package/src/types/event.d.ts +1 -1
- package/src/types/global.d.ts +9 -0
- package/src/types/layer.d.ts +1 -1
- package/src/types/mask.d.ts +14 -11
- package/src/utils/PopsInstanceUtils.ts +8 -8
package/dist/index.esm.js
CHANGED
|
@@ -1743,10 +1743,9 @@ const PopsInstanceUtils = {
|
|
|
1743
1743
|
getPopsMaxZIndex(deviation = 1) {
|
|
1744
1744
|
deviation = Number.isNaN(deviation) ? 1 : deviation;
|
|
1745
1745
|
// 最大值 2147483647
|
|
1746
|
-
//
|
|
1747
|
-
// const maxZIndex = Math.pow(2, 31) - 1;
|
|
1746
|
+
// const browserMaxZIndex = Math.pow(2, 31) - 1;
|
|
1748
1747
|
// 比较值 2000000000
|
|
1749
|
-
const
|
|
1748
|
+
const maxZIndex = 2 * Math.pow(10, 9);
|
|
1750
1749
|
// 当前页面最大的z-index
|
|
1751
1750
|
let zIndex = 0;
|
|
1752
1751
|
// 当前的最大z-index的元素,调试使用
|
|
@@ -1776,17 +1775,18 @@ const PopsInstanceUtils = {
|
|
|
1776
1775
|
}
|
|
1777
1776
|
});
|
|
1778
1777
|
zIndex += deviation;
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1778
|
+
let isOverMaxZIndex = zIndex >= maxZIndex;
|
|
1779
|
+
if (isOverMaxZIndex) {
|
|
1780
|
+
// 超出z-index最大值
|
|
1781
|
+
zIndex = maxZIndex;
|
|
1782
1782
|
}
|
|
1783
|
-
return { zIndex: zIndex, animElement: maxZIndexNode };
|
|
1783
|
+
return { zIndex: zIndex, animElement: maxZIndexNode, isOverMaxZIndex };
|
|
1784
1784
|
},
|
|
1785
1785
|
/**
|
|
1786
1786
|
* 获取页面中最大的z-index
|
|
1787
1787
|
* @param deviation 获取最大的z-index值的偏移,默认是+1
|
|
1788
1788
|
* @example
|
|
1789
|
-
*
|
|
1789
|
+
* getMaxZIndex();
|
|
1790
1790
|
* > 1001
|
|
1791
1791
|
**/
|
|
1792
1792
|
getMaxZIndex(deviation = 1) {
|
|
@@ -2276,7 +2276,7 @@ const PopsInstanceUtils = {
|
|
|
2276
2276
|
},
|
|
2277
2277
|
};
|
|
2278
2278
|
|
|
2279
|
-
var indexCSS = "@charset \"utf-8\";\r\n* {\r\n\t-webkit-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\t-webkit-tap-highlight-color: transparent;\r\n\t/* 代替::-webkit-scrollbar */\r\n\tscrollbar-width: thin;\r\n}\r\n.pops {\r\n\t--pops-bg-opacity: 1;\r\n\t--pops-bd-opacity: 1;\r\n\t--pops-font-size: 16px;\r\n\tinterpolate-size: allow-keywords;\r\n}\r\n.pops-mask {\r\n\t--pops-mask-bg-opacity: 0.4;\r\n}\r\n.pops {\r\n\tbackground-color: rgb(255, 255, 255, var(--pops-bg-opacity));\r\n\tborder-radius: 4px;\r\n\tborder: 1px solid rgb(235, 238, 245, var(--pops-bd-opacity));\r\n\tfont-size: var(--pops-font-size);\r\n\tbox-shadow: 0 0 12px rgba(0, 0, 0, 0.12);\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\ttransition: all 0.35s;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n.pops-anim {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n.pops-anim[anim=\"\"] {\r\n\ttop: unset;\r\n\tright: unset;\r\n\tbottom: unset;\r\n\tleft: unset;\r\n\twidth: unset;\r\n\theight: unset;\r\n\ttransition: none;\r\n}\r\n/* 底部图标动画和样式 */\r\n.pops i.pops-bottom-icon[is-loading=\"true\"] {\r\n\tanimation: rotating 2s linear infinite;\r\n}\r\n.pops i.pops-bottom-icon {\r\n\theight: 1em;\r\n\twidth: 1em;\r\n\tline-height: normal;\r\n\tdisplay: inline-flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\tfill: currentColor;\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n}\r\n\r\n/* 遮罩层样式 */\r\n.pops-mask {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tborder: 0;\r\n\tborder-radius: 0;\r\n\tbackground-color: rgba(0, 0, 0, var(--pops-mask-bg-opacity));\r\n\tbox-shadow: none;\r\n\ttransition: none;\r\n}\r\n\r\n.pops-header-controls button.pops-header-control[type][data-header] {\r\n\tfloat: right;\r\n\tmargin: 0 0;\r\n\toutline: 0;\r\n\tborder: 0;\r\n\tborder-color: rgb(136, 136, 136, var(--pops-bd-opacity));\r\n\tbackground-color: transparent;\r\n\tcolor: #888;\r\n\tcursor: pointer;\r\n}\r\n.pops-header-controls button.pops-header-control[type=\"max\"],\r\n.pops-header-controls button.pops-header-control[type=\"mise\"],\r\n.pops-header-controls button.pops-header-control[type=\"min\"] {\r\n\toutline: 0 !important;\r\n\tborder: 0;\r\n\tborder-color: rgb(136, 136, 136, var(--pops-bd-opacity));\r\n\tbackground-color: transparent;\r\n\tcolor: rgb(136, 136, 136);\r\n\tcursor: pointer;\r\n\ttransition: all 0.3s ease-in-out;\r\n}\r\nbutton.pops-header-control i {\r\n\tcolor: rgb(144, 147, 153);\r\n\tfont-size: inherit;\r\n\tdisplay: inline-flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\tfill: currentColor;\r\n}\r\nbutton.pops-header-control svg {\r\n\theight: 1.25em;\r\n\twidth: 1.25em;\r\n}\r\nbutton.pops-header-control {\r\n\tright: 15px;\r\n\tpadding: 0;\r\n\tborder: none;\r\n\toutline: 0;\r\n\tbackground: 0 0;\r\n\tcursor: pointer;\r\n\tposition: unset;\r\n\tline-height: normal;\r\n}\r\nbutton.pops-header-control i:hover {\r\n\tcolor: rgb(64, 158, 255);\r\n}\r\n.pops-header-controls[data-margin] button.pops-header-control {\r\n\tmargin: 0 6px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n.pops[type-value] .pops-header-controls {\r\n\tdisplay: flex;\r\n\tgap: 6px;\r\n}\r\n\r\n/* 标题禁止选中文字 */\r\n.pops [class^=\"pops\"][class*=\"-title\"] p[pops] {\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n}\r\n";
|
|
2279
|
+
var indexCSS = "@charset \"utf-8\";\r\n.pops * {\r\n\t-webkit-box-sizing: border-box;\r\n\tbox-sizing: border-box;\r\n\tmargin: 0;\r\n\tpadding: 0;\r\n\t-webkit-tap-highlight-color: transparent;\r\n\t/* 代替::-webkit-scrollbar */\r\n\tscrollbar-width: thin;\r\n}\r\n.pops {\r\n\t--pops-bg-opacity: 1;\r\n\t--pops-bd-opacity: 1;\r\n\t--pops-font-size: 16px;\r\n\tinterpolate-size: allow-keywords;\r\n}\r\n.pops-mask {\r\n\t--pops-mask-bg-opacity: 0.4;\r\n}\r\n.pops {\r\n\tbackground-color: rgb(255, 255, 255, var(--pops-bg-opacity));\r\n\tborder-radius: 4px;\r\n\tborder: 1px solid rgb(235, 238, 245, var(--pops-bd-opacity));\r\n\tfont-size: var(--pops-font-size);\r\n\tbox-shadow: 0 0 12px rgba(0, 0, 0, 0.12);\r\n\tbox-sizing: border-box;\r\n\toverflow: hidden;\r\n\ttransition: all 0.35s;\r\n\tdisplay: flex;\r\n\tflex-direction: column;\r\n}\r\n.pops-anim {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n}\r\n.pops-anim[anim=\"\"] {\r\n\ttop: unset;\r\n\tright: unset;\r\n\tbottom: unset;\r\n\tleft: unset;\r\n\twidth: unset;\r\n\theight: unset;\r\n\ttransition: none;\r\n}\r\n/* 底部图标动画和样式 */\r\n.pops i.pops-bottom-icon[is-loading=\"true\"] {\r\n\tanimation: rotating 2s linear infinite;\r\n}\r\n.pops i.pops-bottom-icon {\r\n\theight: 1em;\r\n\twidth: 1em;\r\n\tline-height: normal;\r\n\tdisplay: inline-flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\tfill: currentColor;\r\n\tcolor: inherit;\r\n\tfont-size: inherit;\r\n}\r\n\r\n/* 遮罩层样式 */\r\n.pops-mask {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n\twidth: 100%;\r\n\theight: 100%;\r\n\tborder: 0;\r\n\tborder-radius: 0;\r\n\tbackground-color: rgba(0, 0, 0, var(--pops-mask-bg-opacity));\r\n\tbox-shadow: none;\r\n\ttransition: none;\r\n}\r\n\r\n.pops-header-controls button.pops-header-control[type][data-header] {\r\n\tfloat: right;\r\n\tmargin: 0 0;\r\n\toutline: 0;\r\n\tborder: 0;\r\n\tborder-color: rgb(136, 136, 136, var(--pops-bd-opacity));\r\n\tbackground-color: transparent;\r\n\tcolor: #888;\r\n\tcursor: pointer;\r\n}\r\n.pops-header-controls button.pops-header-control[type=\"max\"],\r\n.pops-header-controls button.pops-header-control[type=\"mise\"],\r\n.pops-header-controls button.pops-header-control[type=\"min\"] {\r\n\toutline: 0 !important;\r\n\tborder: 0;\r\n\tborder-color: rgb(136, 136, 136, var(--pops-bd-opacity));\r\n\tbackground-color: transparent;\r\n\tcolor: rgb(136, 136, 136);\r\n\tcursor: pointer;\r\n\ttransition: all 0.3s ease-in-out;\r\n}\r\nbutton.pops-header-control i {\r\n\tcolor: rgb(144, 147, 153);\r\n\tfont-size: inherit;\r\n\tdisplay: inline-flex;\r\n\tjustify-content: center;\r\n\talign-items: center;\r\n\tposition: relative;\r\n\tfill: currentColor;\r\n}\r\nbutton.pops-header-control svg {\r\n\theight: 1.25em;\r\n\twidth: 1.25em;\r\n}\r\nbutton.pops-header-control {\r\n\tright: 15px;\r\n\tpadding: 0;\r\n\tborder: none;\r\n\toutline: 0;\r\n\tbackground: 0 0;\r\n\tcursor: pointer;\r\n\tposition: unset;\r\n\tline-height: normal;\r\n}\r\nbutton.pops-header-control i:hover {\r\n\tcolor: rgb(64, 158, 255);\r\n}\r\n.pops-header-controls[data-margin] button.pops-header-control {\r\n\tmargin: 0 6px;\r\n\tdisplay: flex;\r\n\talign-items: center;\r\n}\r\n.pops[type-value] .pops-header-controls {\r\n\tdisplay: flex;\r\n\tgap: 6px;\r\n}\r\n\r\n/* 标题禁止选中文字 */\r\n.pops [class^=\"pops\"][class*=\"-title\"] p[pops] {\r\n\t-webkit-user-select: none;\r\n\t-moz-user-select: none;\r\n\t-ms-user-select: none;\r\n\tuser-select: none;\r\n}\r\n";
|
|
2280
2280
|
|
|
2281
2281
|
var ninePalaceGridPositionCSS = ".pops[position=\"top_left\"] {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 0;\r\n}\r\n.pops[position=\"top\"] {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tleft: 50%;\r\n\ttransform: translateX(-50%);\r\n}\r\n.pops[position=\"top_right\"] {\r\n\tposition: fixed;\r\n\ttop: 0;\r\n\tright: 0;\r\n}\r\n.pops[position=\"center_left\"] {\r\n\tposition: fixed;\r\n\ttop: 50%;\r\n\tleft: 0;\r\n\ttransform: translateY(-50%);\r\n}\r\n.pops[position=\"center\"] {\r\n\tposition: fixed;\r\n\ttop: 50%;\r\n\tleft: 50%;\r\n\ttransform: translate(-50%, -50%);\r\n}\r\n.pops[position=\"center_right\"] {\r\n\tposition: fixed;\r\n\ttop: 50%;\r\n\tright: 0;\r\n\ttransform: translateY(-50%);\r\n}\r\n.pops[position=\"bottom_left\"] {\r\n\tposition: fixed;\r\n\tbottom: 0;\r\n\tleft: 0;\r\n}\r\n.pops[position=\"bottom\"] {\r\n\tposition: fixed;\r\n\tbottom: 0;\r\n\tleft: 50%;\r\n\ttransform: translate(-50%, 0);\r\n}\r\n.pops[position=\"bottom_right\"] {\r\n\tposition: fixed;\r\n\tright: 0;\r\n\tbottom: 0;\r\n}\r\n";
|
|
2282
2282
|
|
|
@@ -2469,7 +2469,7 @@ const PopsElementHandler = {
|
|
|
2469
2469
|
<div
|
|
2470
2470
|
class="pops-anim"
|
|
2471
2471
|
anim="${__config.animation || ""}"
|
|
2472
|
-
style="${popsAnimStyle}
|
|
2472
|
+
style="${popsAnimStyle}"
|
|
2473
2473
|
data-guid="${guid}">
|
|
2474
2474
|
${config.style != null
|
|
2475
2475
|
? `<style tyle="text/css">${config.style}</style>`
|
|
@@ -2740,14 +2740,22 @@ const PopsHandler = {
|
|
|
2740
2740
|
/**
|
|
2741
2741
|
* 创建shadow
|
|
2742
2742
|
*/
|
|
2743
|
-
handlerShadow() {
|
|
2743
|
+
handlerShadow(config) {
|
|
2744
2744
|
let $shadowContainer = document.createElement("div");
|
|
2745
2745
|
$shadowContainer.className = "pops-shadow-container";
|
|
2746
|
-
|
|
2747
|
-
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2746
|
+
if (config.useShadowRoot) {
|
|
2747
|
+
let $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
|
|
2748
|
+
return {
|
|
2749
|
+
$shadowContainer,
|
|
2750
|
+
$shadowRoot,
|
|
2751
|
+
};
|
|
2752
|
+
}
|
|
2753
|
+
else {
|
|
2754
|
+
return {
|
|
2755
|
+
$shadowContainer,
|
|
2756
|
+
$shadowRoot: $shadowContainer,
|
|
2757
|
+
};
|
|
2758
|
+
}
|
|
2751
2759
|
},
|
|
2752
2760
|
/**
|
|
2753
2761
|
* 处理初始化
|
|
@@ -3144,17 +3152,11 @@ const PopsHandler = {
|
|
|
3144
3152
|
else {
|
|
3145
3153
|
// 对配置进行处理
|
|
3146
3154
|
// 选择配置的z-index和已有的pops实例的最大z-index值
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
};
|
|
3153
|
-
}
|
|
3154
|
-
else {
|
|
3155
|
-
const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(config.zIndex) + 100);
|
|
3156
|
-
config.zIndex = maxZIndex;
|
|
3157
|
-
}
|
|
3155
|
+
let originZIndex = config.zIndex;
|
|
3156
|
+
config.zIndex = () => {
|
|
3157
|
+
const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(originZIndex) + 100);
|
|
3158
|
+
return maxZIndex;
|
|
3159
|
+
};
|
|
3158
3160
|
}
|
|
3159
3161
|
return config;
|
|
3160
3162
|
},
|
|
@@ -3191,17 +3193,18 @@ const PopsAlertConfig = () => {
|
|
|
3191
3193
|
iconIsLoading: false,
|
|
3192
3194
|
text: "确定",
|
|
3193
3195
|
type: "primary",
|
|
3194
|
-
callback: function (
|
|
3195
|
-
|
|
3196
|
+
callback: function (details) {
|
|
3197
|
+
details.close();
|
|
3196
3198
|
},
|
|
3197
3199
|
},
|
|
3198
3200
|
close: {
|
|
3199
3201
|
enable: true,
|
|
3200
|
-
callback: function (
|
|
3201
|
-
|
|
3202
|
+
callback: function (details) {
|
|
3203
|
+
details.close();
|
|
3202
3204
|
},
|
|
3203
3205
|
},
|
|
3204
3206
|
},
|
|
3207
|
+
useShadowRoot: true,
|
|
3205
3208
|
class: "",
|
|
3206
3209
|
only: false,
|
|
3207
3210
|
width: "350px",
|
|
@@ -3215,7 +3218,7 @@ const PopsAlertConfig = () => {
|
|
|
3215
3218
|
toClose: false,
|
|
3216
3219
|
toHide: false,
|
|
3217
3220
|
},
|
|
3218
|
-
clickCallBack:
|
|
3221
|
+
clickCallBack: null,
|
|
3219
3222
|
},
|
|
3220
3223
|
drag: false,
|
|
3221
3224
|
dragLimit: true,
|
|
@@ -3230,7 +3233,14 @@ const PopsAlertConfig = () => {
|
|
|
3230
3233
|
|
|
3231
3234
|
class PopsAlert {
|
|
3232
3235
|
constructor(details) {
|
|
3233
|
-
const
|
|
3236
|
+
const guid = popsUtils.getRandomGUID();
|
|
3237
|
+
// 设置当前类型
|
|
3238
|
+
const PopsType = "alert";
|
|
3239
|
+
let config = PopsAlertConfig();
|
|
3240
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3241
|
+
config = popsUtils.assign(config, details);
|
|
3242
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3243
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3234
3244
|
PopsHandler.handleInit($shadowRoot, [
|
|
3235
3245
|
pops.config.cssText.index,
|
|
3236
3246
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3240,13 +3250,6 @@ class PopsAlert {
|
|
|
3240
3250
|
pops.config.cssText.common,
|
|
3241
3251
|
pops.config.cssText.alertCSS,
|
|
3242
3252
|
]);
|
|
3243
|
-
let config = PopsAlertConfig();
|
|
3244
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3245
|
-
config = popsUtils.assign(config, details);
|
|
3246
|
-
let guid = popsUtils.getRandomGUID();
|
|
3247
|
-
// 设置当前类型
|
|
3248
|
-
const PopsType = "alert";
|
|
3249
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3250
3253
|
// 先把z-index提取出来
|
|
3251
3254
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3252
3255
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3357,8 +3360,8 @@ const PopsConfirmConfig = () => {
|
|
|
3357
3360
|
iconIsLoading: false,
|
|
3358
3361
|
text: "确定",
|
|
3359
3362
|
type: "primary",
|
|
3360
|
-
callback(
|
|
3361
|
-
|
|
3363
|
+
callback(detail) {
|
|
3364
|
+
detail.close();
|
|
3362
3365
|
},
|
|
3363
3366
|
},
|
|
3364
3367
|
cancel: {
|
|
@@ -3369,8 +3372,8 @@ const PopsConfirmConfig = () => {
|
|
|
3369
3372
|
iconIsLoading: false,
|
|
3370
3373
|
text: "关闭",
|
|
3371
3374
|
type: "default",
|
|
3372
|
-
callback(
|
|
3373
|
-
|
|
3375
|
+
callback(detail) {
|
|
3376
|
+
detail.close();
|
|
3374
3377
|
},
|
|
3375
3378
|
},
|
|
3376
3379
|
other: {
|
|
@@ -3381,17 +3384,18 @@ const PopsConfirmConfig = () => {
|
|
|
3381
3384
|
iconIsLoading: false,
|
|
3382
3385
|
text: "其它按钮",
|
|
3383
3386
|
type: "default",
|
|
3384
|
-
callback(
|
|
3385
|
-
|
|
3387
|
+
callback(detail) {
|
|
3388
|
+
detail.close();
|
|
3386
3389
|
},
|
|
3387
3390
|
},
|
|
3388
3391
|
close: {
|
|
3389
3392
|
enable: true,
|
|
3390
|
-
callback(
|
|
3391
|
-
|
|
3393
|
+
callback(detail) {
|
|
3394
|
+
detail.close();
|
|
3392
3395
|
},
|
|
3393
3396
|
},
|
|
3394
3397
|
},
|
|
3398
|
+
useShadowRoot: true,
|
|
3395
3399
|
class: "",
|
|
3396
3400
|
only: false,
|
|
3397
3401
|
width: "350px",
|
|
@@ -3405,7 +3409,7 @@ const PopsConfirmConfig = () => {
|
|
|
3405
3409
|
toClose: false,
|
|
3406
3410
|
toHide: false,
|
|
3407
3411
|
},
|
|
3408
|
-
clickCallBack:
|
|
3412
|
+
clickCallBack: null,
|
|
3409
3413
|
},
|
|
3410
3414
|
drag: false,
|
|
3411
3415
|
dragLimit: true,
|
|
@@ -3420,7 +3424,14 @@ const PopsConfirmConfig = () => {
|
|
|
3420
3424
|
|
|
3421
3425
|
class PopsConfirm {
|
|
3422
3426
|
constructor(details) {
|
|
3423
|
-
const
|
|
3427
|
+
const guid = popsUtils.getRandomGUID();
|
|
3428
|
+
// 设置当前类型
|
|
3429
|
+
const PopsType = "confirm";
|
|
3430
|
+
let config = PopsConfirmConfig();
|
|
3431
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3432
|
+
config = popsUtils.assign(config, details);
|
|
3433
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3434
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3424
3435
|
PopsHandler.handleInit($shadowRoot, [
|
|
3425
3436
|
pops.config.cssText.index,
|
|
3426
3437
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3430,13 +3441,6 @@ class PopsConfirm {
|
|
|
3430
3441
|
pops.config.cssText.common,
|
|
3431
3442
|
pops.config.cssText.confirmCSS,
|
|
3432
3443
|
]);
|
|
3433
|
-
let config = PopsConfirmConfig();
|
|
3434
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3435
|
-
config = popsUtils.assign(config, details);
|
|
3436
|
-
let guid = popsUtils.getRandomGUID();
|
|
3437
|
-
// 设置当前类型
|
|
3438
|
-
const PopsType = "confirm";
|
|
3439
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3440
3444
|
// 先把z-index提取出来
|
|
3441
3445
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3442
3446
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3553,9 +3557,8 @@ const PopsPromptConfig = () => {
|
|
|
3553
3557
|
iconIsLoading: false,
|
|
3554
3558
|
text: "确定",
|
|
3555
3559
|
type: "success",
|
|
3556
|
-
callback(
|
|
3557
|
-
|
|
3558
|
-
event.close();
|
|
3560
|
+
callback(detail) {
|
|
3561
|
+
detail.close();
|
|
3559
3562
|
},
|
|
3560
3563
|
},
|
|
3561
3564
|
cancel: {
|
|
@@ -3566,9 +3569,8 @@ const PopsPromptConfig = () => {
|
|
|
3566
3569
|
iconIsLoading: false,
|
|
3567
3570
|
text: "关闭",
|
|
3568
3571
|
type: "default",
|
|
3569
|
-
callback(
|
|
3570
|
-
|
|
3571
|
-
event.close();
|
|
3572
|
+
callback(detail) {
|
|
3573
|
+
detail.close();
|
|
3572
3574
|
},
|
|
3573
3575
|
},
|
|
3574
3576
|
other: {
|
|
@@ -3579,19 +3581,18 @@ const PopsPromptConfig = () => {
|
|
|
3579
3581
|
iconIsLoading: false,
|
|
3580
3582
|
text: "其它按钮",
|
|
3581
3583
|
type: "default",
|
|
3582
|
-
callback(
|
|
3583
|
-
|
|
3584
|
-
event.close();
|
|
3584
|
+
callback(detail) {
|
|
3585
|
+
detail.close();
|
|
3585
3586
|
},
|
|
3586
3587
|
},
|
|
3587
3588
|
close: {
|
|
3588
3589
|
enable: true,
|
|
3589
|
-
callback(
|
|
3590
|
-
|
|
3591
|
-
event.close();
|
|
3590
|
+
callback(detail) {
|
|
3591
|
+
detail.close();
|
|
3592
3592
|
},
|
|
3593
3593
|
},
|
|
3594
3594
|
},
|
|
3595
|
+
useShadowRoot: true,
|
|
3595
3596
|
class: "",
|
|
3596
3597
|
only: false,
|
|
3597
3598
|
width: "350px",
|
|
@@ -3605,7 +3606,7 @@ const PopsPromptConfig = () => {
|
|
|
3605
3606
|
toClose: false,
|
|
3606
3607
|
toHide: false,
|
|
3607
3608
|
},
|
|
3608
|
-
clickCallBack:
|
|
3609
|
+
clickCallBack: null,
|
|
3609
3610
|
},
|
|
3610
3611
|
drag: false,
|
|
3611
3612
|
dragLimit: true,
|
|
@@ -3620,7 +3621,14 @@ const PopsPromptConfig = () => {
|
|
|
3620
3621
|
|
|
3621
3622
|
class PopsPrompt {
|
|
3622
3623
|
constructor(details) {
|
|
3623
|
-
const
|
|
3624
|
+
const guid = popsUtils.getRandomGUID();
|
|
3625
|
+
// 设置当前类型
|
|
3626
|
+
const PopsType = "prompt";
|
|
3627
|
+
let config = PopsPromptConfig();
|
|
3628
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3629
|
+
config = popsUtils.assign(config, details);
|
|
3630
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3631
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3624
3632
|
PopsHandler.handleInit($shadowRoot, [
|
|
3625
3633
|
pops.config.cssText.index,
|
|
3626
3634
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3630,12 +3638,6 @@ class PopsPrompt {
|
|
|
3630
3638
|
pops.config.cssText.common,
|
|
3631
3639
|
pops.config.cssText.promptCSS,
|
|
3632
3640
|
]);
|
|
3633
|
-
let config = PopsPromptConfig();
|
|
3634
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3635
|
-
config = popsUtils.assign(config, details);
|
|
3636
|
-
let guid = popsUtils.getRandomGUID();
|
|
3637
|
-
const PopsType = "prompt";
|
|
3638
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3639
3641
|
// 先把z-index提取出来
|
|
3640
3642
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3641
3643
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3743,6 +3745,7 @@ const PopsLoadingConfig = () => {
|
|
|
3743
3745
|
icon: "loading",
|
|
3744
3746
|
style: "",
|
|
3745
3747
|
},
|
|
3748
|
+
useShadowRoot: true,
|
|
3746
3749
|
class: "",
|
|
3747
3750
|
only: false,
|
|
3748
3751
|
zIndex: 10000,
|
|
@@ -3752,7 +3755,7 @@ const PopsLoadingConfig = () => {
|
|
|
3752
3755
|
toClose: false,
|
|
3753
3756
|
toHide: false,
|
|
3754
3757
|
},
|
|
3755
|
-
clickCallBack:
|
|
3758
|
+
clickCallBack: null,
|
|
3756
3759
|
},
|
|
3757
3760
|
animation: "pops-anim-fadein-zoom",
|
|
3758
3761
|
forbiddenScroll: false,
|
|
@@ -3843,6 +3846,7 @@ const PopsIframeConfig = () => {
|
|
|
3843
3846
|
icon: true,
|
|
3844
3847
|
text: "",
|
|
3845
3848
|
},
|
|
3849
|
+
useShadowRoot: true,
|
|
3846
3850
|
class: "",
|
|
3847
3851
|
url: window.location.href,
|
|
3848
3852
|
only: false,
|
|
@@ -3853,7 +3857,7 @@ const PopsIframeConfig = () => {
|
|
|
3853
3857
|
toClose: false,
|
|
3854
3858
|
toHide: false,
|
|
3855
3859
|
},
|
|
3856
|
-
clickCallBack:
|
|
3860
|
+
clickCallBack: null,
|
|
3857
3861
|
},
|
|
3858
3862
|
animation: "pops-anim-fadein-zoom",
|
|
3859
3863
|
position: "center",
|
|
@@ -3889,7 +3893,17 @@ const PopsIframeConfig = () => {
|
|
|
3889
3893
|
|
|
3890
3894
|
class PopsIframe {
|
|
3891
3895
|
constructor(details) {
|
|
3892
|
-
const
|
|
3896
|
+
const guid = popsUtils.getRandomGUID();
|
|
3897
|
+
// 设置当前类型
|
|
3898
|
+
const PopsType = "iframe";
|
|
3899
|
+
let config = PopsIframeConfig();
|
|
3900
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3901
|
+
config = popsUtils.assign(config, details);
|
|
3902
|
+
if (config.url == null) {
|
|
3903
|
+
throw "config.url不能为空";
|
|
3904
|
+
}
|
|
3905
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3906
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3893
3907
|
PopsHandler.handleInit($shadowRoot, [
|
|
3894
3908
|
pops.config.cssText.index,
|
|
3895
3909
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3898,16 +3912,9 @@ class PopsIframe {
|
|
|
3898
3912
|
pops.config.cssText.common,
|
|
3899
3913
|
pops.config.cssText.iframeCSS,
|
|
3900
3914
|
]);
|
|
3901
|
-
let
|
|
3902
|
-
|
|
3903
|
-
config
|
|
3904
|
-
if (config.url == null) {
|
|
3905
|
-
throw "config.url不能为空";
|
|
3906
|
-
}
|
|
3907
|
-
let guid = popsUtils.getRandomGUID();
|
|
3908
|
-
const PopsType = "iframe";
|
|
3909
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3910
|
-
let maskExtraStyle = config.animation != null && config.animation != ""
|
|
3915
|
+
let maskExtraStyle =
|
|
3916
|
+
// @ts-ignore
|
|
3917
|
+
config.animation != null && config.animation != ""
|
|
3911
3918
|
? "position:absolute;"
|
|
3912
3919
|
: "";
|
|
3913
3920
|
// 先把z-index提取出来
|
|
@@ -4136,12 +4143,17 @@ const PopsDrawerConfig = () => {
|
|
|
4136
4143
|
position: "center",
|
|
4137
4144
|
text: "默认标题",
|
|
4138
4145
|
html: false,
|
|
4146
|
+
style: "",
|
|
4139
4147
|
},
|
|
4140
4148
|
content: {
|
|
4141
4149
|
text: "默认内容",
|
|
4142
4150
|
html: false,
|
|
4151
|
+
style: "",
|
|
4143
4152
|
},
|
|
4144
4153
|
btn: {
|
|
4154
|
+
merge: false,
|
|
4155
|
+
mergeReverse: false,
|
|
4156
|
+
reverse: false,
|
|
4145
4157
|
position: "flex-end",
|
|
4146
4158
|
ok: {
|
|
4147
4159
|
enable: true,
|
|
@@ -4151,8 +4163,8 @@ const PopsDrawerConfig = () => {
|
|
|
4151
4163
|
iconIsLoading: false,
|
|
4152
4164
|
text: "确定",
|
|
4153
4165
|
type: "primary",
|
|
4154
|
-
callback(
|
|
4155
|
-
|
|
4166
|
+
callback(detail) {
|
|
4167
|
+
detail.close();
|
|
4156
4168
|
},
|
|
4157
4169
|
},
|
|
4158
4170
|
cancel: {
|
|
@@ -4163,8 +4175,8 @@ const PopsDrawerConfig = () => {
|
|
|
4163
4175
|
iconIsLoading: false,
|
|
4164
4176
|
text: "关闭",
|
|
4165
4177
|
type: "default",
|
|
4166
|
-
callback(
|
|
4167
|
-
|
|
4178
|
+
callback(detail) {
|
|
4179
|
+
detail.close();
|
|
4168
4180
|
},
|
|
4169
4181
|
},
|
|
4170
4182
|
other: {
|
|
@@ -4175,14 +4187,14 @@ const PopsDrawerConfig = () => {
|
|
|
4175
4187
|
iconIsLoading: false,
|
|
4176
4188
|
text: "其它按钮",
|
|
4177
4189
|
type: "default",
|
|
4178
|
-
callback(
|
|
4179
|
-
|
|
4190
|
+
callback(detail) {
|
|
4191
|
+
detail.close();
|
|
4180
4192
|
},
|
|
4181
4193
|
},
|
|
4182
4194
|
close: {
|
|
4183
4195
|
enable: true,
|
|
4184
|
-
callback(
|
|
4185
|
-
|
|
4196
|
+
callback(detail) {
|
|
4197
|
+
detail.close();
|
|
4186
4198
|
},
|
|
4187
4199
|
},
|
|
4188
4200
|
},
|
|
@@ -4192,8 +4204,9 @@ const PopsDrawerConfig = () => {
|
|
|
4192
4204
|
toClose: true,
|
|
4193
4205
|
toHide: false,
|
|
4194
4206
|
},
|
|
4195
|
-
clickCallBack:
|
|
4207
|
+
clickCallBack: null,
|
|
4196
4208
|
},
|
|
4209
|
+
useShadowRoot: true,
|
|
4197
4210
|
class: "",
|
|
4198
4211
|
zIndex: 10000,
|
|
4199
4212
|
only: false,
|
|
@@ -4212,7 +4225,14 @@ const PopsDrawerConfig = () => {
|
|
|
4212
4225
|
|
|
4213
4226
|
class PopsDrawer {
|
|
4214
4227
|
constructor(details) {
|
|
4215
|
-
const
|
|
4228
|
+
const guid = popsUtils.getRandomGUID();
|
|
4229
|
+
// 设置当前类型
|
|
4230
|
+
const PopsType = "drawer";
|
|
4231
|
+
let config = PopsDrawerConfig();
|
|
4232
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4233
|
+
config = popsUtils.assign(config, details);
|
|
4234
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
4235
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4216
4236
|
PopsHandler.handleInit($shadowRoot, [
|
|
4217
4237
|
pops.config.cssText.index,
|
|
4218
4238
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -4222,12 +4242,6 @@ class PopsDrawer {
|
|
|
4222
4242
|
pops.config.cssText.common,
|
|
4223
4243
|
pops.config.cssText.drawerCSS,
|
|
4224
4244
|
]);
|
|
4225
|
-
let config = PopsDrawerConfig();
|
|
4226
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4227
|
-
config = popsUtils.assign(config, details);
|
|
4228
|
-
let guid = popsUtils.getRandomGUID();
|
|
4229
|
-
const PopsType = "drawer";
|
|
4230
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
4231
4245
|
// 先把z-index提取出来
|
|
4232
4246
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4233
4247
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -4460,8 +4474,8 @@ const PopsFolderConfig = () => {
|
|
|
4460
4474
|
iconIsLoading: false,
|
|
4461
4475
|
text: "确定",
|
|
4462
4476
|
type: "primary",
|
|
4463
|
-
callback(
|
|
4464
|
-
|
|
4477
|
+
callback(detail) {
|
|
4478
|
+
detail.close();
|
|
4465
4479
|
},
|
|
4466
4480
|
},
|
|
4467
4481
|
cancel: {
|
|
@@ -4472,8 +4486,8 @@ const PopsFolderConfig = () => {
|
|
|
4472
4486
|
iconIsLoading: false,
|
|
4473
4487
|
text: "关闭",
|
|
4474
4488
|
type: "default",
|
|
4475
|
-
callback(
|
|
4476
|
-
|
|
4489
|
+
callback(detail) {
|
|
4490
|
+
detail.close();
|
|
4477
4491
|
},
|
|
4478
4492
|
},
|
|
4479
4493
|
other: {
|
|
@@ -4484,17 +4498,18 @@ const PopsFolderConfig = () => {
|
|
|
4484
4498
|
iconIsLoading: false,
|
|
4485
4499
|
text: "其它按钮",
|
|
4486
4500
|
type: "default",
|
|
4487
|
-
callback(
|
|
4488
|
-
|
|
4501
|
+
callback(detail) {
|
|
4502
|
+
detail.close();
|
|
4489
4503
|
},
|
|
4490
4504
|
},
|
|
4491
4505
|
close: {
|
|
4492
4506
|
enable: true,
|
|
4493
|
-
callback(
|
|
4494
|
-
|
|
4507
|
+
callback(detail) {
|
|
4508
|
+
detail.close();
|
|
4495
4509
|
},
|
|
4496
4510
|
},
|
|
4497
4511
|
},
|
|
4512
|
+
useShadowRoot: true,
|
|
4498
4513
|
class: "",
|
|
4499
4514
|
only: false,
|
|
4500
4515
|
width: "500px",
|
|
@@ -4508,7 +4523,7 @@ const PopsFolderConfig = () => {
|
|
|
4508
4523
|
toClose: false,
|
|
4509
4524
|
toHide: false,
|
|
4510
4525
|
},
|
|
4511
|
-
clickCallBack:
|
|
4526
|
+
clickCallBack: null,
|
|
4512
4527
|
},
|
|
4513
4528
|
drag: false,
|
|
4514
4529
|
dragLimit: true,
|
|
@@ -4551,7 +4566,14 @@ const Folder_ICON = {
|
|
|
4551
4566
|
|
|
4552
4567
|
class PopsFolder {
|
|
4553
4568
|
constructor(details) {
|
|
4554
|
-
const
|
|
4569
|
+
const guid = popsUtils.getRandomGUID();
|
|
4570
|
+
// 设置当前类型
|
|
4571
|
+
const PopsType = "folder";
|
|
4572
|
+
let config = PopsFolderConfig();
|
|
4573
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4574
|
+
config = popsUtils.assign(config, details);
|
|
4575
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
4576
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4555
4577
|
PopsHandler.handleInit($shadowRoot, [
|
|
4556
4578
|
pops.config.cssText.index,
|
|
4557
4579
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -4561,15 +4583,18 @@ class PopsFolder {
|
|
|
4561
4583
|
pops.config.cssText.common,
|
|
4562
4584
|
pops.config.cssText.folderCSS,
|
|
4563
4585
|
]);
|
|
4564
|
-
let config = PopsFolderConfig();
|
|
4565
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4566
|
-
config = popsUtils.assign(config, details);
|
|
4567
4586
|
/* 办公几件套 */
|
|
4587
|
+
// @ts-ignore
|
|
4568
4588
|
Folder_ICON.docx = Folder_ICON.doc;
|
|
4589
|
+
// @ts-ignore;
|
|
4569
4590
|
Folder_ICON.rtf = Folder_ICON.doc;
|
|
4591
|
+
// @ts-ignore
|
|
4570
4592
|
Folder_ICON.xlsx = Folder_ICON.xls;
|
|
4593
|
+
// @ts-ignore
|
|
4571
4594
|
Folder_ICON.pptx = Folder_ICON.ppt;
|
|
4595
|
+
// @ts-ignore;
|
|
4572
4596
|
Folder_ICON.dmg = Folder_ICON.ipa;
|
|
4597
|
+
// @ts-ignore
|
|
4573
4598
|
Folder_ICON.json = Folder_ICON.js;
|
|
4574
4599
|
/* 压缩包 */
|
|
4575
4600
|
let zipIconList = [
|
|
@@ -4606,23 +4631,25 @@ class PopsFolder {
|
|
|
4606
4631
|
/* Android安装包 */
|
|
4607
4632
|
let androidIconList = ["apk", "apkm", "xapk"];
|
|
4608
4633
|
zipIconList.forEach((keyName) => {
|
|
4634
|
+
// @ts-ignore
|
|
4609
4635
|
Folder_ICON[keyName] = Folder_ICON.zip;
|
|
4610
4636
|
});
|
|
4611
4637
|
imageIconList.forEach((keyName) => {
|
|
4638
|
+
// @ts-ignore
|
|
4612
4639
|
Folder_ICON[keyName] = Folder_ICON.png;
|
|
4613
4640
|
});
|
|
4614
4641
|
codeLanguageIconList.forEach((keyName) => {
|
|
4642
|
+
// @ts-ignore
|
|
4615
4643
|
Folder_ICON[keyName] = Folder_ICON.html;
|
|
4616
4644
|
});
|
|
4617
4645
|
androidIconList.forEach((keyName) => {
|
|
4646
|
+
// @ts-ignore
|
|
4618
4647
|
Folder_ICON[keyName] = Folder_ICON.apk;
|
|
4619
4648
|
});
|
|
4620
4649
|
if (details?.folder) {
|
|
4650
|
+
// @ts-ignore
|
|
4621
4651
|
config.folder = details.folder;
|
|
4622
4652
|
}
|
|
4623
|
-
let guid = popsUtils.getRandomGUID();
|
|
4624
|
-
const PopsType = "folder";
|
|
4625
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
4626
4653
|
// 先把z-index提取出来
|
|
4627
4654
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4628
4655
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -5359,6 +5386,9 @@ const PopsPanelConfig = () => {
|
|
|
5359
5386
|
className: "panel-switch",
|
|
5360
5387
|
text: "switch",
|
|
5361
5388
|
type: "switch",
|
|
5389
|
+
// @ts-ignore
|
|
5390
|
+
props: {},
|
|
5391
|
+
disabled: false,
|
|
5362
5392
|
attributes: [],
|
|
5363
5393
|
getValue() {
|
|
5364
5394
|
return true;
|
|
@@ -5371,6 +5401,8 @@ const PopsPanelConfig = () => {
|
|
|
5371
5401
|
className: "panel-slider",
|
|
5372
5402
|
text: "slider",
|
|
5373
5403
|
type: "slider",
|
|
5404
|
+
// @ts-ignore
|
|
5405
|
+
props: {},
|
|
5374
5406
|
attributes: [],
|
|
5375
5407
|
getValue() {
|
|
5376
5408
|
return 50;
|
|
@@ -5385,6 +5417,8 @@ const PopsPanelConfig = () => {
|
|
|
5385
5417
|
className: "panel-button",
|
|
5386
5418
|
text: "button",
|
|
5387
5419
|
type: "button",
|
|
5420
|
+
// @ts-ignore
|
|
5421
|
+
props: {},
|
|
5388
5422
|
attributes: [],
|
|
5389
5423
|
buttonIcon: "eleme",
|
|
5390
5424
|
buttonIconIsLoading: true,
|
|
@@ -5397,6 +5431,8 @@ const PopsPanelConfig = () => {
|
|
|
5397
5431
|
{
|
|
5398
5432
|
className: "panel-button",
|
|
5399
5433
|
text: "button",
|
|
5434
|
+
// @ts-ignore
|
|
5435
|
+
props: {},
|
|
5400
5436
|
type: "button",
|
|
5401
5437
|
attributes: [],
|
|
5402
5438
|
buttonIcon: "chromeFilled",
|
|
@@ -5412,6 +5448,8 @@ const PopsPanelConfig = () => {
|
|
|
5412
5448
|
text: "button",
|
|
5413
5449
|
type: "button",
|
|
5414
5450
|
attributes: [],
|
|
5451
|
+
// @ts-ignore
|
|
5452
|
+
props: {},
|
|
5415
5453
|
buttonIcon: "upload",
|
|
5416
5454
|
buttonIconIsLoading: false,
|
|
5417
5455
|
buttonType: "info",
|
|
@@ -5440,6 +5478,8 @@ const PopsPanelConfig = () => {
|
|
|
5440
5478
|
className: "panel-input",
|
|
5441
5479
|
text: "input",
|
|
5442
5480
|
type: "input",
|
|
5481
|
+
// @ts-ignore
|
|
5482
|
+
props: {},
|
|
5443
5483
|
attributes: [],
|
|
5444
5484
|
getValue() {
|
|
5445
5485
|
return "50";
|
|
@@ -5453,6 +5493,8 @@ const PopsPanelConfig = () => {
|
|
|
5453
5493
|
className: "panel-input-password",
|
|
5454
5494
|
text: "input-password",
|
|
5455
5495
|
type: "input",
|
|
5496
|
+
// @ts-ignore
|
|
5497
|
+
props: {},
|
|
5456
5498
|
attributes: [],
|
|
5457
5499
|
getValue() {
|
|
5458
5500
|
return "123456";
|
|
@@ -5467,6 +5509,8 @@ const PopsPanelConfig = () => {
|
|
|
5467
5509
|
className: "panel-textarea",
|
|
5468
5510
|
text: "textarea",
|
|
5469
5511
|
type: "textarea",
|
|
5512
|
+
// @ts-ignore
|
|
5513
|
+
props: {},
|
|
5470
5514
|
attributes: [],
|
|
5471
5515
|
getValue() {
|
|
5472
5516
|
return "50";
|
|
@@ -5480,6 +5524,8 @@ const PopsPanelConfig = () => {
|
|
|
5480
5524
|
className: "panel-select",
|
|
5481
5525
|
text: "select",
|
|
5482
5526
|
type: "select",
|
|
5527
|
+
// @ts-ignore
|
|
5528
|
+
props: {},
|
|
5483
5529
|
attributes: [],
|
|
5484
5530
|
getValue() {
|
|
5485
5531
|
return 50;
|
|
@@ -5491,14 +5537,23 @@ const PopsPanelConfig = () => {
|
|
|
5491
5537
|
{
|
|
5492
5538
|
value: "all",
|
|
5493
5539
|
text: "所有",
|
|
5540
|
+
disable() {
|
|
5541
|
+
return false;
|
|
5542
|
+
},
|
|
5494
5543
|
},
|
|
5495
5544
|
{
|
|
5496
5545
|
value: "text",
|
|
5497
5546
|
text: "文本",
|
|
5547
|
+
disable() {
|
|
5548
|
+
return false;
|
|
5549
|
+
},
|
|
5498
5550
|
},
|
|
5499
5551
|
{
|
|
5500
5552
|
value: "html",
|
|
5501
5553
|
text: "超文本",
|
|
5554
|
+
disable() {
|
|
5555
|
+
return false;
|
|
5556
|
+
},
|
|
5502
5557
|
},
|
|
5503
5558
|
],
|
|
5504
5559
|
},
|
|
@@ -5506,6 +5561,8 @@ const PopsPanelConfig = () => {
|
|
|
5506
5561
|
className: "panel-select-multiple",
|
|
5507
5562
|
type: "select-multiple",
|
|
5508
5563
|
text: "select-multiple",
|
|
5564
|
+
// @ts-ignore
|
|
5565
|
+
props: {},
|
|
5509
5566
|
attributes: [],
|
|
5510
5567
|
placeholder: "请至少选择一个选项",
|
|
5511
5568
|
getValue() {
|
|
@@ -5524,22 +5581,42 @@ const PopsPanelConfig = () => {
|
|
|
5524
5581
|
{
|
|
5525
5582
|
value: "select-1",
|
|
5526
5583
|
text: "单选1",
|
|
5584
|
+
isHTML: false,
|
|
5585
|
+
disable() {
|
|
5586
|
+
return false;
|
|
5587
|
+
},
|
|
5527
5588
|
},
|
|
5528
5589
|
{
|
|
5529
5590
|
value: "select-2",
|
|
5530
5591
|
text: "单选2",
|
|
5592
|
+
isHTML: false,
|
|
5593
|
+
disable() {
|
|
5594
|
+
return false;
|
|
5595
|
+
},
|
|
5531
5596
|
},
|
|
5532
5597
|
{
|
|
5533
5598
|
value: "select-3",
|
|
5534
5599
|
text: "单选3",
|
|
5600
|
+
isHTML: false,
|
|
5601
|
+
disable() {
|
|
5602
|
+
return false;
|
|
5603
|
+
},
|
|
5535
5604
|
},
|
|
5536
5605
|
{
|
|
5537
5606
|
value: "select-4",
|
|
5538
5607
|
text: "单选4",
|
|
5608
|
+
isHTML: false,
|
|
5609
|
+
disable() {
|
|
5610
|
+
return false;
|
|
5611
|
+
},
|
|
5539
5612
|
},
|
|
5540
5613
|
{
|
|
5541
5614
|
value: "select-5",
|
|
5542
5615
|
text: "单选5",
|
|
5616
|
+
isHTML: false,
|
|
5617
|
+
disable() {
|
|
5618
|
+
return false;
|
|
5619
|
+
},
|
|
5543
5620
|
},
|
|
5544
5621
|
],
|
|
5545
5622
|
},
|
|
@@ -5571,6 +5648,8 @@ const PopsPanelConfig = () => {
|
|
|
5571
5648
|
className: "panel-switch",
|
|
5572
5649
|
text: "switch",
|
|
5573
5650
|
type: "switch",
|
|
5651
|
+
// @ts-ignore
|
|
5652
|
+
props: {},
|
|
5574
5653
|
attributes: [],
|
|
5575
5654
|
getValue() {
|
|
5576
5655
|
return true;
|
|
@@ -5582,6 +5661,8 @@ const PopsPanelConfig = () => {
|
|
|
5582
5661
|
{
|
|
5583
5662
|
className: "panel-slider",
|
|
5584
5663
|
text: "slider",
|
|
5664
|
+
// @ts-ignore
|
|
5665
|
+
props: {},
|
|
5585
5666
|
type: "slider",
|
|
5586
5667
|
attributes: [],
|
|
5587
5668
|
getValue() {
|
|
@@ -5596,6 +5677,8 @@ const PopsPanelConfig = () => {
|
|
|
5596
5677
|
{
|
|
5597
5678
|
className: "panel-button",
|
|
5598
5679
|
text: "button",
|
|
5680
|
+
// @ts-ignore
|
|
5681
|
+
props: {},
|
|
5599
5682
|
type: "button",
|
|
5600
5683
|
attributes: [],
|
|
5601
5684
|
buttonIcon: "eleme",
|
|
@@ -5610,6 +5693,8 @@ const PopsPanelConfig = () => {
|
|
|
5610
5693
|
className: "panel-button",
|
|
5611
5694
|
text: "button",
|
|
5612
5695
|
type: "button",
|
|
5696
|
+
// @ts-ignore
|
|
5697
|
+
props: {},
|
|
5613
5698
|
attributes: [],
|
|
5614
5699
|
buttonIcon: "chromeFilled",
|
|
5615
5700
|
buttonIconIsLoading: true,
|
|
@@ -5622,6 +5707,8 @@ const PopsPanelConfig = () => {
|
|
|
5622
5707
|
{
|
|
5623
5708
|
className: "panel-button",
|
|
5624
5709
|
text: "button",
|
|
5710
|
+
// @ts-ignore
|
|
5711
|
+
props: {},
|
|
5625
5712
|
type: "button",
|
|
5626
5713
|
attributes: [],
|
|
5627
5714
|
buttonIcon: "upload",
|
|
@@ -5649,6 +5736,8 @@ const PopsPanelConfig = () => {
|
|
|
5649
5736
|
{
|
|
5650
5737
|
className: "panel-switch",
|
|
5651
5738
|
text: "switch",
|
|
5739
|
+
// @ts-ignore
|
|
5740
|
+
props: {},
|
|
5652
5741
|
type: "switch",
|
|
5653
5742
|
attributes: [],
|
|
5654
5743
|
getValue() {
|
|
@@ -5677,8 +5766,9 @@ const PopsPanelConfig = () => {
|
|
|
5677
5766
|
toClose: false,
|
|
5678
5767
|
toHide: false,
|
|
5679
5768
|
},
|
|
5680
|
-
clickCallBack:
|
|
5769
|
+
clickCallBack: null,
|
|
5681
5770
|
},
|
|
5771
|
+
useShadowRoot: true,
|
|
5682
5772
|
class: "",
|
|
5683
5773
|
mobileClassName: "pops-panel-is-mobile",
|
|
5684
5774
|
isMobile: false,
|
|
@@ -8186,7 +8276,17 @@ const PanelHandleContentDetails = () => {
|
|
|
8186
8276
|
|
|
8187
8277
|
class PopsPanel {
|
|
8188
8278
|
constructor(details) {
|
|
8189
|
-
const
|
|
8279
|
+
const guid = popsUtils.getRandomGUID();
|
|
8280
|
+
// 设置当前类型
|
|
8281
|
+
const PopsType = "panel";
|
|
8282
|
+
let config = PopsPanelConfig();
|
|
8283
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8284
|
+
config = popsUtils.assign(config, details);
|
|
8285
|
+
if (details && Array.isArray(details.content)) {
|
|
8286
|
+
config.content = details.content;
|
|
8287
|
+
}
|
|
8288
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
8289
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
8190
8290
|
PopsHandler.handleInit($shadowRoot, [
|
|
8191
8291
|
pops.config.cssText.index,
|
|
8192
8292
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -8196,15 +8296,6 @@ class PopsPanel {
|
|
|
8196
8296
|
pops.config.cssText.common,
|
|
8197
8297
|
pops.config.cssText.panelCSS,
|
|
8198
8298
|
]);
|
|
8199
|
-
let config = PopsPanelConfig();
|
|
8200
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8201
|
-
config = popsUtils.assign(config, details);
|
|
8202
|
-
if (details && Array.isArray(details.content)) {
|
|
8203
|
-
config.content = details.content;
|
|
8204
|
-
}
|
|
8205
|
-
let guid = popsUtils.getRandomGUID();
|
|
8206
|
-
const PopsType = "panel";
|
|
8207
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
8208
8299
|
// 先把z-index提取出来
|
|
8209
8300
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
8210
8301
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -8316,6 +8407,7 @@ const rightClickMenuConfig = () => {
|
|
|
8316
8407
|
icon: pops.config.iconSVG.search,
|
|
8317
8408
|
iconIsLoading: false,
|
|
8318
8409
|
text: "搜索",
|
|
8410
|
+
item: [],
|
|
8319
8411
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8320
8412
|
console.log("点击:" + this.text, [
|
|
8321
8413
|
clickEvent,
|
|
@@ -8328,6 +8420,7 @@ const rightClickMenuConfig = () => {
|
|
|
8328
8420
|
icon: pops.config.iconSVG.documentCopy,
|
|
8329
8421
|
iconIsLoading: false,
|
|
8330
8422
|
text: "复制",
|
|
8423
|
+
item: [],
|
|
8331
8424
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8332
8425
|
console.log("点击:" + this.text, [
|
|
8333
8426
|
clickEvent,
|
|
@@ -8340,6 +8433,7 @@ const rightClickMenuConfig = () => {
|
|
|
8340
8433
|
icon: pops.config.iconSVG.delete,
|
|
8341
8434
|
text: "删除",
|
|
8342
8435
|
iconIsLoading: false,
|
|
8436
|
+
item: [],
|
|
8343
8437
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8344
8438
|
console.log("点击:" + this.text, [
|
|
8345
8439
|
clickEvent,
|
|
@@ -8352,6 +8446,7 @@ const rightClickMenuConfig = () => {
|
|
|
8352
8446
|
icon: pops.config.iconSVG.loading,
|
|
8353
8447
|
iconIsLoading: true,
|
|
8354
8448
|
text: "加载",
|
|
8449
|
+
item: [],
|
|
8355
8450
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8356
8451
|
console.log("点击:" + this.text, [
|
|
8357
8452
|
clickEvent,
|
|
@@ -8378,6 +8473,7 @@ const rightClickMenuConfig = () => {
|
|
|
8378
8473
|
icon: "",
|
|
8379
8474
|
iconIsLoading: false,
|
|
8380
8475
|
text: "处理文件",
|
|
8476
|
+
item: [],
|
|
8381
8477
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8382
8478
|
console.log("点击:" + this.text, [
|
|
8383
8479
|
clickEvent,
|
|
@@ -8402,6 +8498,7 @@ const rightClickMenuConfig = () => {
|
|
|
8402
8498
|
icon: pops.config.iconSVG.view,
|
|
8403
8499
|
iconIsLoading: false,
|
|
8404
8500
|
text: "查看",
|
|
8501
|
+
item: [],
|
|
8405
8502
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8406
8503
|
console.log("点击:" + this.text, [
|
|
8407
8504
|
clickEvent,
|
|
@@ -8415,6 +8512,7 @@ const rightClickMenuConfig = () => {
|
|
|
8415
8512
|
],
|
|
8416
8513
|
},
|
|
8417
8514
|
],
|
|
8515
|
+
useShadowRoot: true,
|
|
8418
8516
|
className: "",
|
|
8419
8517
|
isAnimation: true,
|
|
8420
8518
|
only: false,
|
|
@@ -8427,25 +8525,27 @@ const rightClickMenuConfig = () => {
|
|
|
8427
8525
|
|
|
8428
8526
|
class PopsRightClickMenu {
|
|
8429
8527
|
constructor(details) {
|
|
8430
|
-
const
|
|
8431
|
-
|
|
8432
|
-
|
|
8433
|
-
pops.config.cssText.anim,
|
|
8434
|
-
pops.config.cssText.common,
|
|
8435
|
-
pops.config.cssText.rightClickMenu,
|
|
8436
|
-
]);
|
|
8528
|
+
const guid = popsUtils.getRandomGUID();
|
|
8529
|
+
// 设置当前类型
|
|
8530
|
+
const PopsType = "rightClickMenu";
|
|
8437
8531
|
let config = rightClickMenuConfig();
|
|
8438
8532
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8439
8533
|
config = popsUtils.assign(config, details);
|
|
8534
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
8440
8535
|
if (config.target == null) {
|
|
8441
8536
|
throw "config.target 不能为空";
|
|
8442
8537
|
}
|
|
8443
8538
|
if (details.data) {
|
|
8539
|
+
// @ts-ignore
|
|
8444
8540
|
config.data = details.data;
|
|
8445
8541
|
}
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8542
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
8543
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
8544
|
+
pops.config.cssText.index,
|
|
8545
|
+
pops.config.cssText.anim,
|
|
8546
|
+
pops.config.cssText.common,
|
|
8547
|
+
pops.config.cssText.rightClickMenu,
|
|
8548
|
+
]);
|
|
8449
8549
|
if (config.style != null) {
|
|
8450
8550
|
let cssNode = document.createElement("style");
|
|
8451
8551
|
cssNode.setAttribute("type", "text/css");
|
|
@@ -8872,6 +8972,7 @@ const searchSuggestionConfig = () => {
|
|
|
8872
8972
|
liElement.remove();
|
|
8873
8973
|
},
|
|
8874
8974
|
},
|
|
8975
|
+
useShadowRoot: true,
|
|
8875
8976
|
className: "",
|
|
8876
8977
|
isAbsolute: true,
|
|
8877
8978
|
isAnimation: true,
|
|
@@ -8906,12 +9007,9 @@ const searchSuggestionConfig = () => {
|
|
|
8906
9007
|
|
|
8907
9008
|
class PopsSearchSuggestion {
|
|
8908
9009
|
constructor(details) {
|
|
8909
|
-
const
|
|
8910
|
-
|
|
8911
|
-
|
|
8912
|
-
pops.config.cssText.anim,
|
|
8913
|
-
pops.config.cssText.common,
|
|
8914
|
-
]);
|
|
9010
|
+
const guid = popsUtils.getRandomGUID();
|
|
9011
|
+
// 设置当前类型
|
|
9012
|
+
const PopsType = "searchSuggestion";
|
|
8915
9013
|
let config = searchSuggestionConfig();
|
|
8916
9014
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8917
9015
|
config = popsUtils.assign(config, details);
|
|
@@ -8925,8 +9023,12 @@ class PopsSearchSuggestion {
|
|
|
8925
9023
|
if (details.data) {
|
|
8926
9024
|
config.data = details.data;
|
|
8927
9025
|
}
|
|
8928
|
-
const
|
|
8929
|
-
|
|
9026
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
9027
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
9028
|
+
pops.config.cssText.index,
|
|
9029
|
+
pops.config.cssText.anim,
|
|
9030
|
+
pops.config.cssText.common,
|
|
9031
|
+
]);
|
|
8930
9032
|
if (config.style != null) {
|
|
8931
9033
|
let cssNode = document.createElement("style");
|
|
8932
9034
|
cssNode.setAttribute("type", "text/css");
|
|
@@ -9449,8 +9551,9 @@ class PopsSearchSuggestion {
|
|
|
9449
9551
|
}
|
|
9450
9552
|
|
|
9451
9553
|
const PopsTooltipConfig = () => {
|
|
9554
|
+
// @ts-ignore
|
|
9452
9555
|
return {
|
|
9453
|
-
|
|
9556
|
+
useShadowRoot: true,
|
|
9454
9557
|
target: null,
|
|
9455
9558
|
content: "默认文字",
|
|
9456
9559
|
position: "top",
|
|
@@ -9470,6 +9573,8 @@ const PopsTooltipConfig = () => {
|
|
|
9470
9573
|
showAfterCallBack() { },
|
|
9471
9574
|
closeBeforeCallBack() { },
|
|
9472
9575
|
closeAfterCallBack() { },
|
|
9576
|
+
delayCloseTime: 100,
|
|
9577
|
+
showArrow: true,
|
|
9473
9578
|
arrowDistance: 12.5,
|
|
9474
9579
|
otherDistance: 0,
|
|
9475
9580
|
style: "",
|
|
@@ -9544,6 +9649,10 @@ class ToolTip {
|
|
|
9544
9649
|
});
|
|
9545
9650
|
$toolTipContainer.appendChild(cssNode);
|
|
9546
9651
|
}
|
|
9652
|
+
// 处理是否显示箭头元素
|
|
9653
|
+
if (!this.$data.config.showArrow) {
|
|
9654
|
+
$toolTipArrow.remove();
|
|
9655
|
+
}
|
|
9547
9656
|
return {
|
|
9548
9657
|
$toolTipContainer: $toolTipContainer,
|
|
9549
9658
|
$toolTipArrow: $toolTipArrow,
|
|
@@ -9583,12 +9692,12 @@ class ToolTip {
|
|
|
9583
9692
|
this.$el.$toolTip.style.setProperty("z-index", zIndex.toString());
|
|
9584
9693
|
}
|
|
9585
9694
|
/**
|
|
9586
|
-
*
|
|
9695
|
+
* 计算 提示框的位置
|
|
9587
9696
|
* @param targetElement 目标元素
|
|
9588
9697
|
* @param arrowDistance 箭头和目标元素的距离
|
|
9589
9698
|
* @param otherDistance 其它位置的偏移
|
|
9590
9699
|
*/
|
|
9591
|
-
|
|
9700
|
+
calcToolTipPosition(targetElement, arrowDistance, otherDistance) {
|
|
9592
9701
|
let offsetInfo = popsDOMUtils.offset(targetElement, !this.$data.config.isFixed);
|
|
9593
9702
|
// 目标 宽
|
|
9594
9703
|
let targetElement_width = offsetInfo.width;
|
|
@@ -9637,7 +9746,7 @@ class ToolTip {
|
|
|
9637
9746
|
* 动态修改tooltip的位置
|
|
9638
9747
|
*/
|
|
9639
9748
|
changePosition() {
|
|
9640
|
-
let positionInfo = this.
|
|
9749
|
+
let positionInfo = this.calcToolTipPosition(this.$data.config.target, this.$data.config.arrowDistance, this.$data.config.otherDistance);
|
|
9641
9750
|
let positionKey = this.$data.config.position.toUpperCase();
|
|
9642
9751
|
let positionDetail = positionInfo[positionKey];
|
|
9643
9752
|
if (positionDetail) {
|
|
@@ -9766,8 +9875,8 @@ class ToolTip {
|
|
|
9766
9875
|
// 其它的如Touch事件不做处理
|
|
9767
9876
|
if (event && event instanceof MouseEvent) {
|
|
9768
9877
|
let $target = event.composedPath()[0];
|
|
9769
|
-
//
|
|
9770
|
-
if ($target != this.$data.config.target) {
|
|
9878
|
+
// 如果是目标元素的子元素/tooltip元素的子元素触发的话,那就不管
|
|
9879
|
+
if ($target != this.$data.config.target && $target != this.$el.$toolTip) {
|
|
9771
9880
|
return;
|
|
9772
9881
|
}
|
|
9773
9882
|
}
|
|
@@ -9785,6 +9894,10 @@ class ToolTip {
|
|
|
9785
9894
|
let timeId = setTimeout(() => {
|
|
9786
9895
|
// 设置属性触发关闭动画
|
|
9787
9896
|
this.clearCloseTimeoutId(eventType, timeId);
|
|
9897
|
+
if (this.$el.$toolTip == null) {
|
|
9898
|
+
// 已清除了
|
|
9899
|
+
return;
|
|
9900
|
+
}
|
|
9788
9901
|
this.$el.$toolTip.setAttribute("data-motion", this.$el.$toolTip
|
|
9789
9902
|
.getAttribute("data-motion")
|
|
9790
9903
|
.replace("fadeIn", "fadeOut"));
|
|
@@ -9850,7 +9963,10 @@ class ToolTip {
|
|
|
9850
9963
|
* 鼠标|触摸进入事件
|
|
9851
9964
|
*/
|
|
9852
9965
|
toolTipMouseEnterEvent() {
|
|
9853
|
-
this
|
|
9966
|
+
this.clearCloseTimeoutId("MouseEvent");
|
|
9967
|
+
this.clearCloseTimeoutId("TouchEvent");
|
|
9968
|
+
// 重置动画状态
|
|
9969
|
+
// this.$el.$toolTip.style.animationPlayState = "paused";
|
|
9854
9970
|
// if (parseInt(getComputedStyle(toolTipElement)) > 0.5) {
|
|
9855
9971
|
// toolTipElement.style.animationPlayState = "paused";
|
|
9856
9972
|
// }
|
|
@@ -9872,8 +9988,9 @@ class ToolTip {
|
|
|
9872
9988
|
/**
|
|
9873
9989
|
* 鼠标|触摸离开事件
|
|
9874
9990
|
*/
|
|
9875
|
-
toolTipMouseLeaveEvent() {
|
|
9876
|
-
this
|
|
9991
|
+
toolTipMouseLeaveEvent(event) {
|
|
9992
|
+
this.close(event);
|
|
9993
|
+
// this.$el.$toolTip.style.animationPlayState = "running";
|
|
9877
9994
|
}
|
|
9878
9995
|
/**
|
|
9879
9996
|
* 监听鼠标|触摸离开事件
|
|
@@ -9890,22 +10007,23 @@ class ToolTip {
|
|
|
9890
10007
|
}
|
|
9891
10008
|
class PopsTooltip {
|
|
9892
10009
|
constructor(details) {
|
|
9893
|
-
const
|
|
9894
|
-
|
|
9895
|
-
|
|
9896
|
-
pops.config.cssText.anim,
|
|
9897
|
-
pops.config.cssText.common,
|
|
9898
|
-
pops.config.cssText.tooltipCSS,
|
|
9899
|
-
]);
|
|
10010
|
+
const guid = popsUtils.getRandomGUID();
|
|
10011
|
+
// 设置当前类型
|
|
10012
|
+
const PopsType = "tooltip";
|
|
9900
10013
|
let config = PopsTooltipConfig();
|
|
9901
10014
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
9902
10015
|
config = popsUtils.assign(config, details);
|
|
9903
10016
|
if (!(config.target instanceof HTMLElement)) {
|
|
9904
10017
|
throw "config.target 必须是HTMLElement类型";
|
|
9905
10018
|
}
|
|
9906
|
-
let guid = popsUtils.getRandomGUID();
|
|
9907
|
-
const PopsType = "tooltip";
|
|
9908
10019
|
config = PopsHandler.handleOnly(PopsType, config);
|
|
10020
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
10021
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
10022
|
+
pops.config.cssText.index,
|
|
10023
|
+
pops.config.cssText.anim,
|
|
10024
|
+
pops.config.cssText.common,
|
|
10025
|
+
pops.config.cssText.tooltipCSS,
|
|
10026
|
+
]);
|
|
9909
10027
|
let toolTip = new ToolTip(config, guid, {
|
|
9910
10028
|
$shadowContainer,
|
|
9911
10029
|
$shadowRoot,
|
|
@@ -9929,7 +10047,7 @@ class Pops {
|
|
|
9929
10047
|
/** 配置 */
|
|
9930
10048
|
config = {
|
|
9931
10049
|
/** 版本号 */
|
|
9932
|
-
version: "2024.11.
|
|
10050
|
+
version: "2024.11.24",
|
|
9933
10051
|
cssText: {
|
|
9934
10052
|
/** 主CSS */
|
|
9935
10053
|
index: indexCSS,
|