@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.system.js
CHANGED
|
@@ -1748,10 +1748,9 @@ System.register('pops', [], (function (exports) {
|
|
|
1748
1748
|
getPopsMaxZIndex(deviation = 1) {
|
|
1749
1749
|
deviation = Number.isNaN(deviation) ? 1 : deviation;
|
|
1750
1750
|
// 最大值 2147483647
|
|
1751
|
-
//
|
|
1752
|
-
// const maxZIndex = Math.pow(2, 31) - 1;
|
|
1751
|
+
// const browserMaxZIndex = Math.pow(2, 31) - 1;
|
|
1753
1752
|
// 比较值 2000000000
|
|
1754
|
-
const
|
|
1753
|
+
const maxZIndex = 2 * Math.pow(10, 9);
|
|
1755
1754
|
// 当前页面最大的z-index
|
|
1756
1755
|
let zIndex = 0;
|
|
1757
1756
|
// 当前的最大z-index的元素,调试使用
|
|
@@ -1781,17 +1780,18 @@ System.register('pops', [], (function (exports) {
|
|
|
1781
1780
|
}
|
|
1782
1781
|
});
|
|
1783
1782
|
zIndex += deviation;
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1783
|
+
let isOverMaxZIndex = zIndex >= maxZIndex;
|
|
1784
|
+
if (isOverMaxZIndex) {
|
|
1785
|
+
// 超出z-index最大值
|
|
1786
|
+
zIndex = maxZIndex;
|
|
1787
1787
|
}
|
|
1788
|
-
return { zIndex: zIndex, animElement: maxZIndexNode };
|
|
1788
|
+
return { zIndex: zIndex, animElement: maxZIndexNode, isOverMaxZIndex };
|
|
1789
1789
|
},
|
|
1790
1790
|
/**
|
|
1791
1791
|
* 获取页面中最大的z-index
|
|
1792
1792
|
* @param deviation 获取最大的z-index值的偏移,默认是+1
|
|
1793
1793
|
* @example
|
|
1794
|
-
*
|
|
1794
|
+
* getMaxZIndex();
|
|
1795
1795
|
* > 1001
|
|
1796
1796
|
**/
|
|
1797
1797
|
getMaxZIndex(deviation = 1) {
|
|
@@ -2281,7 +2281,7 @@ System.register('pops', [], (function (exports) {
|
|
|
2281
2281
|
},
|
|
2282
2282
|
};
|
|
2283
2283
|
|
|
2284
|
-
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";
|
|
2284
|
+
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";
|
|
2285
2285
|
|
|
2286
2286
|
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";
|
|
2287
2287
|
|
|
@@ -2474,7 +2474,7 @@ System.register('pops', [], (function (exports) {
|
|
|
2474
2474
|
<div
|
|
2475
2475
|
class="pops-anim"
|
|
2476
2476
|
anim="${__config.animation || ""}"
|
|
2477
|
-
style="${popsAnimStyle}
|
|
2477
|
+
style="${popsAnimStyle}"
|
|
2478
2478
|
data-guid="${guid}">
|
|
2479
2479
|
${config.style != null
|
|
2480
2480
|
? `<style tyle="text/css">${config.style}</style>`
|
|
@@ -2745,14 +2745,22 @@ System.register('pops', [], (function (exports) {
|
|
|
2745
2745
|
/**
|
|
2746
2746
|
* 创建shadow
|
|
2747
2747
|
*/
|
|
2748
|
-
handlerShadow() {
|
|
2748
|
+
handlerShadow(config) {
|
|
2749
2749
|
let $shadowContainer = document.createElement("div");
|
|
2750
2750
|
$shadowContainer.className = "pops-shadow-container";
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2755
|
-
|
|
2751
|
+
if (config.useShadowRoot) {
|
|
2752
|
+
let $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
|
|
2753
|
+
return {
|
|
2754
|
+
$shadowContainer,
|
|
2755
|
+
$shadowRoot,
|
|
2756
|
+
};
|
|
2757
|
+
}
|
|
2758
|
+
else {
|
|
2759
|
+
return {
|
|
2760
|
+
$shadowContainer,
|
|
2761
|
+
$shadowRoot: $shadowContainer,
|
|
2762
|
+
};
|
|
2763
|
+
}
|
|
2756
2764
|
},
|
|
2757
2765
|
/**
|
|
2758
2766
|
* 处理初始化
|
|
@@ -3149,17 +3157,11 @@ System.register('pops', [], (function (exports) {
|
|
|
3149
3157
|
else {
|
|
3150
3158
|
// 对配置进行处理
|
|
3151
3159
|
// 选择配置的z-index和已有的pops实例的最大z-index值
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
|
|
3155
|
-
|
|
3156
|
-
|
|
3157
|
-
};
|
|
3158
|
-
}
|
|
3159
|
-
else {
|
|
3160
|
-
const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(config.zIndex) + 100);
|
|
3161
|
-
config.zIndex = maxZIndex;
|
|
3162
|
-
}
|
|
3160
|
+
let originZIndex = config.zIndex;
|
|
3161
|
+
config.zIndex = () => {
|
|
3162
|
+
const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(originZIndex) + 100);
|
|
3163
|
+
return maxZIndex;
|
|
3164
|
+
};
|
|
3163
3165
|
}
|
|
3164
3166
|
return config;
|
|
3165
3167
|
},
|
|
@@ -3196,17 +3198,18 @@ System.register('pops', [], (function (exports) {
|
|
|
3196
3198
|
iconIsLoading: false,
|
|
3197
3199
|
text: "确定",
|
|
3198
3200
|
type: "primary",
|
|
3199
|
-
callback: function (
|
|
3200
|
-
|
|
3201
|
+
callback: function (details) {
|
|
3202
|
+
details.close();
|
|
3201
3203
|
},
|
|
3202
3204
|
},
|
|
3203
3205
|
close: {
|
|
3204
3206
|
enable: true,
|
|
3205
|
-
callback: function (
|
|
3206
|
-
|
|
3207
|
+
callback: function (details) {
|
|
3208
|
+
details.close();
|
|
3207
3209
|
},
|
|
3208
3210
|
},
|
|
3209
3211
|
},
|
|
3212
|
+
useShadowRoot: true,
|
|
3210
3213
|
class: "",
|
|
3211
3214
|
only: false,
|
|
3212
3215
|
width: "350px",
|
|
@@ -3220,7 +3223,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3220
3223
|
toClose: false,
|
|
3221
3224
|
toHide: false,
|
|
3222
3225
|
},
|
|
3223
|
-
clickCallBack:
|
|
3226
|
+
clickCallBack: null,
|
|
3224
3227
|
},
|
|
3225
3228
|
drag: false,
|
|
3226
3229
|
dragLimit: true,
|
|
@@ -3235,7 +3238,14 @@ System.register('pops', [], (function (exports) {
|
|
|
3235
3238
|
|
|
3236
3239
|
class PopsAlert {
|
|
3237
3240
|
constructor(details) {
|
|
3238
|
-
const
|
|
3241
|
+
const guid = popsUtils.getRandomGUID();
|
|
3242
|
+
// 设置当前类型
|
|
3243
|
+
const PopsType = "alert";
|
|
3244
|
+
let config = PopsAlertConfig();
|
|
3245
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3246
|
+
config = popsUtils.assign(config, details);
|
|
3247
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3248
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3239
3249
|
PopsHandler.handleInit($shadowRoot, [
|
|
3240
3250
|
pops.config.cssText.index,
|
|
3241
3251
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3245,13 +3255,6 @@ System.register('pops', [], (function (exports) {
|
|
|
3245
3255
|
pops.config.cssText.common,
|
|
3246
3256
|
pops.config.cssText.alertCSS,
|
|
3247
3257
|
]);
|
|
3248
|
-
let config = PopsAlertConfig();
|
|
3249
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3250
|
-
config = popsUtils.assign(config, details);
|
|
3251
|
-
let guid = popsUtils.getRandomGUID();
|
|
3252
|
-
// 设置当前类型
|
|
3253
|
-
const PopsType = "alert";
|
|
3254
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3255
3258
|
// 先把z-index提取出来
|
|
3256
3259
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3257
3260
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3362,8 +3365,8 @@ System.register('pops', [], (function (exports) {
|
|
|
3362
3365
|
iconIsLoading: false,
|
|
3363
3366
|
text: "确定",
|
|
3364
3367
|
type: "primary",
|
|
3365
|
-
callback(
|
|
3366
|
-
|
|
3368
|
+
callback(detail) {
|
|
3369
|
+
detail.close();
|
|
3367
3370
|
},
|
|
3368
3371
|
},
|
|
3369
3372
|
cancel: {
|
|
@@ -3374,8 +3377,8 @@ System.register('pops', [], (function (exports) {
|
|
|
3374
3377
|
iconIsLoading: false,
|
|
3375
3378
|
text: "关闭",
|
|
3376
3379
|
type: "default",
|
|
3377
|
-
callback(
|
|
3378
|
-
|
|
3380
|
+
callback(detail) {
|
|
3381
|
+
detail.close();
|
|
3379
3382
|
},
|
|
3380
3383
|
},
|
|
3381
3384
|
other: {
|
|
@@ -3386,17 +3389,18 @@ System.register('pops', [], (function (exports) {
|
|
|
3386
3389
|
iconIsLoading: false,
|
|
3387
3390
|
text: "其它按钮",
|
|
3388
3391
|
type: "default",
|
|
3389
|
-
callback(
|
|
3390
|
-
|
|
3392
|
+
callback(detail) {
|
|
3393
|
+
detail.close();
|
|
3391
3394
|
},
|
|
3392
3395
|
},
|
|
3393
3396
|
close: {
|
|
3394
3397
|
enable: true,
|
|
3395
|
-
callback(
|
|
3396
|
-
|
|
3398
|
+
callback(detail) {
|
|
3399
|
+
detail.close();
|
|
3397
3400
|
},
|
|
3398
3401
|
},
|
|
3399
3402
|
},
|
|
3403
|
+
useShadowRoot: true,
|
|
3400
3404
|
class: "",
|
|
3401
3405
|
only: false,
|
|
3402
3406
|
width: "350px",
|
|
@@ -3410,7 +3414,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3410
3414
|
toClose: false,
|
|
3411
3415
|
toHide: false,
|
|
3412
3416
|
},
|
|
3413
|
-
clickCallBack:
|
|
3417
|
+
clickCallBack: null,
|
|
3414
3418
|
},
|
|
3415
3419
|
drag: false,
|
|
3416
3420
|
dragLimit: true,
|
|
@@ -3425,7 +3429,14 @@ System.register('pops', [], (function (exports) {
|
|
|
3425
3429
|
|
|
3426
3430
|
class PopsConfirm {
|
|
3427
3431
|
constructor(details) {
|
|
3428
|
-
const
|
|
3432
|
+
const guid = popsUtils.getRandomGUID();
|
|
3433
|
+
// 设置当前类型
|
|
3434
|
+
const PopsType = "confirm";
|
|
3435
|
+
let config = PopsConfirmConfig();
|
|
3436
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3437
|
+
config = popsUtils.assign(config, details);
|
|
3438
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3439
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3429
3440
|
PopsHandler.handleInit($shadowRoot, [
|
|
3430
3441
|
pops.config.cssText.index,
|
|
3431
3442
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3435,13 +3446,6 @@ System.register('pops', [], (function (exports) {
|
|
|
3435
3446
|
pops.config.cssText.common,
|
|
3436
3447
|
pops.config.cssText.confirmCSS,
|
|
3437
3448
|
]);
|
|
3438
|
-
let config = PopsConfirmConfig();
|
|
3439
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3440
|
-
config = popsUtils.assign(config, details);
|
|
3441
|
-
let guid = popsUtils.getRandomGUID();
|
|
3442
|
-
// 设置当前类型
|
|
3443
|
-
const PopsType = "confirm";
|
|
3444
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3445
3449
|
// 先把z-index提取出来
|
|
3446
3450
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3447
3451
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3558,9 +3562,8 @@ System.register('pops', [], (function (exports) {
|
|
|
3558
3562
|
iconIsLoading: false,
|
|
3559
3563
|
text: "确定",
|
|
3560
3564
|
type: "success",
|
|
3561
|
-
callback(
|
|
3562
|
-
|
|
3563
|
-
event.close();
|
|
3565
|
+
callback(detail) {
|
|
3566
|
+
detail.close();
|
|
3564
3567
|
},
|
|
3565
3568
|
},
|
|
3566
3569
|
cancel: {
|
|
@@ -3571,9 +3574,8 @@ System.register('pops', [], (function (exports) {
|
|
|
3571
3574
|
iconIsLoading: false,
|
|
3572
3575
|
text: "关闭",
|
|
3573
3576
|
type: "default",
|
|
3574
|
-
callback(
|
|
3575
|
-
|
|
3576
|
-
event.close();
|
|
3577
|
+
callback(detail) {
|
|
3578
|
+
detail.close();
|
|
3577
3579
|
},
|
|
3578
3580
|
},
|
|
3579
3581
|
other: {
|
|
@@ -3584,19 +3586,18 @@ System.register('pops', [], (function (exports) {
|
|
|
3584
3586
|
iconIsLoading: false,
|
|
3585
3587
|
text: "其它按钮",
|
|
3586
3588
|
type: "default",
|
|
3587
|
-
callback(
|
|
3588
|
-
|
|
3589
|
-
event.close();
|
|
3589
|
+
callback(detail) {
|
|
3590
|
+
detail.close();
|
|
3590
3591
|
},
|
|
3591
3592
|
},
|
|
3592
3593
|
close: {
|
|
3593
3594
|
enable: true,
|
|
3594
|
-
callback(
|
|
3595
|
-
|
|
3596
|
-
event.close();
|
|
3595
|
+
callback(detail) {
|
|
3596
|
+
detail.close();
|
|
3597
3597
|
},
|
|
3598
3598
|
},
|
|
3599
3599
|
},
|
|
3600
|
+
useShadowRoot: true,
|
|
3600
3601
|
class: "",
|
|
3601
3602
|
only: false,
|
|
3602
3603
|
width: "350px",
|
|
@@ -3610,7 +3611,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3610
3611
|
toClose: false,
|
|
3611
3612
|
toHide: false,
|
|
3612
3613
|
},
|
|
3613
|
-
clickCallBack:
|
|
3614
|
+
clickCallBack: null,
|
|
3614
3615
|
},
|
|
3615
3616
|
drag: false,
|
|
3616
3617
|
dragLimit: true,
|
|
@@ -3625,7 +3626,14 @@ System.register('pops', [], (function (exports) {
|
|
|
3625
3626
|
|
|
3626
3627
|
class PopsPrompt {
|
|
3627
3628
|
constructor(details) {
|
|
3628
|
-
const
|
|
3629
|
+
const guid = popsUtils.getRandomGUID();
|
|
3630
|
+
// 设置当前类型
|
|
3631
|
+
const PopsType = "prompt";
|
|
3632
|
+
let config = PopsPromptConfig();
|
|
3633
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3634
|
+
config = popsUtils.assign(config, details);
|
|
3635
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3636
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3629
3637
|
PopsHandler.handleInit($shadowRoot, [
|
|
3630
3638
|
pops.config.cssText.index,
|
|
3631
3639
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3635,12 +3643,6 @@ System.register('pops', [], (function (exports) {
|
|
|
3635
3643
|
pops.config.cssText.common,
|
|
3636
3644
|
pops.config.cssText.promptCSS,
|
|
3637
3645
|
]);
|
|
3638
|
-
let config = PopsPromptConfig();
|
|
3639
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3640
|
-
config = popsUtils.assign(config, details);
|
|
3641
|
-
let guid = popsUtils.getRandomGUID();
|
|
3642
|
-
const PopsType = "prompt";
|
|
3643
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3644
3646
|
// 先把z-index提取出来
|
|
3645
3647
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3646
3648
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3748,6 +3750,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3748
3750
|
icon: "loading",
|
|
3749
3751
|
style: "",
|
|
3750
3752
|
},
|
|
3753
|
+
useShadowRoot: true,
|
|
3751
3754
|
class: "",
|
|
3752
3755
|
only: false,
|
|
3753
3756
|
zIndex: 10000,
|
|
@@ -3757,7 +3760,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3757
3760
|
toClose: false,
|
|
3758
3761
|
toHide: false,
|
|
3759
3762
|
},
|
|
3760
|
-
clickCallBack:
|
|
3763
|
+
clickCallBack: null,
|
|
3761
3764
|
},
|
|
3762
3765
|
animation: "pops-anim-fadein-zoom",
|
|
3763
3766
|
forbiddenScroll: false,
|
|
@@ -3848,6 +3851,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3848
3851
|
icon: true,
|
|
3849
3852
|
text: "",
|
|
3850
3853
|
},
|
|
3854
|
+
useShadowRoot: true,
|
|
3851
3855
|
class: "",
|
|
3852
3856
|
url: window.location.href,
|
|
3853
3857
|
only: false,
|
|
@@ -3858,7 +3862,7 @@ System.register('pops', [], (function (exports) {
|
|
|
3858
3862
|
toClose: false,
|
|
3859
3863
|
toHide: false,
|
|
3860
3864
|
},
|
|
3861
|
-
clickCallBack:
|
|
3865
|
+
clickCallBack: null,
|
|
3862
3866
|
},
|
|
3863
3867
|
animation: "pops-anim-fadein-zoom",
|
|
3864
3868
|
position: "center",
|
|
@@ -3894,7 +3898,17 @@ System.register('pops', [], (function (exports) {
|
|
|
3894
3898
|
|
|
3895
3899
|
class PopsIframe {
|
|
3896
3900
|
constructor(details) {
|
|
3897
|
-
const
|
|
3901
|
+
const guid = popsUtils.getRandomGUID();
|
|
3902
|
+
// 设置当前类型
|
|
3903
|
+
const PopsType = "iframe";
|
|
3904
|
+
let config = PopsIframeConfig();
|
|
3905
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3906
|
+
config = popsUtils.assign(config, details);
|
|
3907
|
+
if (config.url == null) {
|
|
3908
|
+
throw "config.url不能为空";
|
|
3909
|
+
}
|
|
3910
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3911
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3898
3912
|
PopsHandler.handleInit($shadowRoot, [
|
|
3899
3913
|
pops.config.cssText.index,
|
|
3900
3914
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3903,16 +3917,9 @@ System.register('pops', [], (function (exports) {
|
|
|
3903
3917
|
pops.config.cssText.common,
|
|
3904
3918
|
pops.config.cssText.iframeCSS,
|
|
3905
3919
|
]);
|
|
3906
|
-
let
|
|
3907
|
-
|
|
3908
|
-
config
|
|
3909
|
-
if (config.url == null) {
|
|
3910
|
-
throw "config.url不能为空";
|
|
3911
|
-
}
|
|
3912
|
-
let guid = popsUtils.getRandomGUID();
|
|
3913
|
-
const PopsType = "iframe";
|
|
3914
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3915
|
-
let maskExtraStyle = config.animation != null && config.animation != ""
|
|
3920
|
+
let maskExtraStyle =
|
|
3921
|
+
// @ts-ignore
|
|
3922
|
+
config.animation != null && config.animation != ""
|
|
3916
3923
|
? "position:absolute;"
|
|
3917
3924
|
: "";
|
|
3918
3925
|
// 先把z-index提取出来
|
|
@@ -4141,12 +4148,17 @@ System.register('pops', [], (function (exports) {
|
|
|
4141
4148
|
position: "center",
|
|
4142
4149
|
text: "默认标题",
|
|
4143
4150
|
html: false,
|
|
4151
|
+
style: "",
|
|
4144
4152
|
},
|
|
4145
4153
|
content: {
|
|
4146
4154
|
text: "默认内容",
|
|
4147
4155
|
html: false,
|
|
4156
|
+
style: "",
|
|
4148
4157
|
},
|
|
4149
4158
|
btn: {
|
|
4159
|
+
merge: false,
|
|
4160
|
+
mergeReverse: false,
|
|
4161
|
+
reverse: false,
|
|
4150
4162
|
position: "flex-end",
|
|
4151
4163
|
ok: {
|
|
4152
4164
|
enable: true,
|
|
@@ -4156,8 +4168,8 @@ System.register('pops', [], (function (exports) {
|
|
|
4156
4168
|
iconIsLoading: false,
|
|
4157
4169
|
text: "确定",
|
|
4158
4170
|
type: "primary",
|
|
4159
|
-
callback(
|
|
4160
|
-
|
|
4171
|
+
callback(detail) {
|
|
4172
|
+
detail.close();
|
|
4161
4173
|
},
|
|
4162
4174
|
},
|
|
4163
4175
|
cancel: {
|
|
@@ -4168,8 +4180,8 @@ System.register('pops', [], (function (exports) {
|
|
|
4168
4180
|
iconIsLoading: false,
|
|
4169
4181
|
text: "关闭",
|
|
4170
4182
|
type: "default",
|
|
4171
|
-
callback(
|
|
4172
|
-
|
|
4183
|
+
callback(detail) {
|
|
4184
|
+
detail.close();
|
|
4173
4185
|
},
|
|
4174
4186
|
},
|
|
4175
4187
|
other: {
|
|
@@ -4180,14 +4192,14 @@ System.register('pops', [], (function (exports) {
|
|
|
4180
4192
|
iconIsLoading: false,
|
|
4181
4193
|
text: "其它按钮",
|
|
4182
4194
|
type: "default",
|
|
4183
|
-
callback(
|
|
4184
|
-
|
|
4195
|
+
callback(detail) {
|
|
4196
|
+
detail.close();
|
|
4185
4197
|
},
|
|
4186
4198
|
},
|
|
4187
4199
|
close: {
|
|
4188
4200
|
enable: true,
|
|
4189
|
-
callback(
|
|
4190
|
-
|
|
4201
|
+
callback(detail) {
|
|
4202
|
+
detail.close();
|
|
4191
4203
|
},
|
|
4192
4204
|
},
|
|
4193
4205
|
},
|
|
@@ -4197,8 +4209,9 @@ System.register('pops', [], (function (exports) {
|
|
|
4197
4209
|
toClose: true,
|
|
4198
4210
|
toHide: false,
|
|
4199
4211
|
},
|
|
4200
|
-
clickCallBack:
|
|
4212
|
+
clickCallBack: null,
|
|
4201
4213
|
},
|
|
4214
|
+
useShadowRoot: true,
|
|
4202
4215
|
class: "",
|
|
4203
4216
|
zIndex: 10000,
|
|
4204
4217
|
only: false,
|
|
@@ -4217,7 +4230,14 @@ System.register('pops', [], (function (exports) {
|
|
|
4217
4230
|
|
|
4218
4231
|
class PopsDrawer {
|
|
4219
4232
|
constructor(details) {
|
|
4220
|
-
const
|
|
4233
|
+
const guid = popsUtils.getRandomGUID();
|
|
4234
|
+
// 设置当前类型
|
|
4235
|
+
const PopsType = "drawer";
|
|
4236
|
+
let config = PopsDrawerConfig();
|
|
4237
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4238
|
+
config = popsUtils.assign(config, details);
|
|
4239
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
4240
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4221
4241
|
PopsHandler.handleInit($shadowRoot, [
|
|
4222
4242
|
pops.config.cssText.index,
|
|
4223
4243
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -4227,12 +4247,6 @@ System.register('pops', [], (function (exports) {
|
|
|
4227
4247
|
pops.config.cssText.common,
|
|
4228
4248
|
pops.config.cssText.drawerCSS,
|
|
4229
4249
|
]);
|
|
4230
|
-
let config = PopsDrawerConfig();
|
|
4231
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4232
|
-
config = popsUtils.assign(config, details);
|
|
4233
|
-
let guid = popsUtils.getRandomGUID();
|
|
4234
|
-
const PopsType = "drawer";
|
|
4235
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
4236
4250
|
// 先把z-index提取出来
|
|
4237
4251
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4238
4252
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -4465,8 +4479,8 @@ System.register('pops', [], (function (exports) {
|
|
|
4465
4479
|
iconIsLoading: false,
|
|
4466
4480
|
text: "确定",
|
|
4467
4481
|
type: "primary",
|
|
4468
|
-
callback(
|
|
4469
|
-
|
|
4482
|
+
callback(detail) {
|
|
4483
|
+
detail.close();
|
|
4470
4484
|
},
|
|
4471
4485
|
},
|
|
4472
4486
|
cancel: {
|
|
@@ -4477,8 +4491,8 @@ System.register('pops', [], (function (exports) {
|
|
|
4477
4491
|
iconIsLoading: false,
|
|
4478
4492
|
text: "关闭",
|
|
4479
4493
|
type: "default",
|
|
4480
|
-
callback(
|
|
4481
|
-
|
|
4494
|
+
callback(detail) {
|
|
4495
|
+
detail.close();
|
|
4482
4496
|
},
|
|
4483
4497
|
},
|
|
4484
4498
|
other: {
|
|
@@ -4489,17 +4503,18 @@ System.register('pops', [], (function (exports) {
|
|
|
4489
4503
|
iconIsLoading: false,
|
|
4490
4504
|
text: "其它按钮",
|
|
4491
4505
|
type: "default",
|
|
4492
|
-
callback(
|
|
4493
|
-
|
|
4506
|
+
callback(detail) {
|
|
4507
|
+
detail.close();
|
|
4494
4508
|
},
|
|
4495
4509
|
},
|
|
4496
4510
|
close: {
|
|
4497
4511
|
enable: true,
|
|
4498
|
-
callback(
|
|
4499
|
-
|
|
4512
|
+
callback(detail) {
|
|
4513
|
+
detail.close();
|
|
4500
4514
|
},
|
|
4501
4515
|
},
|
|
4502
4516
|
},
|
|
4517
|
+
useShadowRoot: true,
|
|
4503
4518
|
class: "",
|
|
4504
4519
|
only: false,
|
|
4505
4520
|
width: "500px",
|
|
@@ -4513,7 +4528,7 @@ System.register('pops', [], (function (exports) {
|
|
|
4513
4528
|
toClose: false,
|
|
4514
4529
|
toHide: false,
|
|
4515
4530
|
},
|
|
4516
|
-
clickCallBack:
|
|
4531
|
+
clickCallBack: null,
|
|
4517
4532
|
},
|
|
4518
4533
|
drag: false,
|
|
4519
4534
|
dragLimit: true,
|
|
@@ -4556,7 +4571,14 @@ System.register('pops', [], (function (exports) {
|
|
|
4556
4571
|
|
|
4557
4572
|
class PopsFolder {
|
|
4558
4573
|
constructor(details) {
|
|
4559
|
-
const
|
|
4574
|
+
const guid = popsUtils.getRandomGUID();
|
|
4575
|
+
// 设置当前类型
|
|
4576
|
+
const PopsType = "folder";
|
|
4577
|
+
let config = PopsFolderConfig();
|
|
4578
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4579
|
+
config = popsUtils.assign(config, details);
|
|
4580
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
4581
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4560
4582
|
PopsHandler.handleInit($shadowRoot, [
|
|
4561
4583
|
pops.config.cssText.index,
|
|
4562
4584
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -4566,15 +4588,18 @@ System.register('pops', [], (function (exports) {
|
|
|
4566
4588
|
pops.config.cssText.common,
|
|
4567
4589
|
pops.config.cssText.folderCSS,
|
|
4568
4590
|
]);
|
|
4569
|
-
let config = PopsFolderConfig();
|
|
4570
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4571
|
-
config = popsUtils.assign(config, details);
|
|
4572
4591
|
/* 办公几件套 */
|
|
4592
|
+
// @ts-ignore
|
|
4573
4593
|
Folder_ICON.docx = Folder_ICON.doc;
|
|
4594
|
+
// @ts-ignore;
|
|
4574
4595
|
Folder_ICON.rtf = Folder_ICON.doc;
|
|
4596
|
+
// @ts-ignore
|
|
4575
4597
|
Folder_ICON.xlsx = Folder_ICON.xls;
|
|
4598
|
+
// @ts-ignore
|
|
4576
4599
|
Folder_ICON.pptx = Folder_ICON.ppt;
|
|
4600
|
+
// @ts-ignore;
|
|
4577
4601
|
Folder_ICON.dmg = Folder_ICON.ipa;
|
|
4602
|
+
// @ts-ignore
|
|
4578
4603
|
Folder_ICON.json = Folder_ICON.js;
|
|
4579
4604
|
/* 压缩包 */
|
|
4580
4605
|
let zipIconList = [
|
|
@@ -4611,23 +4636,25 @@ System.register('pops', [], (function (exports) {
|
|
|
4611
4636
|
/* Android安装包 */
|
|
4612
4637
|
let androidIconList = ["apk", "apkm", "xapk"];
|
|
4613
4638
|
zipIconList.forEach((keyName) => {
|
|
4639
|
+
// @ts-ignore
|
|
4614
4640
|
Folder_ICON[keyName] = Folder_ICON.zip;
|
|
4615
4641
|
});
|
|
4616
4642
|
imageIconList.forEach((keyName) => {
|
|
4643
|
+
// @ts-ignore
|
|
4617
4644
|
Folder_ICON[keyName] = Folder_ICON.png;
|
|
4618
4645
|
});
|
|
4619
4646
|
codeLanguageIconList.forEach((keyName) => {
|
|
4647
|
+
// @ts-ignore
|
|
4620
4648
|
Folder_ICON[keyName] = Folder_ICON.html;
|
|
4621
4649
|
});
|
|
4622
4650
|
androidIconList.forEach((keyName) => {
|
|
4651
|
+
// @ts-ignore
|
|
4623
4652
|
Folder_ICON[keyName] = Folder_ICON.apk;
|
|
4624
4653
|
});
|
|
4625
4654
|
if (details?.folder) {
|
|
4655
|
+
// @ts-ignore
|
|
4626
4656
|
config.folder = details.folder;
|
|
4627
4657
|
}
|
|
4628
|
-
let guid = popsUtils.getRandomGUID();
|
|
4629
|
-
const PopsType = "folder";
|
|
4630
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
4631
4658
|
// 先把z-index提取出来
|
|
4632
4659
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4633
4660
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -5364,6 +5391,9 @@ System.register('pops', [], (function (exports) {
|
|
|
5364
5391
|
className: "panel-switch",
|
|
5365
5392
|
text: "switch",
|
|
5366
5393
|
type: "switch",
|
|
5394
|
+
// @ts-ignore
|
|
5395
|
+
props: {},
|
|
5396
|
+
disabled: false,
|
|
5367
5397
|
attributes: [],
|
|
5368
5398
|
getValue() {
|
|
5369
5399
|
return true;
|
|
@@ -5376,6 +5406,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5376
5406
|
className: "panel-slider",
|
|
5377
5407
|
text: "slider",
|
|
5378
5408
|
type: "slider",
|
|
5409
|
+
// @ts-ignore
|
|
5410
|
+
props: {},
|
|
5379
5411
|
attributes: [],
|
|
5380
5412
|
getValue() {
|
|
5381
5413
|
return 50;
|
|
@@ -5390,6 +5422,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5390
5422
|
className: "panel-button",
|
|
5391
5423
|
text: "button",
|
|
5392
5424
|
type: "button",
|
|
5425
|
+
// @ts-ignore
|
|
5426
|
+
props: {},
|
|
5393
5427
|
attributes: [],
|
|
5394
5428
|
buttonIcon: "eleme",
|
|
5395
5429
|
buttonIconIsLoading: true,
|
|
@@ -5402,6 +5436,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5402
5436
|
{
|
|
5403
5437
|
className: "panel-button",
|
|
5404
5438
|
text: "button",
|
|
5439
|
+
// @ts-ignore
|
|
5440
|
+
props: {},
|
|
5405
5441
|
type: "button",
|
|
5406
5442
|
attributes: [],
|
|
5407
5443
|
buttonIcon: "chromeFilled",
|
|
@@ -5417,6 +5453,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5417
5453
|
text: "button",
|
|
5418
5454
|
type: "button",
|
|
5419
5455
|
attributes: [],
|
|
5456
|
+
// @ts-ignore
|
|
5457
|
+
props: {},
|
|
5420
5458
|
buttonIcon: "upload",
|
|
5421
5459
|
buttonIconIsLoading: false,
|
|
5422
5460
|
buttonType: "info",
|
|
@@ -5445,6 +5483,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5445
5483
|
className: "panel-input",
|
|
5446
5484
|
text: "input",
|
|
5447
5485
|
type: "input",
|
|
5486
|
+
// @ts-ignore
|
|
5487
|
+
props: {},
|
|
5448
5488
|
attributes: [],
|
|
5449
5489
|
getValue() {
|
|
5450
5490
|
return "50";
|
|
@@ -5458,6 +5498,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5458
5498
|
className: "panel-input-password",
|
|
5459
5499
|
text: "input-password",
|
|
5460
5500
|
type: "input",
|
|
5501
|
+
// @ts-ignore
|
|
5502
|
+
props: {},
|
|
5461
5503
|
attributes: [],
|
|
5462
5504
|
getValue() {
|
|
5463
5505
|
return "123456";
|
|
@@ -5472,6 +5514,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5472
5514
|
className: "panel-textarea",
|
|
5473
5515
|
text: "textarea",
|
|
5474
5516
|
type: "textarea",
|
|
5517
|
+
// @ts-ignore
|
|
5518
|
+
props: {},
|
|
5475
5519
|
attributes: [],
|
|
5476
5520
|
getValue() {
|
|
5477
5521
|
return "50";
|
|
@@ -5485,6 +5529,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5485
5529
|
className: "panel-select",
|
|
5486
5530
|
text: "select",
|
|
5487
5531
|
type: "select",
|
|
5532
|
+
// @ts-ignore
|
|
5533
|
+
props: {},
|
|
5488
5534
|
attributes: [],
|
|
5489
5535
|
getValue() {
|
|
5490
5536
|
return 50;
|
|
@@ -5496,14 +5542,23 @@ System.register('pops', [], (function (exports) {
|
|
|
5496
5542
|
{
|
|
5497
5543
|
value: "all",
|
|
5498
5544
|
text: "所有",
|
|
5545
|
+
disable() {
|
|
5546
|
+
return false;
|
|
5547
|
+
},
|
|
5499
5548
|
},
|
|
5500
5549
|
{
|
|
5501
5550
|
value: "text",
|
|
5502
5551
|
text: "文本",
|
|
5552
|
+
disable() {
|
|
5553
|
+
return false;
|
|
5554
|
+
},
|
|
5503
5555
|
},
|
|
5504
5556
|
{
|
|
5505
5557
|
value: "html",
|
|
5506
5558
|
text: "超文本",
|
|
5559
|
+
disable() {
|
|
5560
|
+
return false;
|
|
5561
|
+
},
|
|
5507
5562
|
},
|
|
5508
5563
|
],
|
|
5509
5564
|
},
|
|
@@ -5511,6 +5566,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5511
5566
|
className: "panel-select-multiple",
|
|
5512
5567
|
type: "select-multiple",
|
|
5513
5568
|
text: "select-multiple",
|
|
5569
|
+
// @ts-ignore
|
|
5570
|
+
props: {},
|
|
5514
5571
|
attributes: [],
|
|
5515
5572
|
placeholder: "请至少选择一个选项",
|
|
5516
5573
|
getValue() {
|
|
@@ -5529,22 +5586,42 @@ System.register('pops', [], (function (exports) {
|
|
|
5529
5586
|
{
|
|
5530
5587
|
value: "select-1",
|
|
5531
5588
|
text: "单选1",
|
|
5589
|
+
isHTML: false,
|
|
5590
|
+
disable() {
|
|
5591
|
+
return false;
|
|
5592
|
+
},
|
|
5532
5593
|
},
|
|
5533
5594
|
{
|
|
5534
5595
|
value: "select-2",
|
|
5535
5596
|
text: "单选2",
|
|
5597
|
+
isHTML: false,
|
|
5598
|
+
disable() {
|
|
5599
|
+
return false;
|
|
5600
|
+
},
|
|
5536
5601
|
},
|
|
5537
5602
|
{
|
|
5538
5603
|
value: "select-3",
|
|
5539
5604
|
text: "单选3",
|
|
5605
|
+
isHTML: false,
|
|
5606
|
+
disable() {
|
|
5607
|
+
return false;
|
|
5608
|
+
},
|
|
5540
5609
|
},
|
|
5541
5610
|
{
|
|
5542
5611
|
value: "select-4",
|
|
5543
5612
|
text: "单选4",
|
|
5613
|
+
isHTML: false,
|
|
5614
|
+
disable() {
|
|
5615
|
+
return false;
|
|
5616
|
+
},
|
|
5544
5617
|
},
|
|
5545
5618
|
{
|
|
5546
5619
|
value: "select-5",
|
|
5547
5620
|
text: "单选5",
|
|
5621
|
+
isHTML: false,
|
|
5622
|
+
disable() {
|
|
5623
|
+
return false;
|
|
5624
|
+
},
|
|
5548
5625
|
},
|
|
5549
5626
|
],
|
|
5550
5627
|
},
|
|
@@ -5576,6 +5653,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5576
5653
|
className: "panel-switch",
|
|
5577
5654
|
text: "switch",
|
|
5578
5655
|
type: "switch",
|
|
5656
|
+
// @ts-ignore
|
|
5657
|
+
props: {},
|
|
5579
5658
|
attributes: [],
|
|
5580
5659
|
getValue() {
|
|
5581
5660
|
return true;
|
|
@@ -5587,6 +5666,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5587
5666
|
{
|
|
5588
5667
|
className: "panel-slider",
|
|
5589
5668
|
text: "slider",
|
|
5669
|
+
// @ts-ignore
|
|
5670
|
+
props: {},
|
|
5590
5671
|
type: "slider",
|
|
5591
5672
|
attributes: [],
|
|
5592
5673
|
getValue() {
|
|
@@ -5601,6 +5682,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5601
5682
|
{
|
|
5602
5683
|
className: "panel-button",
|
|
5603
5684
|
text: "button",
|
|
5685
|
+
// @ts-ignore
|
|
5686
|
+
props: {},
|
|
5604
5687
|
type: "button",
|
|
5605
5688
|
attributes: [],
|
|
5606
5689
|
buttonIcon: "eleme",
|
|
@@ -5615,6 +5698,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5615
5698
|
className: "panel-button",
|
|
5616
5699
|
text: "button",
|
|
5617
5700
|
type: "button",
|
|
5701
|
+
// @ts-ignore
|
|
5702
|
+
props: {},
|
|
5618
5703
|
attributes: [],
|
|
5619
5704
|
buttonIcon: "chromeFilled",
|
|
5620
5705
|
buttonIconIsLoading: true,
|
|
@@ -5627,6 +5712,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5627
5712
|
{
|
|
5628
5713
|
className: "panel-button",
|
|
5629
5714
|
text: "button",
|
|
5715
|
+
// @ts-ignore
|
|
5716
|
+
props: {},
|
|
5630
5717
|
type: "button",
|
|
5631
5718
|
attributes: [],
|
|
5632
5719
|
buttonIcon: "upload",
|
|
@@ -5654,6 +5741,8 @@ System.register('pops', [], (function (exports) {
|
|
|
5654
5741
|
{
|
|
5655
5742
|
className: "panel-switch",
|
|
5656
5743
|
text: "switch",
|
|
5744
|
+
// @ts-ignore
|
|
5745
|
+
props: {},
|
|
5657
5746
|
type: "switch",
|
|
5658
5747
|
attributes: [],
|
|
5659
5748
|
getValue() {
|
|
@@ -5682,8 +5771,9 @@ System.register('pops', [], (function (exports) {
|
|
|
5682
5771
|
toClose: false,
|
|
5683
5772
|
toHide: false,
|
|
5684
5773
|
},
|
|
5685
|
-
clickCallBack:
|
|
5774
|
+
clickCallBack: null,
|
|
5686
5775
|
},
|
|
5776
|
+
useShadowRoot: true,
|
|
5687
5777
|
class: "",
|
|
5688
5778
|
mobileClassName: "pops-panel-is-mobile",
|
|
5689
5779
|
isMobile: false,
|
|
@@ -8191,7 +8281,17 @@ System.register('pops', [], (function (exports) {
|
|
|
8191
8281
|
|
|
8192
8282
|
class PopsPanel {
|
|
8193
8283
|
constructor(details) {
|
|
8194
|
-
const
|
|
8284
|
+
const guid = popsUtils.getRandomGUID();
|
|
8285
|
+
// 设置当前类型
|
|
8286
|
+
const PopsType = "panel";
|
|
8287
|
+
let config = PopsPanelConfig();
|
|
8288
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8289
|
+
config = popsUtils.assign(config, details);
|
|
8290
|
+
if (details && Array.isArray(details.content)) {
|
|
8291
|
+
config.content = details.content;
|
|
8292
|
+
}
|
|
8293
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
8294
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
8195
8295
|
PopsHandler.handleInit($shadowRoot, [
|
|
8196
8296
|
pops.config.cssText.index,
|
|
8197
8297
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -8201,15 +8301,6 @@ System.register('pops', [], (function (exports) {
|
|
|
8201
8301
|
pops.config.cssText.common,
|
|
8202
8302
|
pops.config.cssText.panelCSS,
|
|
8203
8303
|
]);
|
|
8204
|
-
let config = PopsPanelConfig();
|
|
8205
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8206
|
-
config = popsUtils.assign(config, details);
|
|
8207
|
-
if (details && Array.isArray(details.content)) {
|
|
8208
|
-
config.content = details.content;
|
|
8209
|
-
}
|
|
8210
|
-
let guid = popsUtils.getRandomGUID();
|
|
8211
|
-
const PopsType = "panel";
|
|
8212
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
8213
8304
|
// 先把z-index提取出来
|
|
8214
8305
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
8215
8306
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -8321,6 +8412,7 @@ System.register('pops', [], (function (exports) {
|
|
|
8321
8412
|
icon: pops.config.iconSVG.search,
|
|
8322
8413
|
iconIsLoading: false,
|
|
8323
8414
|
text: "搜索",
|
|
8415
|
+
item: [],
|
|
8324
8416
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8325
8417
|
console.log("点击:" + this.text, [
|
|
8326
8418
|
clickEvent,
|
|
@@ -8333,6 +8425,7 @@ System.register('pops', [], (function (exports) {
|
|
|
8333
8425
|
icon: pops.config.iconSVG.documentCopy,
|
|
8334
8426
|
iconIsLoading: false,
|
|
8335
8427
|
text: "复制",
|
|
8428
|
+
item: [],
|
|
8336
8429
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8337
8430
|
console.log("点击:" + this.text, [
|
|
8338
8431
|
clickEvent,
|
|
@@ -8345,6 +8438,7 @@ System.register('pops', [], (function (exports) {
|
|
|
8345
8438
|
icon: pops.config.iconSVG.delete,
|
|
8346
8439
|
text: "删除",
|
|
8347
8440
|
iconIsLoading: false,
|
|
8441
|
+
item: [],
|
|
8348
8442
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8349
8443
|
console.log("点击:" + this.text, [
|
|
8350
8444
|
clickEvent,
|
|
@@ -8357,6 +8451,7 @@ System.register('pops', [], (function (exports) {
|
|
|
8357
8451
|
icon: pops.config.iconSVG.loading,
|
|
8358
8452
|
iconIsLoading: true,
|
|
8359
8453
|
text: "加载",
|
|
8454
|
+
item: [],
|
|
8360
8455
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8361
8456
|
console.log("点击:" + this.text, [
|
|
8362
8457
|
clickEvent,
|
|
@@ -8383,6 +8478,7 @@ System.register('pops', [], (function (exports) {
|
|
|
8383
8478
|
icon: "",
|
|
8384
8479
|
iconIsLoading: false,
|
|
8385
8480
|
text: "处理文件",
|
|
8481
|
+
item: [],
|
|
8386
8482
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8387
8483
|
console.log("点击:" + this.text, [
|
|
8388
8484
|
clickEvent,
|
|
@@ -8407,6 +8503,7 @@ System.register('pops', [], (function (exports) {
|
|
|
8407
8503
|
icon: pops.config.iconSVG.view,
|
|
8408
8504
|
iconIsLoading: false,
|
|
8409
8505
|
text: "查看",
|
|
8506
|
+
item: [],
|
|
8410
8507
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8411
8508
|
console.log("点击:" + this.text, [
|
|
8412
8509
|
clickEvent,
|
|
@@ -8420,6 +8517,7 @@ System.register('pops', [], (function (exports) {
|
|
|
8420
8517
|
],
|
|
8421
8518
|
},
|
|
8422
8519
|
],
|
|
8520
|
+
useShadowRoot: true,
|
|
8423
8521
|
className: "",
|
|
8424
8522
|
isAnimation: true,
|
|
8425
8523
|
only: false,
|
|
@@ -8432,25 +8530,27 @@ System.register('pops', [], (function (exports) {
|
|
|
8432
8530
|
|
|
8433
8531
|
class PopsRightClickMenu {
|
|
8434
8532
|
constructor(details) {
|
|
8435
|
-
const
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
pops.config.cssText.anim,
|
|
8439
|
-
pops.config.cssText.common,
|
|
8440
|
-
pops.config.cssText.rightClickMenu,
|
|
8441
|
-
]);
|
|
8533
|
+
const guid = popsUtils.getRandomGUID();
|
|
8534
|
+
// 设置当前类型
|
|
8535
|
+
const PopsType = "rightClickMenu";
|
|
8442
8536
|
let config = rightClickMenuConfig();
|
|
8443
8537
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8444
8538
|
config = popsUtils.assign(config, details);
|
|
8539
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
8445
8540
|
if (config.target == null) {
|
|
8446
8541
|
throw "config.target 不能为空";
|
|
8447
8542
|
}
|
|
8448
8543
|
if (details.data) {
|
|
8544
|
+
// @ts-ignore
|
|
8449
8545
|
config.data = details.data;
|
|
8450
8546
|
}
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8547
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
8548
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
8549
|
+
pops.config.cssText.index,
|
|
8550
|
+
pops.config.cssText.anim,
|
|
8551
|
+
pops.config.cssText.common,
|
|
8552
|
+
pops.config.cssText.rightClickMenu,
|
|
8553
|
+
]);
|
|
8454
8554
|
if (config.style != null) {
|
|
8455
8555
|
let cssNode = document.createElement("style");
|
|
8456
8556
|
cssNode.setAttribute("type", "text/css");
|
|
@@ -8877,6 +8977,7 @@ System.register('pops', [], (function (exports) {
|
|
|
8877
8977
|
liElement.remove();
|
|
8878
8978
|
},
|
|
8879
8979
|
},
|
|
8980
|
+
useShadowRoot: true,
|
|
8880
8981
|
className: "",
|
|
8881
8982
|
isAbsolute: true,
|
|
8882
8983
|
isAnimation: true,
|
|
@@ -8911,12 +9012,9 @@ System.register('pops', [], (function (exports) {
|
|
|
8911
9012
|
|
|
8912
9013
|
class PopsSearchSuggestion {
|
|
8913
9014
|
constructor(details) {
|
|
8914
|
-
const
|
|
8915
|
-
|
|
8916
|
-
|
|
8917
|
-
pops.config.cssText.anim,
|
|
8918
|
-
pops.config.cssText.common,
|
|
8919
|
-
]);
|
|
9015
|
+
const guid = popsUtils.getRandomGUID();
|
|
9016
|
+
// 设置当前类型
|
|
9017
|
+
const PopsType = "searchSuggestion";
|
|
8920
9018
|
let config = searchSuggestionConfig();
|
|
8921
9019
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8922
9020
|
config = popsUtils.assign(config, details);
|
|
@@ -8930,8 +9028,12 @@ System.register('pops', [], (function (exports) {
|
|
|
8930
9028
|
if (details.data) {
|
|
8931
9029
|
config.data = details.data;
|
|
8932
9030
|
}
|
|
8933
|
-
const
|
|
8934
|
-
|
|
9031
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
9032
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
9033
|
+
pops.config.cssText.index,
|
|
9034
|
+
pops.config.cssText.anim,
|
|
9035
|
+
pops.config.cssText.common,
|
|
9036
|
+
]);
|
|
8935
9037
|
if (config.style != null) {
|
|
8936
9038
|
let cssNode = document.createElement("style");
|
|
8937
9039
|
cssNode.setAttribute("type", "text/css");
|
|
@@ -9454,8 +9556,9 @@ System.register('pops', [], (function (exports) {
|
|
|
9454
9556
|
}
|
|
9455
9557
|
|
|
9456
9558
|
const PopsTooltipConfig = () => {
|
|
9559
|
+
// @ts-ignore
|
|
9457
9560
|
return {
|
|
9458
|
-
|
|
9561
|
+
useShadowRoot: true,
|
|
9459
9562
|
target: null,
|
|
9460
9563
|
content: "默认文字",
|
|
9461
9564
|
position: "top",
|
|
@@ -9475,6 +9578,8 @@ System.register('pops', [], (function (exports) {
|
|
|
9475
9578
|
showAfterCallBack() { },
|
|
9476
9579
|
closeBeforeCallBack() { },
|
|
9477
9580
|
closeAfterCallBack() { },
|
|
9581
|
+
delayCloseTime: 100,
|
|
9582
|
+
showArrow: true,
|
|
9478
9583
|
arrowDistance: 12.5,
|
|
9479
9584
|
otherDistance: 0,
|
|
9480
9585
|
style: "",
|
|
@@ -9549,6 +9654,10 @@ System.register('pops', [], (function (exports) {
|
|
|
9549
9654
|
});
|
|
9550
9655
|
$toolTipContainer.appendChild(cssNode);
|
|
9551
9656
|
}
|
|
9657
|
+
// 处理是否显示箭头元素
|
|
9658
|
+
if (!this.$data.config.showArrow) {
|
|
9659
|
+
$toolTipArrow.remove();
|
|
9660
|
+
}
|
|
9552
9661
|
return {
|
|
9553
9662
|
$toolTipContainer: $toolTipContainer,
|
|
9554
9663
|
$toolTipArrow: $toolTipArrow,
|
|
@@ -9588,12 +9697,12 @@ System.register('pops', [], (function (exports) {
|
|
|
9588
9697
|
this.$el.$toolTip.style.setProperty("z-index", zIndex.toString());
|
|
9589
9698
|
}
|
|
9590
9699
|
/**
|
|
9591
|
-
*
|
|
9700
|
+
* 计算 提示框的位置
|
|
9592
9701
|
* @param targetElement 目标元素
|
|
9593
9702
|
* @param arrowDistance 箭头和目标元素的距离
|
|
9594
9703
|
* @param otherDistance 其它位置的偏移
|
|
9595
9704
|
*/
|
|
9596
|
-
|
|
9705
|
+
calcToolTipPosition(targetElement, arrowDistance, otherDistance) {
|
|
9597
9706
|
let offsetInfo = popsDOMUtils.offset(targetElement, !this.$data.config.isFixed);
|
|
9598
9707
|
// 目标 宽
|
|
9599
9708
|
let targetElement_width = offsetInfo.width;
|
|
@@ -9642,7 +9751,7 @@ System.register('pops', [], (function (exports) {
|
|
|
9642
9751
|
* 动态修改tooltip的位置
|
|
9643
9752
|
*/
|
|
9644
9753
|
changePosition() {
|
|
9645
|
-
let positionInfo = this.
|
|
9754
|
+
let positionInfo = this.calcToolTipPosition(this.$data.config.target, this.$data.config.arrowDistance, this.$data.config.otherDistance);
|
|
9646
9755
|
let positionKey = this.$data.config.position.toUpperCase();
|
|
9647
9756
|
let positionDetail = positionInfo[positionKey];
|
|
9648
9757
|
if (positionDetail) {
|
|
@@ -9771,8 +9880,8 @@ System.register('pops', [], (function (exports) {
|
|
|
9771
9880
|
// 其它的如Touch事件不做处理
|
|
9772
9881
|
if (event && event instanceof MouseEvent) {
|
|
9773
9882
|
let $target = event.composedPath()[0];
|
|
9774
|
-
//
|
|
9775
|
-
if ($target != this.$data.config.target) {
|
|
9883
|
+
// 如果是目标元素的子元素/tooltip元素的子元素触发的话,那就不管
|
|
9884
|
+
if ($target != this.$data.config.target && $target != this.$el.$toolTip) {
|
|
9776
9885
|
return;
|
|
9777
9886
|
}
|
|
9778
9887
|
}
|
|
@@ -9790,6 +9899,10 @@ System.register('pops', [], (function (exports) {
|
|
|
9790
9899
|
let timeId = setTimeout(() => {
|
|
9791
9900
|
// 设置属性触发关闭动画
|
|
9792
9901
|
this.clearCloseTimeoutId(eventType, timeId);
|
|
9902
|
+
if (this.$el.$toolTip == null) {
|
|
9903
|
+
// 已清除了
|
|
9904
|
+
return;
|
|
9905
|
+
}
|
|
9793
9906
|
this.$el.$toolTip.setAttribute("data-motion", this.$el.$toolTip
|
|
9794
9907
|
.getAttribute("data-motion")
|
|
9795
9908
|
.replace("fadeIn", "fadeOut"));
|
|
@@ -9855,7 +9968,10 @@ System.register('pops', [], (function (exports) {
|
|
|
9855
9968
|
* 鼠标|触摸进入事件
|
|
9856
9969
|
*/
|
|
9857
9970
|
toolTipMouseEnterEvent() {
|
|
9858
|
-
this
|
|
9971
|
+
this.clearCloseTimeoutId("MouseEvent");
|
|
9972
|
+
this.clearCloseTimeoutId("TouchEvent");
|
|
9973
|
+
// 重置动画状态
|
|
9974
|
+
// this.$el.$toolTip.style.animationPlayState = "paused";
|
|
9859
9975
|
// if (parseInt(getComputedStyle(toolTipElement)) > 0.5) {
|
|
9860
9976
|
// toolTipElement.style.animationPlayState = "paused";
|
|
9861
9977
|
// }
|
|
@@ -9877,8 +9993,9 @@ System.register('pops', [], (function (exports) {
|
|
|
9877
9993
|
/**
|
|
9878
9994
|
* 鼠标|触摸离开事件
|
|
9879
9995
|
*/
|
|
9880
|
-
toolTipMouseLeaveEvent() {
|
|
9881
|
-
this
|
|
9996
|
+
toolTipMouseLeaveEvent(event) {
|
|
9997
|
+
this.close(event);
|
|
9998
|
+
// this.$el.$toolTip.style.animationPlayState = "running";
|
|
9882
9999
|
}
|
|
9883
10000
|
/**
|
|
9884
10001
|
* 监听鼠标|触摸离开事件
|
|
@@ -9895,22 +10012,23 @@ System.register('pops', [], (function (exports) {
|
|
|
9895
10012
|
}
|
|
9896
10013
|
class PopsTooltip {
|
|
9897
10014
|
constructor(details) {
|
|
9898
|
-
const
|
|
9899
|
-
|
|
9900
|
-
|
|
9901
|
-
pops.config.cssText.anim,
|
|
9902
|
-
pops.config.cssText.common,
|
|
9903
|
-
pops.config.cssText.tooltipCSS,
|
|
9904
|
-
]);
|
|
10015
|
+
const guid = popsUtils.getRandomGUID();
|
|
10016
|
+
// 设置当前类型
|
|
10017
|
+
const PopsType = "tooltip";
|
|
9905
10018
|
let config = PopsTooltipConfig();
|
|
9906
10019
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
9907
10020
|
config = popsUtils.assign(config, details);
|
|
9908
10021
|
if (!(config.target instanceof HTMLElement)) {
|
|
9909
10022
|
throw "config.target 必须是HTMLElement类型";
|
|
9910
10023
|
}
|
|
9911
|
-
let guid = popsUtils.getRandomGUID();
|
|
9912
|
-
const PopsType = "tooltip";
|
|
9913
10024
|
config = PopsHandler.handleOnly(PopsType, config);
|
|
10025
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
10026
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
10027
|
+
pops.config.cssText.index,
|
|
10028
|
+
pops.config.cssText.anim,
|
|
10029
|
+
pops.config.cssText.common,
|
|
10030
|
+
pops.config.cssText.tooltipCSS,
|
|
10031
|
+
]);
|
|
9914
10032
|
let toolTip = new ToolTip(config, guid, {
|
|
9915
10033
|
$shadowContainer,
|
|
9916
10034
|
$shadowRoot,
|
|
@@ -9934,7 +10052,7 @@ System.register('pops', [], (function (exports) {
|
|
|
9934
10052
|
/** 配置 */
|
|
9935
10053
|
config = {
|
|
9936
10054
|
/** 版本号 */
|
|
9937
|
-
version: "2024.11.
|
|
10055
|
+
version: "2024.11.24",
|
|
9938
10056
|
cssText: {
|
|
9939
10057
|
/** 主CSS */
|
|
9940
10058
|
index: indexCSS,
|