@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.amd.js
CHANGED
|
@@ -1745,10 +1745,9 @@ define((function () { 'use strict';
|
|
|
1745
1745
|
getPopsMaxZIndex(deviation = 1) {
|
|
1746
1746
|
deviation = Number.isNaN(deviation) ? 1 : deviation;
|
|
1747
1747
|
// 最大值 2147483647
|
|
1748
|
-
//
|
|
1749
|
-
// const maxZIndex = Math.pow(2, 31) - 1;
|
|
1748
|
+
// const browserMaxZIndex = Math.pow(2, 31) - 1;
|
|
1750
1749
|
// 比较值 2000000000
|
|
1751
|
-
const
|
|
1750
|
+
const maxZIndex = 2 * Math.pow(10, 9);
|
|
1752
1751
|
// 当前页面最大的z-index
|
|
1753
1752
|
let zIndex = 0;
|
|
1754
1753
|
// 当前的最大z-index的元素,调试使用
|
|
@@ -1778,17 +1777,18 @@ define((function () { 'use strict';
|
|
|
1778
1777
|
}
|
|
1779
1778
|
});
|
|
1780
1779
|
zIndex += deviation;
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1780
|
+
let isOverMaxZIndex = zIndex >= maxZIndex;
|
|
1781
|
+
if (isOverMaxZIndex) {
|
|
1782
|
+
// 超出z-index最大值
|
|
1783
|
+
zIndex = maxZIndex;
|
|
1784
1784
|
}
|
|
1785
|
-
return { zIndex: zIndex, animElement: maxZIndexNode };
|
|
1785
|
+
return { zIndex: zIndex, animElement: maxZIndexNode, isOverMaxZIndex };
|
|
1786
1786
|
},
|
|
1787
1787
|
/**
|
|
1788
1788
|
* 获取页面中最大的z-index
|
|
1789
1789
|
* @param deviation 获取最大的z-index值的偏移,默认是+1
|
|
1790
1790
|
* @example
|
|
1791
|
-
*
|
|
1791
|
+
* getMaxZIndex();
|
|
1792
1792
|
* > 1001
|
|
1793
1793
|
**/
|
|
1794
1794
|
getMaxZIndex(deviation = 1) {
|
|
@@ -2278,7 +2278,7 @@ define((function () { 'use strict';
|
|
|
2278
2278
|
},
|
|
2279
2279
|
};
|
|
2280
2280
|
|
|
2281
|
-
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";
|
|
2281
|
+
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";
|
|
2282
2282
|
|
|
2283
2283
|
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";
|
|
2284
2284
|
|
|
@@ -2471,7 +2471,7 @@ define((function () { 'use strict';
|
|
|
2471
2471
|
<div
|
|
2472
2472
|
class="pops-anim"
|
|
2473
2473
|
anim="${__config.animation || ""}"
|
|
2474
|
-
style="${popsAnimStyle}
|
|
2474
|
+
style="${popsAnimStyle}"
|
|
2475
2475
|
data-guid="${guid}">
|
|
2476
2476
|
${config.style != null
|
|
2477
2477
|
? `<style tyle="text/css">${config.style}</style>`
|
|
@@ -2742,14 +2742,22 @@ define((function () { 'use strict';
|
|
|
2742
2742
|
/**
|
|
2743
2743
|
* 创建shadow
|
|
2744
2744
|
*/
|
|
2745
|
-
handlerShadow() {
|
|
2745
|
+
handlerShadow(config) {
|
|
2746
2746
|
let $shadowContainer = document.createElement("div");
|
|
2747
2747
|
$shadowContainer.className = "pops-shadow-container";
|
|
2748
|
-
|
|
2749
|
-
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2748
|
+
if (config.useShadowRoot) {
|
|
2749
|
+
let $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
|
|
2750
|
+
return {
|
|
2751
|
+
$shadowContainer,
|
|
2752
|
+
$shadowRoot,
|
|
2753
|
+
};
|
|
2754
|
+
}
|
|
2755
|
+
else {
|
|
2756
|
+
return {
|
|
2757
|
+
$shadowContainer,
|
|
2758
|
+
$shadowRoot: $shadowContainer,
|
|
2759
|
+
};
|
|
2760
|
+
}
|
|
2753
2761
|
},
|
|
2754
2762
|
/**
|
|
2755
2763
|
* 处理初始化
|
|
@@ -3146,17 +3154,11 @@ define((function () { 'use strict';
|
|
|
3146
3154
|
else {
|
|
3147
3155
|
// 对配置进行处理
|
|
3148
3156
|
// 选择配置的z-index和已有的pops实例的最大z-index值
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
|
|
3154
|
-
};
|
|
3155
|
-
}
|
|
3156
|
-
else {
|
|
3157
|
-
const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(config.zIndex) + 100);
|
|
3158
|
-
config.zIndex = maxZIndex;
|
|
3159
|
-
}
|
|
3157
|
+
let originZIndex = config.zIndex;
|
|
3158
|
+
config.zIndex = () => {
|
|
3159
|
+
const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(originZIndex) + 100);
|
|
3160
|
+
return maxZIndex;
|
|
3161
|
+
};
|
|
3160
3162
|
}
|
|
3161
3163
|
return config;
|
|
3162
3164
|
},
|
|
@@ -3193,17 +3195,18 @@ define((function () { 'use strict';
|
|
|
3193
3195
|
iconIsLoading: false,
|
|
3194
3196
|
text: "确定",
|
|
3195
3197
|
type: "primary",
|
|
3196
|
-
callback: function (
|
|
3197
|
-
|
|
3198
|
+
callback: function (details) {
|
|
3199
|
+
details.close();
|
|
3198
3200
|
},
|
|
3199
3201
|
},
|
|
3200
3202
|
close: {
|
|
3201
3203
|
enable: true,
|
|
3202
|
-
callback: function (
|
|
3203
|
-
|
|
3204
|
+
callback: function (details) {
|
|
3205
|
+
details.close();
|
|
3204
3206
|
},
|
|
3205
3207
|
},
|
|
3206
3208
|
},
|
|
3209
|
+
useShadowRoot: true,
|
|
3207
3210
|
class: "",
|
|
3208
3211
|
only: false,
|
|
3209
3212
|
width: "350px",
|
|
@@ -3217,7 +3220,7 @@ define((function () { 'use strict';
|
|
|
3217
3220
|
toClose: false,
|
|
3218
3221
|
toHide: false,
|
|
3219
3222
|
},
|
|
3220
|
-
clickCallBack:
|
|
3223
|
+
clickCallBack: null,
|
|
3221
3224
|
},
|
|
3222
3225
|
drag: false,
|
|
3223
3226
|
dragLimit: true,
|
|
@@ -3232,7 +3235,14 @@ define((function () { 'use strict';
|
|
|
3232
3235
|
|
|
3233
3236
|
class PopsAlert {
|
|
3234
3237
|
constructor(details) {
|
|
3235
|
-
const
|
|
3238
|
+
const guid = popsUtils.getRandomGUID();
|
|
3239
|
+
// 设置当前类型
|
|
3240
|
+
const PopsType = "alert";
|
|
3241
|
+
let config = PopsAlertConfig();
|
|
3242
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3243
|
+
config = popsUtils.assign(config, details);
|
|
3244
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3245
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3236
3246
|
PopsHandler.handleInit($shadowRoot, [
|
|
3237
3247
|
pops.config.cssText.index,
|
|
3238
3248
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3242,13 +3252,6 @@ define((function () { 'use strict';
|
|
|
3242
3252
|
pops.config.cssText.common,
|
|
3243
3253
|
pops.config.cssText.alertCSS,
|
|
3244
3254
|
]);
|
|
3245
|
-
let config = PopsAlertConfig();
|
|
3246
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3247
|
-
config = popsUtils.assign(config, details);
|
|
3248
|
-
let guid = popsUtils.getRandomGUID();
|
|
3249
|
-
// 设置当前类型
|
|
3250
|
-
const PopsType = "alert";
|
|
3251
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3252
3255
|
// 先把z-index提取出来
|
|
3253
3256
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3254
3257
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3359,8 +3362,8 @@ define((function () { 'use strict';
|
|
|
3359
3362
|
iconIsLoading: false,
|
|
3360
3363
|
text: "确定",
|
|
3361
3364
|
type: "primary",
|
|
3362
|
-
callback(
|
|
3363
|
-
|
|
3365
|
+
callback(detail) {
|
|
3366
|
+
detail.close();
|
|
3364
3367
|
},
|
|
3365
3368
|
},
|
|
3366
3369
|
cancel: {
|
|
@@ -3371,8 +3374,8 @@ define((function () { 'use strict';
|
|
|
3371
3374
|
iconIsLoading: false,
|
|
3372
3375
|
text: "关闭",
|
|
3373
3376
|
type: "default",
|
|
3374
|
-
callback(
|
|
3375
|
-
|
|
3377
|
+
callback(detail) {
|
|
3378
|
+
detail.close();
|
|
3376
3379
|
},
|
|
3377
3380
|
},
|
|
3378
3381
|
other: {
|
|
@@ -3383,17 +3386,18 @@ define((function () { 'use strict';
|
|
|
3383
3386
|
iconIsLoading: false,
|
|
3384
3387
|
text: "其它按钮",
|
|
3385
3388
|
type: "default",
|
|
3386
|
-
callback(
|
|
3387
|
-
|
|
3389
|
+
callback(detail) {
|
|
3390
|
+
detail.close();
|
|
3388
3391
|
},
|
|
3389
3392
|
},
|
|
3390
3393
|
close: {
|
|
3391
3394
|
enable: true,
|
|
3392
|
-
callback(
|
|
3393
|
-
|
|
3395
|
+
callback(detail) {
|
|
3396
|
+
detail.close();
|
|
3394
3397
|
},
|
|
3395
3398
|
},
|
|
3396
3399
|
},
|
|
3400
|
+
useShadowRoot: true,
|
|
3397
3401
|
class: "",
|
|
3398
3402
|
only: false,
|
|
3399
3403
|
width: "350px",
|
|
@@ -3407,7 +3411,7 @@ define((function () { 'use strict';
|
|
|
3407
3411
|
toClose: false,
|
|
3408
3412
|
toHide: false,
|
|
3409
3413
|
},
|
|
3410
|
-
clickCallBack:
|
|
3414
|
+
clickCallBack: null,
|
|
3411
3415
|
},
|
|
3412
3416
|
drag: false,
|
|
3413
3417
|
dragLimit: true,
|
|
@@ -3422,7 +3426,14 @@ define((function () { 'use strict';
|
|
|
3422
3426
|
|
|
3423
3427
|
class PopsConfirm {
|
|
3424
3428
|
constructor(details) {
|
|
3425
|
-
const
|
|
3429
|
+
const guid = popsUtils.getRandomGUID();
|
|
3430
|
+
// 设置当前类型
|
|
3431
|
+
const PopsType = "confirm";
|
|
3432
|
+
let config = PopsConfirmConfig();
|
|
3433
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3434
|
+
config = popsUtils.assign(config, details);
|
|
3435
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3436
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3426
3437
|
PopsHandler.handleInit($shadowRoot, [
|
|
3427
3438
|
pops.config.cssText.index,
|
|
3428
3439
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3432,13 +3443,6 @@ define((function () { 'use strict';
|
|
|
3432
3443
|
pops.config.cssText.common,
|
|
3433
3444
|
pops.config.cssText.confirmCSS,
|
|
3434
3445
|
]);
|
|
3435
|
-
let config = PopsConfirmConfig();
|
|
3436
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3437
|
-
config = popsUtils.assign(config, details);
|
|
3438
|
-
let guid = popsUtils.getRandomGUID();
|
|
3439
|
-
// 设置当前类型
|
|
3440
|
-
const PopsType = "confirm";
|
|
3441
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3442
3446
|
// 先把z-index提取出来
|
|
3443
3447
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3444
3448
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3555,9 +3559,8 @@ define((function () { 'use strict';
|
|
|
3555
3559
|
iconIsLoading: false,
|
|
3556
3560
|
text: "确定",
|
|
3557
3561
|
type: "success",
|
|
3558
|
-
callback(
|
|
3559
|
-
|
|
3560
|
-
event.close();
|
|
3562
|
+
callback(detail) {
|
|
3563
|
+
detail.close();
|
|
3561
3564
|
},
|
|
3562
3565
|
},
|
|
3563
3566
|
cancel: {
|
|
@@ -3568,9 +3571,8 @@ define((function () { 'use strict';
|
|
|
3568
3571
|
iconIsLoading: false,
|
|
3569
3572
|
text: "关闭",
|
|
3570
3573
|
type: "default",
|
|
3571
|
-
callback(
|
|
3572
|
-
|
|
3573
|
-
event.close();
|
|
3574
|
+
callback(detail) {
|
|
3575
|
+
detail.close();
|
|
3574
3576
|
},
|
|
3575
3577
|
},
|
|
3576
3578
|
other: {
|
|
@@ -3581,19 +3583,18 @@ define((function () { 'use strict';
|
|
|
3581
3583
|
iconIsLoading: false,
|
|
3582
3584
|
text: "其它按钮",
|
|
3583
3585
|
type: "default",
|
|
3584
|
-
callback(
|
|
3585
|
-
|
|
3586
|
-
event.close();
|
|
3586
|
+
callback(detail) {
|
|
3587
|
+
detail.close();
|
|
3587
3588
|
},
|
|
3588
3589
|
},
|
|
3589
3590
|
close: {
|
|
3590
3591
|
enable: true,
|
|
3591
|
-
callback(
|
|
3592
|
-
|
|
3593
|
-
event.close();
|
|
3592
|
+
callback(detail) {
|
|
3593
|
+
detail.close();
|
|
3594
3594
|
},
|
|
3595
3595
|
},
|
|
3596
3596
|
},
|
|
3597
|
+
useShadowRoot: true,
|
|
3597
3598
|
class: "",
|
|
3598
3599
|
only: false,
|
|
3599
3600
|
width: "350px",
|
|
@@ -3607,7 +3608,7 @@ define((function () { 'use strict';
|
|
|
3607
3608
|
toClose: false,
|
|
3608
3609
|
toHide: false,
|
|
3609
3610
|
},
|
|
3610
|
-
clickCallBack:
|
|
3611
|
+
clickCallBack: null,
|
|
3611
3612
|
},
|
|
3612
3613
|
drag: false,
|
|
3613
3614
|
dragLimit: true,
|
|
@@ -3622,7 +3623,14 @@ define((function () { 'use strict';
|
|
|
3622
3623
|
|
|
3623
3624
|
class PopsPrompt {
|
|
3624
3625
|
constructor(details) {
|
|
3625
|
-
const
|
|
3626
|
+
const guid = popsUtils.getRandomGUID();
|
|
3627
|
+
// 设置当前类型
|
|
3628
|
+
const PopsType = "prompt";
|
|
3629
|
+
let config = PopsPromptConfig();
|
|
3630
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3631
|
+
config = popsUtils.assign(config, details);
|
|
3632
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3633
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3626
3634
|
PopsHandler.handleInit($shadowRoot, [
|
|
3627
3635
|
pops.config.cssText.index,
|
|
3628
3636
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3632,12 +3640,6 @@ define((function () { 'use strict';
|
|
|
3632
3640
|
pops.config.cssText.common,
|
|
3633
3641
|
pops.config.cssText.promptCSS,
|
|
3634
3642
|
]);
|
|
3635
|
-
let config = PopsPromptConfig();
|
|
3636
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3637
|
-
config = popsUtils.assign(config, details);
|
|
3638
|
-
let guid = popsUtils.getRandomGUID();
|
|
3639
|
-
const PopsType = "prompt";
|
|
3640
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3641
3643
|
// 先把z-index提取出来
|
|
3642
3644
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
3643
3645
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -3745,6 +3747,7 @@ define((function () { 'use strict';
|
|
|
3745
3747
|
icon: "loading",
|
|
3746
3748
|
style: "",
|
|
3747
3749
|
},
|
|
3750
|
+
useShadowRoot: true,
|
|
3748
3751
|
class: "",
|
|
3749
3752
|
only: false,
|
|
3750
3753
|
zIndex: 10000,
|
|
@@ -3754,7 +3757,7 @@ define((function () { 'use strict';
|
|
|
3754
3757
|
toClose: false,
|
|
3755
3758
|
toHide: false,
|
|
3756
3759
|
},
|
|
3757
|
-
clickCallBack:
|
|
3760
|
+
clickCallBack: null,
|
|
3758
3761
|
},
|
|
3759
3762
|
animation: "pops-anim-fadein-zoom",
|
|
3760
3763
|
forbiddenScroll: false,
|
|
@@ -3845,6 +3848,7 @@ define((function () { 'use strict';
|
|
|
3845
3848
|
icon: true,
|
|
3846
3849
|
text: "",
|
|
3847
3850
|
},
|
|
3851
|
+
useShadowRoot: true,
|
|
3848
3852
|
class: "",
|
|
3849
3853
|
url: window.location.href,
|
|
3850
3854
|
only: false,
|
|
@@ -3855,7 +3859,7 @@ define((function () { 'use strict';
|
|
|
3855
3859
|
toClose: false,
|
|
3856
3860
|
toHide: false,
|
|
3857
3861
|
},
|
|
3858
|
-
clickCallBack:
|
|
3862
|
+
clickCallBack: null,
|
|
3859
3863
|
},
|
|
3860
3864
|
animation: "pops-anim-fadein-zoom",
|
|
3861
3865
|
position: "center",
|
|
@@ -3891,7 +3895,17 @@ define((function () { 'use strict';
|
|
|
3891
3895
|
|
|
3892
3896
|
class PopsIframe {
|
|
3893
3897
|
constructor(details) {
|
|
3894
|
-
const
|
|
3898
|
+
const guid = popsUtils.getRandomGUID();
|
|
3899
|
+
// 设置当前类型
|
|
3900
|
+
const PopsType = "iframe";
|
|
3901
|
+
let config = PopsIframeConfig();
|
|
3902
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
3903
|
+
config = popsUtils.assign(config, details);
|
|
3904
|
+
if (config.url == null) {
|
|
3905
|
+
throw "config.url不能为空";
|
|
3906
|
+
}
|
|
3907
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
3908
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
3895
3909
|
PopsHandler.handleInit($shadowRoot, [
|
|
3896
3910
|
pops.config.cssText.index,
|
|
3897
3911
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -3900,16 +3914,9 @@ define((function () { 'use strict';
|
|
|
3900
3914
|
pops.config.cssText.common,
|
|
3901
3915
|
pops.config.cssText.iframeCSS,
|
|
3902
3916
|
]);
|
|
3903
|
-
let
|
|
3904
|
-
|
|
3905
|
-
config
|
|
3906
|
-
if (config.url == null) {
|
|
3907
|
-
throw "config.url不能为空";
|
|
3908
|
-
}
|
|
3909
|
-
let guid = popsUtils.getRandomGUID();
|
|
3910
|
-
const PopsType = "iframe";
|
|
3911
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
3912
|
-
let maskExtraStyle = config.animation != null && config.animation != ""
|
|
3917
|
+
let maskExtraStyle =
|
|
3918
|
+
// @ts-ignore
|
|
3919
|
+
config.animation != null && config.animation != ""
|
|
3913
3920
|
? "position:absolute;"
|
|
3914
3921
|
: "";
|
|
3915
3922
|
// 先把z-index提取出来
|
|
@@ -4138,12 +4145,17 @@ define((function () { 'use strict';
|
|
|
4138
4145
|
position: "center",
|
|
4139
4146
|
text: "默认标题",
|
|
4140
4147
|
html: false,
|
|
4148
|
+
style: "",
|
|
4141
4149
|
},
|
|
4142
4150
|
content: {
|
|
4143
4151
|
text: "默认内容",
|
|
4144
4152
|
html: false,
|
|
4153
|
+
style: "",
|
|
4145
4154
|
},
|
|
4146
4155
|
btn: {
|
|
4156
|
+
merge: false,
|
|
4157
|
+
mergeReverse: false,
|
|
4158
|
+
reverse: false,
|
|
4147
4159
|
position: "flex-end",
|
|
4148
4160
|
ok: {
|
|
4149
4161
|
enable: true,
|
|
@@ -4153,8 +4165,8 @@ define((function () { 'use strict';
|
|
|
4153
4165
|
iconIsLoading: false,
|
|
4154
4166
|
text: "确定",
|
|
4155
4167
|
type: "primary",
|
|
4156
|
-
callback(
|
|
4157
|
-
|
|
4168
|
+
callback(detail) {
|
|
4169
|
+
detail.close();
|
|
4158
4170
|
},
|
|
4159
4171
|
},
|
|
4160
4172
|
cancel: {
|
|
@@ -4165,8 +4177,8 @@ define((function () { 'use strict';
|
|
|
4165
4177
|
iconIsLoading: false,
|
|
4166
4178
|
text: "关闭",
|
|
4167
4179
|
type: "default",
|
|
4168
|
-
callback(
|
|
4169
|
-
|
|
4180
|
+
callback(detail) {
|
|
4181
|
+
detail.close();
|
|
4170
4182
|
},
|
|
4171
4183
|
},
|
|
4172
4184
|
other: {
|
|
@@ -4177,14 +4189,14 @@ define((function () { 'use strict';
|
|
|
4177
4189
|
iconIsLoading: false,
|
|
4178
4190
|
text: "其它按钮",
|
|
4179
4191
|
type: "default",
|
|
4180
|
-
callback(
|
|
4181
|
-
|
|
4192
|
+
callback(detail) {
|
|
4193
|
+
detail.close();
|
|
4182
4194
|
},
|
|
4183
4195
|
},
|
|
4184
4196
|
close: {
|
|
4185
4197
|
enable: true,
|
|
4186
|
-
callback(
|
|
4187
|
-
|
|
4198
|
+
callback(detail) {
|
|
4199
|
+
detail.close();
|
|
4188
4200
|
},
|
|
4189
4201
|
},
|
|
4190
4202
|
},
|
|
@@ -4194,8 +4206,9 @@ define((function () { 'use strict';
|
|
|
4194
4206
|
toClose: true,
|
|
4195
4207
|
toHide: false,
|
|
4196
4208
|
},
|
|
4197
|
-
clickCallBack:
|
|
4209
|
+
clickCallBack: null,
|
|
4198
4210
|
},
|
|
4211
|
+
useShadowRoot: true,
|
|
4199
4212
|
class: "",
|
|
4200
4213
|
zIndex: 10000,
|
|
4201
4214
|
only: false,
|
|
@@ -4214,7 +4227,14 @@ define((function () { 'use strict';
|
|
|
4214
4227
|
|
|
4215
4228
|
class PopsDrawer {
|
|
4216
4229
|
constructor(details) {
|
|
4217
|
-
const
|
|
4230
|
+
const guid = popsUtils.getRandomGUID();
|
|
4231
|
+
// 设置当前类型
|
|
4232
|
+
const PopsType = "drawer";
|
|
4233
|
+
let config = PopsDrawerConfig();
|
|
4234
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4235
|
+
config = popsUtils.assign(config, details);
|
|
4236
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
4237
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4218
4238
|
PopsHandler.handleInit($shadowRoot, [
|
|
4219
4239
|
pops.config.cssText.index,
|
|
4220
4240
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -4224,12 +4244,6 @@ define((function () { 'use strict';
|
|
|
4224
4244
|
pops.config.cssText.common,
|
|
4225
4245
|
pops.config.cssText.drawerCSS,
|
|
4226
4246
|
]);
|
|
4227
|
-
let config = PopsDrawerConfig();
|
|
4228
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4229
|
-
config = popsUtils.assign(config, details);
|
|
4230
|
-
let guid = popsUtils.getRandomGUID();
|
|
4231
|
-
const PopsType = "drawer";
|
|
4232
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
4233
4247
|
// 先把z-index提取出来
|
|
4234
4248
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4235
4249
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -4462,8 +4476,8 @@ define((function () { 'use strict';
|
|
|
4462
4476
|
iconIsLoading: false,
|
|
4463
4477
|
text: "确定",
|
|
4464
4478
|
type: "primary",
|
|
4465
|
-
callback(
|
|
4466
|
-
|
|
4479
|
+
callback(detail) {
|
|
4480
|
+
detail.close();
|
|
4467
4481
|
},
|
|
4468
4482
|
},
|
|
4469
4483
|
cancel: {
|
|
@@ -4474,8 +4488,8 @@ define((function () { 'use strict';
|
|
|
4474
4488
|
iconIsLoading: false,
|
|
4475
4489
|
text: "关闭",
|
|
4476
4490
|
type: "default",
|
|
4477
|
-
callback(
|
|
4478
|
-
|
|
4491
|
+
callback(detail) {
|
|
4492
|
+
detail.close();
|
|
4479
4493
|
},
|
|
4480
4494
|
},
|
|
4481
4495
|
other: {
|
|
@@ -4486,17 +4500,18 @@ define((function () { 'use strict';
|
|
|
4486
4500
|
iconIsLoading: false,
|
|
4487
4501
|
text: "其它按钮",
|
|
4488
4502
|
type: "default",
|
|
4489
|
-
callback(
|
|
4490
|
-
|
|
4503
|
+
callback(detail) {
|
|
4504
|
+
detail.close();
|
|
4491
4505
|
},
|
|
4492
4506
|
},
|
|
4493
4507
|
close: {
|
|
4494
4508
|
enable: true,
|
|
4495
|
-
callback(
|
|
4496
|
-
|
|
4509
|
+
callback(detail) {
|
|
4510
|
+
detail.close();
|
|
4497
4511
|
},
|
|
4498
4512
|
},
|
|
4499
4513
|
},
|
|
4514
|
+
useShadowRoot: true,
|
|
4500
4515
|
class: "",
|
|
4501
4516
|
only: false,
|
|
4502
4517
|
width: "500px",
|
|
@@ -4510,7 +4525,7 @@ define((function () { 'use strict';
|
|
|
4510
4525
|
toClose: false,
|
|
4511
4526
|
toHide: false,
|
|
4512
4527
|
},
|
|
4513
|
-
clickCallBack:
|
|
4528
|
+
clickCallBack: null,
|
|
4514
4529
|
},
|
|
4515
4530
|
drag: false,
|
|
4516
4531
|
dragLimit: true,
|
|
@@ -4553,7 +4568,14 @@ define((function () { 'use strict';
|
|
|
4553
4568
|
|
|
4554
4569
|
class PopsFolder {
|
|
4555
4570
|
constructor(details) {
|
|
4556
|
-
const
|
|
4571
|
+
const guid = popsUtils.getRandomGUID();
|
|
4572
|
+
// 设置当前类型
|
|
4573
|
+
const PopsType = "folder";
|
|
4574
|
+
let config = PopsFolderConfig();
|
|
4575
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4576
|
+
config = popsUtils.assign(config, details);
|
|
4577
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
4578
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4557
4579
|
PopsHandler.handleInit($shadowRoot, [
|
|
4558
4580
|
pops.config.cssText.index,
|
|
4559
4581
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -4563,15 +4585,18 @@ define((function () { 'use strict';
|
|
|
4563
4585
|
pops.config.cssText.common,
|
|
4564
4586
|
pops.config.cssText.folderCSS,
|
|
4565
4587
|
]);
|
|
4566
|
-
let config = PopsFolderConfig();
|
|
4567
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4568
|
-
config = popsUtils.assign(config, details);
|
|
4569
4588
|
/* 办公几件套 */
|
|
4589
|
+
// @ts-ignore
|
|
4570
4590
|
Folder_ICON.docx = Folder_ICON.doc;
|
|
4591
|
+
// @ts-ignore;
|
|
4571
4592
|
Folder_ICON.rtf = Folder_ICON.doc;
|
|
4593
|
+
// @ts-ignore
|
|
4572
4594
|
Folder_ICON.xlsx = Folder_ICON.xls;
|
|
4595
|
+
// @ts-ignore
|
|
4573
4596
|
Folder_ICON.pptx = Folder_ICON.ppt;
|
|
4597
|
+
// @ts-ignore;
|
|
4574
4598
|
Folder_ICON.dmg = Folder_ICON.ipa;
|
|
4599
|
+
// @ts-ignore
|
|
4575
4600
|
Folder_ICON.json = Folder_ICON.js;
|
|
4576
4601
|
/* 压缩包 */
|
|
4577
4602
|
let zipIconList = [
|
|
@@ -4608,23 +4633,25 @@ define((function () { 'use strict';
|
|
|
4608
4633
|
/* Android安装包 */
|
|
4609
4634
|
let androidIconList = ["apk", "apkm", "xapk"];
|
|
4610
4635
|
zipIconList.forEach((keyName) => {
|
|
4636
|
+
// @ts-ignore
|
|
4611
4637
|
Folder_ICON[keyName] = Folder_ICON.zip;
|
|
4612
4638
|
});
|
|
4613
4639
|
imageIconList.forEach((keyName) => {
|
|
4640
|
+
// @ts-ignore
|
|
4614
4641
|
Folder_ICON[keyName] = Folder_ICON.png;
|
|
4615
4642
|
});
|
|
4616
4643
|
codeLanguageIconList.forEach((keyName) => {
|
|
4644
|
+
// @ts-ignore
|
|
4617
4645
|
Folder_ICON[keyName] = Folder_ICON.html;
|
|
4618
4646
|
});
|
|
4619
4647
|
androidIconList.forEach((keyName) => {
|
|
4648
|
+
// @ts-ignore
|
|
4620
4649
|
Folder_ICON[keyName] = Folder_ICON.apk;
|
|
4621
4650
|
});
|
|
4622
4651
|
if (details?.folder) {
|
|
4652
|
+
// @ts-ignore
|
|
4623
4653
|
config.folder = details.folder;
|
|
4624
4654
|
}
|
|
4625
|
-
let guid = popsUtils.getRandomGUID();
|
|
4626
|
-
const PopsType = "folder";
|
|
4627
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
4628
4655
|
// 先把z-index提取出来
|
|
4629
4656
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4630
4657
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -5361,6 +5388,9 @@ define((function () { 'use strict';
|
|
|
5361
5388
|
className: "panel-switch",
|
|
5362
5389
|
text: "switch",
|
|
5363
5390
|
type: "switch",
|
|
5391
|
+
// @ts-ignore
|
|
5392
|
+
props: {},
|
|
5393
|
+
disabled: false,
|
|
5364
5394
|
attributes: [],
|
|
5365
5395
|
getValue() {
|
|
5366
5396
|
return true;
|
|
@@ -5373,6 +5403,8 @@ define((function () { 'use strict';
|
|
|
5373
5403
|
className: "panel-slider",
|
|
5374
5404
|
text: "slider",
|
|
5375
5405
|
type: "slider",
|
|
5406
|
+
// @ts-ignore
|
|
5407
|
+
props: {},
|
|
5376
5408
|
attributes: [],
|
|
5377
5409
|
getValue() {
|
|
5378
5410
|
return 50;
|
|
@@ -5387,6 +5419,8 @@ define((function () { 'use strict';
|
|
|
5387
5419
|
className: "panel-button",
|
|
5388
5420
|
text: "button",
|
|
5389
5421
|
type: "button",
|
|
5422
|
+
// @ts-ignore
|
|
5423
|
+
props: {},
|
|
5390
5424
|
attributes: [],
|
|
5391
5425
|
buttonIcon: "eleme",
|
|
5392
5426
|
buttonIconIsLoading: true,
|
|
@@ -5399,6 +5433,8 @@ define((function () { 'use strict';
|
|
|
5399
5433
|
{
|
|
5400
5434
|
className: "panel-button",
|
|
5401
5435
|
text: "button",
|
|
5436
|
+
// @ts-ignore
|
|
5437
|
+
props: {},
|
|
5402
5438
|
type: "button",
|
|
5403
5439
|
attributes: [],
|
|
5404
5440
|
buttonIcon: "chromeFilled",
|
|
@@ -5414,6 +5450,8 @@ define((function () { 'use strict';
|
|
|
5414
5450
|
text: "button",
|
|
5415
5451
|
type: "button",
|
|
5416
5452
|
attributes: [],
|
|
5453
|
+
// @ts-ignore
|
|
5454
|
+
props: {},
|
|
5417
5455
|
buttonIcon: "upload",
|
|
5418
5456
|
buttonIconIsLoading: false,
|
|
5419
5457
|
buttonType: "info",
|
|
@@ -5442,6 +5480,8 @@ define((function () { 'use strict';
|
|
|
5442
5480
|
className: "panel-input",
|
|
5443
5481
|
text: "input",
|
|
5444
5482
|
type: "input",
|
|
5483
|
+
// @ts-ignore
|
|
5484
|
+
props: {},
|
|
5445
5485
|
attributes: [],
|
|
5446
5486
|
getValue() {
|
|
5447
5487
|
return "50";
|
|
@@ -5455,6 +5495,8 @@ define((function () { 'use strict';
|
|
|
5455
5495
|
className: "panel-input-password",
|
|
5456
5496
|
text: "input-password",
|
|
5457
5497
|
type: "input",
|
|
5498
|
+
// @ts-ignore
|
|
5499
|
+
props: {},
|
|
5458
5500
|
attributes: [],
|
|
5459
5501
|
getValue() {
|
|
5460
5502
|
return "123456";
|
|
@@ -5469,6 +5511,8 @@ define((function () { 'use strict';
|
|
|
5469
5511
|
className: "panel-textarea",
|
|
5470
5512
|
text: "textarea",
|
|
5471
5513
|
type: "textarea",
|
|
5514
|
+
// @ts-ignore
|
|
5515
|
+
props: {},
|
|
5472
5516
|
attributes: [],
|
|
5473
5517
|
getValue() {
|
|
5474
5518
|
return "50";
|
|
@@ -5482,6 +5526,8 @@ define((function () { 'use strict';
|
|
|
5482
5526
|
className: "panel-select",
|
|
5483
5527
|
text: "select",
|
|
5484
5528
|
type: "select",
|
|
5529
|
+
// @ts-ignore
|
|
5530
|
+
props: {},
|
|
5485
5531
|
attributes: [],
|
|
5486
5532
|
getValue() {
|
|
5487
5533
|
return 50;
|
|
@@ -5493,14 +5539,23 @@ define((function () { 'use strict';
|
|
|
5493
5539
|
{
|
|
5494
5540
|
value: "all",
|
|
5495
5541
|
text: "所有",
|
|
5542
|
+
disable() {
|
|
5543
|
+
return false;
|
|
5544
|
+
},
|
|
5496
5545
|
},
|
|
5497
5546
|
{
|
|
5498
5547
|
value: "text",
|
|
5499
5548
|
text: "文本",
|
|
5549
|
+
disable() {
|
|
5550
|
+
return false;
|
|
5551
|
+
},
|
|
5500
5552
|
},
|
|
5501
5553
|
{
|
|
5502
5554
|
value: "html",
|
|
5503
5555
|
text: "超文本",
|
|
5556
|
+
disable() {
|
|
5557
|
+
return false;
|
|
5558
|
+
},
|
|
5504
5559
|
},
|
|
5505
5560
|
],
|
|
5506
5561
|
},
|
|
@@ -5508,6 +5563,8 @@ define((function () { 'use strict';
|
|
|
5508
5563
|
className: "panel-select-multiple",
|
|
5509
5564
|
type: "select-multiple",
|
|
5510
5565
|
text: "select-multiple",
|
|
5566
|
+
// @ts-ignore
|
|
5567
|
+
props: {},
|
|
5511
5568
|
attributes: [],
|
|
5512
5569
|
placeholder: "请至少选择一个选项",
|
|
5513
5570
|
getValue() {
|
|
@@ -5526,22 +5583,42 @@ define((function () { 'use strict';
|
|
|
5526
5583
|
{
|
|
5527
5584
|
value: "select-1",
|
|
5528
5585
|
text: "单选1",
|
|
5586
|
+
isHTML: false,
|
|
5587
|
+
disable() {
|
|
5588
|
+
return false;
|
|
5589
|
+
},
|
|
5529
5590
|
},
|
|
5530
5591
|
{
|
|
5531
5592
|
value: "select-2",
|
|
5532
5593
|
text: "单选2",
|
|
5594
|
+
isHTML: false,
|
|
5595
|
+
disable() {
|
|
5596
|
+
return false;
|
|
5597
|
+
},
|
|
5533
5598
|
},
|
|
5534
5599
|
{
|
|
5535
5600
|
value: "select-3",
|
|
5536
5601
|
text: "单选3",
|
|
5602
|
+
isHTML: false,
|
|
5603
|
+
disable() {
|
|
5604
|
+
return false;
|
|
5605
|
+
},
|
|
5537
5606
|
},
|
|
5538
5607
|
{
|
|
5539
5608
|
value: "select-4",
|
|
5540
5609
|
text: "单选4",
|
|
5610
|
+
isHTML: false,
|
|
5611
|
+
disable() {
|
|
5612
|
+
return false;
|
|
5613
|
+
},
|
|
5541
5614
|
},
|
|
5542
5615
|
{
|
|
5543
5616
|
value: "select-5",
|
|
5544
5617
|
text: "单选5",
|
|
5618
|
+
isHTML: false,
|
|
5619
|
+
disable() {
|
|
5620
|
+
return false;
|
|
5621
|
+
},
|
|
5545
5622
|
},
|
|
5546
5623
|
],
|
|
5547
5624
|
},
|
|
@@ -5573,6 +5650,8 @@ define((function () { 'use strict';
|
|
|
5573
5650
|
className: "panel-switch",
|
|
5574
5651
|
text: "switch",
|
|
5575
5652
|
type: "switch",
|
|
5653
|
+
// @ts-ignore
|
|
5654
|
+
props: {},
|
|
5576
5655
|
attributes: [],
|
|
5577
5656
|
getValue() {
|
|
5578
5657
|
return true;
|
|
@@ -5584,6 +5663,8 @@ define((function () { 'use strict';
|
|
|
5584
5663
|
{
|
|
5585
5664
|
className: "panel-slider",
|
|
5586
5665
|
text: "slider",
|
|
5666
|
+
// @ts-ignore
|
|
5667
|
+
props: {},
|
|
5587
5668
|
type: "slider",
|
|
5588
5669
|
attributes: [],
|
|
5589
5670
|
getValue() {
|
|
@@ -5598,6 +5679,8 @@ define((function () { 'use strict';
|
|
|
5598
5679
|
{
|
|
5599
5680
|
className: "panel-button",
|
|
5600
5681
|
text: "button",
|
|
5682
|
+
// @ts-ignore
|
|
5683
|
+
props: {},
|
|
5601
5684
|
type: "button",
|
|
5602
5685
|
attributes: [],
|
|
5603
5686
|
buttonIcon: "eleme",
|
|
@@ -5612,6 +5695,8 @@ define((function () { 'use strict';
|
|
|
5612
5695
|
className: "panel-button",
|
|
5613
5696
|
text: "button",
|
|
5614
5697
|
type: "button",
|
|
5698
|
+
// @ts-ignore
|
|
5699
|
+
props: {},
|
|
5615
5700
|
attributes: [],
|
|
5616
5701
|
buttonIcon: "chromeFilled",
|
|
5617
5702
|
buttonIconIsLoading: true,
|
|
@@ -5624,6 +5709,8 @@ define((function () { 'use strict';
|
|
|
5624
5709
|
{
|
|
5625
5710
|
className: "panel-button",
|
|
5626
5711
|
text: "button",
|
|
5712
|
+
// @ts-ignore
|
|
5713
|
+
props: {},
|
|
5627
5714
|
type: "button",
|
|
5628
5715
|
attributes: [],
|
|
5629
5716
|
buttonIcon: "upload",
|
|
@@ -5651,6 +5738,8 @@ define((function () { 'use strict';
|
|
|
5651
5738
|
{
|
|
5652
5739
|
className: "panel-switch",
|
|
5653
5740
|
text: "switch",
|
|
5741
|
+
// @ts-ignore
|
|
5742
|
+
props: {},
|
|
5654
5743
|
type: "switch",
|
|
5655
5744
|
attributes: [],
|
|
5656
5745
|
getValue() {
|
|
@@ -5679,8 +5768,9 @@ define((function () { 'use strict';
|
|
|
5679
5768
|
toClose: false,
|
|
5680
5769
|
toHide: false,
|
|
5681
5770
|
},
|
|
5682
|
-
clickCallBack:
|
|
5771
|
+
clickCallBack: null,
|
|
5683
5772
|
},
|
|
5773
|
+
useShadowRoot: true,
|
|
5684
5774
|
class: "",
|
|
5685
5775
|
mobileClassName: "pops-panel-is-mobile",
|
|
5686
5776
|
isMobile: false,
|
|
@@ -8188,7 +8278,17 @@ define((function () { 'use strict';
|
|
|
8188
8278
|
|
|
8189
8279
|
class PopsPanel {
|
|
8190
8280
|
constructor(details) {
|
|
8191
|
-
const
|
|
8281
|
+
const guid = popsUtils.getRandomGUID();
|
|
8282
|
+
// 设置当前类型
|
|
8283
|
+
const PopsType = "panel";
|
|
8284
|
+
let config = PopsPanelConfig();
|
|
8285
|
+
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8286
|
+
config = popsUtils.assign(config, details);
|
|
8287
|
+
if (details && Array.isArray(details.content)) {
|
|
8288
|
+
config.content = details.content;
|
|
8289
|
+
}
|
|
8290
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
8291
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
8192
8292
|
PopsHandler.handleInit($shadowRoot, [
|
|
8193
8293
|
pops.config.cssText.index,
|
|
8194
8294
|
pops.config.cssText.ninePalaceGridPosition,
|
|
@@ -8198,15 +8298,6 @@ define((function () { 'use strict';
|
|
|
8198
8298
|
pops.config.cssText.common,
|
|
8199
8299
|
pops.config.cssText.panelCSS,
|
|
8200
8300
|
]);
|
|
8201
|
-
let config = PopsPanelConfig();
|
|
8202
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8203
|
-
config = popsUtils.assign(config, details);
|
|
8204
|
-
if (details && Array.isArray(details.content)) {
|
|
8205
|
-
config.content = details.content;
|
|
8206
|
-
}
|
|
8207
|
-
let guid = popsUtils.getRandomGUID();
|
|
8208
|
-
const PopsType = "panel";
|
|
8209
|
-
config = PopsHandler.handleOnly(PopsType, config);
|
|
8210
8301
|
// 先把z-index提取出来
|
|
8211
8302
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
8212
8303
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
@@ -8318,6 +8409,7 @@ define((function () { 'use strict';
|
|
|
8318
8409
|
icon: pops.config.iconSVG.search,
|
|
8319
8410
|
iconIsLoading: false,
|
|
8320
8411
|
text: "搜索",
|
|
8412
|
+
item: [],
|
|
8321
8413
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8322
8414
|
console.log("点击:" + this.text, [
|
|
8323
8415
|
clickEvent,
|
|
@@ -8330,6 +8422,7 @@ define((function () { 'use strict';
|
|
|
8330
8422
|
icon: pops.config.iconSVG.documentCopy,
|
|
8331
8423
|
iconIsLoading: false,
|
|
8332
8424
|
text: "复制",
|
|
8425
|
+
item: [],
|
|
8333
8426
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8334
8427
|
console.log("点击:" + this.text, [
|
|
8335
8428
|
clickEvent,
|
|
@@ -8342,6 +8435,7 @@ define((function () { 'use strict';
|
|
|
8342
8435
|
icon: pops.config.iconSVG.delete,
|
|
8343
8436
|
text: "删除",
|
|
8344
8437
|
iconIsLoading: false,
|
|
8438
|
+
item: [],
|
|
8345
8439
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8346
8440
|
console.log("点击:" + this.text, [
|
|
8347
8441
|
clickEvent,
|
|
@@ -8354,6 +8448,7 @@ define((function () { 'use strict';
|
|
|
8354
8448
|
icon: pops.config.iconSVG.loading,
|
|
8355
8449
|
iconIsLoading: true,
|
|
8356
8450
|
text: "加载",
|
|
8451
|
+
item: [],
|
|
8357
8452
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8358
8453
|
console.log("点击:" + this.text, [
|
|
8359
8454
|
clickEvent,
|
|
@@ -8380,6 +8475,7 @@ define((function () { 'use strict';
|
|
|
8380
8475
|
icon: "",
|
|
8381
8476
|
iconIsLoading: false,
|
|
8382
8477
|
text: "处理文件",
|
|
8478
|
+
item: [],
|
|
8383
8479
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8384
8480
|
console.log("点击:" + this.text, [
|
|
8385
8481
|
clickEvent,
|
|
@@ -8404,6 +8500,7 @@ define((function () { 'use strict';
|
|
|
8404
8500
|
icon: pops.config.iconSVG.view,
|
|
8405
8501
|
iconIsLoading: false,
|
|
8406
8502
|
text: "查看",
|
|
8503
|
+
item: [],
|
|
8407
8504
|
callback(clickEvent, contextMenuEvent, liElement) {
|
|
8408
8505
|
console.log("点击:" + this.text, [
|
|
8409
8506
|
clickEvent,
|
|
@@ -8417,6 +8514,7 @@ define((function () { 'use strict';
|
|
|
8417
8514
|
],
|
|
8418
8515
|
},
|
|
8419
8516
|
],
|
|
8517
|
+
useShadowRoot: true,
|
|
8420
8518
|
className: "",
|
|
8421
8519
|
isAnimation: true,
|
|
8422
8520
|
only: false,
|
|
@@ -8429,25 +8527,27 @@ define((function () { 'use strict';
|
|
|
8429
8527
|
|
|
8430
8528
|
class PopsRightClickMenu {
|
|
8431
8529
|
constructor(details) {
|
|
8432
|
-
const
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
pops.config.cssText.anim,
|
|
8436
|
-
pops.config.cssText.common,
|
|
8437
|
-
pops.config.cssText.rightClickMenu,
|
|
8438
|
-
]);
|
|
8530
|
+
const guid = popsUtils.getRandomGUID();
|
|
8531
|
+
// 设置当前类型
|
|
8532
|
+
const PopsType = "rightClickMenu";
|
|
8439
8533
|
let config = rightClickMenuConfig();
|
|
8440
8534
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8441
8535
|
config = popsUtils.assign(config, details);
|
|
8536
|
+
config = PopsHandler.handleOnly(PopsType, config);
|
|
8442
8537
|
if (config.target == null) {
|
|
8443
8538
|
throw "config.target 不能为空";
|
|
8444
8539
|
}
|
|
8445
8540
|
if (details.data) {
|
|
8541
|
+
// @ts-ignore
|
|
8446
8542
|
config.data = details.data;
|
|
8447
8543
|
}
|
|
8448
|
-
|
|
8449
|
-
|
|
8450
|
-
|
|
8544
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
8545
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
8546
|
+
pops.config.cssText.index,
|
|
8547
|
+
pops.config.cssText.anim,
|
|
8548
|
+
pops.config.cssText.common,
|
|
8549
|
+
pops.config.cssText.rightClickMenu,
|
|
8550
|
+
]);
|
|
8451
8551
|
if (config.style != null) {
|
|
8452
8552
|
let cssNode = document.createElement("style");
|
|
8453
8553
|
cssNode.setAttribute("type", "text/css");
|
|
@@ -8874,6 +8974,7 @@ define((function () { 'use strict';
|
|
|
8874
8974
|
liElement.remove();
|
|
8875
8975
|
},
|
|
8876
8976
|
},
|
|
8977
|
+
useShadowRoot: true,
|
|
8877
8978
|
className: "",
|
|
8878
8979
|
isAbsolute: true,
|
|
8879
8980
|
isAnimation: true,
|
|
@@ -8908,12 +9009,9 @@ define((function () { 'use strict';
|
|
|
8908
9009
|
|
|
8909
9010
|
class PopsSearchSuggestion {
|
|
8910
9011
|
constructor(details) {
|
|
8911
|
-
const
|
|
8912
|
-
|
|
8913
|
-
|
|
8914
|
-
pops.config.cssText.anim,
|
|
8915
|
-
pops.config.cssText.common,
|
|
8916
|
-
]);
|
|
9012
|
+
const guid = popsUtils.getRandomGUID();
|
|
9013
|
+
// 设置当前类型
|
|
9014
|
+
const PopsType = "searchSuggestion";
|
|
8917
9015
|
let config = searchSuggestionConfig();
|
|
8918
9016
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
8919
9017
|
config = popsUtils.assign(config, details);
|
|
@@ -8927,8 +9025,12 @@ define((function () { 'use strict';
|
|
|
8927
9025
|
if (details.data) {
|
|
8928
9026
|
config.data = details.data;
|
|
8929
9027
|
}
|
|
8930
|
-
const
|
|
8931
|
-
|
|
9028
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
9029
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
9030
|
+
pops.config.cssText.index,
|
|
9031
|
+
pops.config.cssText.anim,
|
|
9032
|
+
pops.config.cssText.common,
|
|
9033
|
+
]);
|
|
8932
9034
|
if (config.style != null) {
|
|
8933
9035
|
let cssNode = document.createElement("style");
|
|
8934
9036
|
cssNode.setAttribute("type", "text/css");
|
|
@@ -9451,8 +9553,9 @@ define((function () { 'use strict';
|
|
|
9451
9553
|
}
|
|
9452
9554
|
|
|
9453
9555
|
const PopsTooltipConfig = () => {
|
|
9556
|
+
// @ts-ignore
|
|
9454
9557
|
return {
|
|
9455
|
-
|
|
9558
|
+
useShadowRoot: true,
|
|
9456
9559
|
target: null,
|
|
9457
9560
|
content: "默认文字",
|
|
9458
9561
|
position: "top",
|
|
@@ -9472,6 +9575,8 @@ define((function () { 'use strict';
|
|
|
9472
9575
|
showAfterCallBack() { },
|
|
9473
9576
|
closeBeforeCallBack() { },
|
|
9474
9577
|
closeAfterCallBack() { },
|
|
9578
|
+
delayCloseTime: 100,
|
|
9579
|
+
showArrow: true,
|
|
9475
9580
|
arrowDistance: 12.5,
|
|
9476
9581
|
otherDistance: 0,
|
|
9477
9582
|
style: "",
|
|
@@ -9546,6 +9651,10 @@ define((function () { 'use strict';
|
|
|
9546
9651
|
});
|
|
9547
9652
|
$toolTipContainer.appendChild(cssNode);
|
|
9548
9653
|
}
|
|
9654
|
+
// 处理是否显示箭头元素
|
|
9655
|
+
if (!this.$data.config.showArrow) {
|
|
9656
|
+
$toolTipArrow.remove();
|
|
9657
|
+
}
|
|
9549
9658
|
return {
|
|
9550
9659
|
$toolTipContainer: $toolTipContainer,
|
|
9551
9660
|
$toolTipArrow: $toolTipArrow,
|
|
@@ -9585,12 +9694,12 @@ define((function () { 'use strict';
|
|
|
9585
9694
|
this.$el.$toolTip.style.setProperty("z-index", zIndex.toString());
|
|
9586
9695
|
}
|
|
9587
9696
|
/**
|
|
9588
|
-
*
|
|
9697
|
+
* 计算 提示框的位置
|
|
9589
9698
|
* @param targetElement 目标元素
|
|
9590
9699
|
* @param arrowDistance 箭头和目标元素的距离
|
|
9591
9700
|
* @param otherDistance 其它位置的偏移
|
|
9592
9701
|
*/
|
|
9593
|
-
|
|
9702
|
+
calcToolTipPosition(targetElement, arrowDistance, otherDistance) {
|
|
9594
9703
|
let offsetInfo = popsDOMUtils.offset(targetElement, !this.$data.config.isFixed);
|
|
9595
9704
|
// 目标 宽
|
|
9596
9705
|
let targetElement_width = offsetInfo.width;
|
|
@@ -9639,7 +9748,7 @@ define((function () { 'use strict';
|
|
|
9639
9748
|
* 动态修改tooltip的位置
|
|
9640
9749
|
*/
|
|
9641
9750
|
changePosition() {
|
|
9642
|
-
let positionInfo = this.
|
|
9751
|
+
let positionInfo = this.calcToolTipPosition(this.$data.config.target, this.$data.config.arrowDistance, this.$data.config.otherDistance);
|
|
9643
9752
|
let positionKey = this.$data.config.position.toUpperCase();
|
|
9644
9753
|
let positionDetail = positionInfo[positionKey];
|
|
9645
9754
|
if (positionDetail) {
|
|
@@ -9768,8 +9877,8 @@ define((function () { 'use strict';
|
|
|
9768
9877
|
// 其它的如Touch事件不做处理
|
|
9769
9878
|
if (event && event instanceof MouseEvent) {
|
|
9770
9879
|
let $target = event.composedPath()[0];
|
|
9771
|
-
//
|
|
9772
|
-
if ($target != this.$data.config.target) {
|
|
9880
|
+
// 如果是目标元素的子元素/tooltip元素的子元素触发的话,那就不管
|
|
9881
|
+
if ($target != this.$data.config.target && $target != this.$el.$toolTip) {
|
|
9773
9882
|
return;
|
|
9774
9883
|
}
|
|
9775
9884
|
}
|
|
@@ -9787,6 +9896,10 @@ define((function () { 'use strict';
|
|
|
9787
9896
|
let timeId = setTimeout(() => {
|
|
9788
9897
|
// 设置属性触发关闭动画
|
|
9789
9898
|
this.clearCloseTimeoutId(eventType, timeId);
|
|
9899
|
+
if (this.$el.$toolTip == null) {
|
|
9900
|
+
// 已清除了
|
|
9901
|
+
return;
|
|
9902
|
+
}
|
|
9790
9903
|
this.$el.$toolTip.setAttribute("data-motion", this.$el.$toolTip
|
|
9791
9904
|
.getAttribute("data-motion")
|
|
9792
9905
|
.replace("fadeIn", "fadeOut"));
|
|
@@ -9852,7 +9965,10 @@ define((function () { 'use strict';
|
|
|
9852
9965
|
* 鼠标|触摸进入事件
|
|
9853
9966
|
*/
|
|
9854
9967
|
toolTipMouseEnterEvent() {
|
|
9855
|
-
this
|
|
9968
|
+
this.clearCloseTimeoutId("MouseEvent");
|
|
9969
|
+
this.clearCloseTimeoutId("TouchEvent");
|
|
9970
|
+
// 重置动画状态
|
|
9971
|
+
// this.$el.$toolTip.style.animationPlayState = "paused";
|
|
9856
9972
|
// if (parseInt(getComputedStyle(toolTipElement)) > 0.5) {
|
|
9857
9973
|
// toolTipElement.style.animationPlayState = "paused";
|
|
9858
9974
|
// }
|
|
@@ -9874,8 +9990,9 @@ define((function () { 'use strict';
|
|
|
9874
9990
|
/**
|
|
9875
9991
|
* 鼠标|触摸离开事件
|
|
9876
9992
|
*/
|
|
9877
|
-
toolTipMouseLeaveEvent() {
|
|
9878
|
-
this
|
|
9993
|
+
toolTipMouseLeaveEvent(event) {
|
|
9994
|
+
this.close(event);
|
|
9995
|
+
// this.$el.$toolTip.style.animationPlayState = "running";
|
|
9879
9996
|
}
|
|
9880
9997
|
/**
|
|
9881
9998
|
* 监听鼠标|触摸离开事件
|
|
@@ -9892,22 +10009,23 @@ define((function () { 'use strict';
|
|
|
9892
10009
|
}
|
|
9893
10010
|
class PopsTooltip {
|
|
9894
10011
|
constructor(details) {
|
|
9895
|
-
const
|
|
9896
|
-
|
|
9897
|
-
|
|
9898
|
-
pops.config.cssText.anim,
|
|
9899
|
-
pops.config.cssText.common,
|
|
9900
|
-
pops.config.cssText.tooltipCSS,
|
|
9901
|
-
]);
|
|
10012
|
+
const guid = popsUtils.getRandomGUID();
|
|
10013
|
+
// 设置当前类型
|
|
10014
|
+
const PopsType = "tooltip";
|
|
9902
10015
|
let config = PopsTooltipConfig();
|
|
9903
10016
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
9904
10017
|
config = popsUtils.assign(config, details);
|
|
9905
10018
|
if (!(config.target instanceof HTMLElement)) {
|
|
9906
10019
|
throw "config.target 必须是HTMLElement类型";
|
|
9907
10020
|
}
|
|
9908
|
-
let guid = popsUtils.getRandomGUID();
|
|
9909
|
-
const PopsType = "tooltip";
|
|
9910
10021
|
config = PopsHandler.handleOnly(PopsType, config);
|
|
10022
|
+
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
10023
|
+
PopsHandler.handleInit($shadowRoot, [
|
|
10024
|
+
pops.config.cssText.index,
|
|
10025
|
+
pops.config.cssText.anim,
|
|
10026
|
+
pops.config.cssText.common,
|
|
10027
|
+
pops.config.cssText.tooltipCSS,
|
|
10028
|
+
]);
|
|
9911
10029
|
let toolTip = new ToolTip(config, guid, {
|
|
9912
10030
|
$shadowContainer,
|
|
9913
10031
|
$shadowRoot,
|
|
@@ -9931,7 +10049,7 @@ define((function () { 'use strict';
|
|
|
9931
10049
|
/** 配置 */
|
|
9932
10050
|
config = {
|
|
9933
10051
|
/** 版本号 */
|
|
9934
|
-
version: "2024.11.
|
|
10052
|
+
version: "2024.11.24",
|
|
9935
10053
|
cssText: {
|
|
9936
10054
|
/** 主CSS */
|
|
9937
10055
|
index: indexCSS,
|