@whitesev/pops 2.1.4 → 2.1.5
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 +72 -64
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +72 -64
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +72 -64
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +72 -64
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +72 -64
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +72 -64
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/GlobalConfig.d.ts +7 -2
- package/dist/types/src/Pops.d.ts +39 -34
- package/dist/types/src/{Core.d.ts → PopsCore.d.ts} +4 -3
- package/dist/types/src/PopsIcon.d.ts +30 -2
- package/dist/types/src/PopsLayer.d.ts +3 -1
- package/dist/types/src/components/alert/config.d.ts +1 -1
- package/dist/types/src/components/alert/index.d.ts +1 -1
- package/dist/types/src/components/alert/{indexType.d.ts → types/index.d.ts} +2 -2
- package/dist/types/src/components/confirm/config.d.ts +1 -1
- package/dist/types/src/components/confirm/index.d.ts +1 -1
- package/dist/types/src/components/confirm/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/drawer/config.d.ts +1 -1
- package/dist/types/src/components/drawer/index.d.ts +1 -1
- package/dist/types/src/components/drawer/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/folder/config.d.ts +1 -1
- package/dist/types/src/components/folder/index.d.ts +1 -1
- package/dist/types/src/components/folder/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/iframe/config.d.ts +1 -1
- package/dist/types/src/components/iframe/index.d.ts +1 -1
- package/dist/types/src/components/iframe/{indexType.d.ts → types/index.d.ts} +2 -2
- package/dist/types/src/components/loading/config.d.ts +1 -1
- package/dist/types/src/components/loading/index.d.ts +1 -1
- package/dist/types/src/components/loading/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/panel/config.d.ts +1 -1
- package/dist/types/src/components/panel/{PanelHandleContentDetails.d.ts → handlerComponents.d.ts} +16 -13
- package/dist/types/src/components/panel/index.d.ts +1 -1
- package/dist/types/src/components/panel/{buttonType.d.ts → types/components-button.d.ts} +3 -3
- package/dist/types/src/components/panel/{commonType.d.ts → types/components-common.d.ts} +2 -2
- package/dist/types/src/components/panel/{deepMenuType.d.ts → types/components-deepMenu.d.ts} +3 -3
- package/dist/types/src/components/panel/{formsType.d.ts → types/components-forms.d.ts} +2 -2
- package/dist/types/src/components/panel/{inputType.d.ts → types/components-input.d.ts} +1 -1
- package/dist/types/src/components/panel/{ownType.d.ts → types/components-own.d.ts} +1 -1
- package/dist/types/src/components/panel/{selectType.d.ts → types/components-select.d.ts} +3 -3
- package/dist/types/src/components/panel/{selectMultipleType.d.ts → types/components-selectMultiple.d.ts} +2 -2
- package/dist/types/src/components/panel/{sliderType.d.ts → types/components-slider.d.ts} +1 -1
- package/dist/types/src/components/panel/{switchType.d.ts → types/components-switch.d.ts} +1 -1
- package/dist/types/src/components/panel/{textareaType.d.ts → types/components-textarea.d.ts} +1 -1
- package/dist/types/src/components/panel/{indexType.d.ts → types/index.d.ts} +12 -12
- package/dist/types/src/components/prompt/config.d.ts +1 -1
- package/dist/types/src/components/prompt/index.d.ts +1 -1
- package/dist/types/src/components/prompt/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/rightClickMenu/config.d.ts +1 -1
- package/dist/types/src/components/rightClickMenu/index.d.ts +2 -2
- package/dist/types/src/components/rightClickMenu/{indexType.d.ts → types/index.d.ts} +2 -2
- package/dist/types/src/components/searchSuggestion/config.d.ts +1 -1
- package/dist/types/src/components/searchSuggestion/index.d.ts +2 -2
- package/dist/types/src/components/searchSuggestion/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/components/tooltip/config.d.ts +1 -1
- package/dist/types/src/components/tooltip/index.d.ts +2 -2
- package/dist/types/src/components/tooltip/{indexType.d.ts → types/index.d.ts} +1 -1
- package/dist/types/src/handler/PopsHandler.d.ts +8 -8
- package/dist/types/src/types/event.d.ts +1 -1
- package/dist/types/src/types/main.d.ts +18 -18
- package/dist/types/src/types/mask.d.ts +7 -7
- package/dist/types/src/{Config.d.ts → utils/PopsDOMUtilsEventsConfig.d.ts} +3 -0
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +8 -8
- package/package.json +1 -1
- package/src/GlobalConfig.ts +6 -5
- package/src/Pops.ts +17 -17
- package/src/{Core.ts → PopsCore.ts} +13 -14
- package/src/PopsIcon.ts +34 -32
- package/src/PopsLayer.ts +8 -7
- package/src/components/alert/config.ts +1 -1
- package/src/components/alert/index.ts +1 -1
- package/src/components/alert/{indexType.ts → types/index.ts} +2 -2
- package/src/components/confirm/config.ts +1 -1
- package/src/components/confirm/index.ts +1 -1
- package/src/components/confirm/{indexType.ts → types/index.ts} +1 -1
- package/src/components/drawer/config.ts +1 -1
- package/src/components/drawer/index.ts +1 -1
- package/src/components/drawer/{indexType.ts → types/index.ts} +1 -1
- package/src/components/folder/config.ts +1 -1
- package/src/components/folder/index.ts +1 -1
- package/src/components/folder/{indexType.ts → types/index.ts} +1 -1
- package/src/components/iframe/config.ts +1 -1
- package/src/components/iframe/index.ts +4 -4
- package/src/components/iframe/{indexType.ts → types/index.ts} +2 -2
- package/src/components/loading/config.ts +1 -1
- package/src/components/loading/index.ts +1 -1
- package/src/components/loading/{indexType.ts → types/index.ts} +1 -1
- package/src/components/panel/config.ts +1 -1
- package/src/components/panel/{PanelHandleContentDetails.ts → handlerComponents.ts} +17 -14
- package/src/components/panel/index.ts +4 -4
- package/src/components/panel/{buttonType.ts → types/components-button.ts} +5 -4
- package/src/components/panel/{commonType.ts → types/components-common.ts} +2 -2
- package/src/components/panel/{deepMenuType.ts → types/components-deepMenu.ts} +3 -3
- package/src/components/panel/{formsType.ts → types/components-forms.ts} +2 -2
- package/src/components/panel/{inputType.ts → types/components-input.ts} +1 -1
- package/src/components/panel/{ownType.ts → types/components-own.ts} +1 -1
- package/src/components/panel/{selectType.ts → types/components-select.ts} +3 -3
- package/src/components/panel/{selectMultipleType.ts → types/components-selectMultiple.ts} +2 -2
- package/src/components/panel/{sliderType.ts → types/components-slider.ts} +1 -1
- package/src/components/panel/{switchType.ts → types/components-switch.ts} +1 -1
- package/src/components/panel/{textareaType.ts → types/components-textarea.ts} +1 -1
- package/src/components/panel/{indexType.ts → types/index.ts} +12 -12
- package/src/components/prompt/config.ts +1 -1
- package/src/components/prompt/index.ts +1 -1
- package/src/components/prompt/{indexType.ts → types/index.ts} +1 -1
- package/src/components/rightClickMenu/config.ts +1 -1
- package/src/components/rightClickMenu/index.ts +2 -2
- package/src/components/rightClickMenu/{indexType.ts → types/index.ts} +2 -2
- package/src/components/searchSuggestion/config.ts +1 -1
- package/src/components/searchSuggestion/index.ts +1 -1
- package/src/components/searchSuggestion/{indexType.ts → types/index.ts} +1 -1
- package/src/components/tooltip/config.ts +1 -1
- package/src/components/tooltip/index.ts +1 -1
- package/src/components/tooltip/{indexType.ts → types/index.ts} +1 -1
- package/src/handler/PopsElementHandler.ts +3 -3
- package/src/handler/PopsHandler.ts +26 -26
- package/src/types/event.d.ts +1 -1
- package/src/types/main.d.ts +18 -18
- package/src/types/mask.d.ts +7 -7
- package/src/utils/PopsDOMUtils.ts +2 -2
- package/src/{Config.ts → utils/PopsDOMUtilsEventsConfig.ts} +3 -0
- package/src/utils/PopsInstanceUtils.ts +12 -12
- package/src/utils/PopsUtils.ts +1 -1
package/dist/index.umd.js
CHANGED
|
@@ -4,14 +4,18 @@
|
|
|
4
4
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.pops = factory());
|
|
5
5
|
})(this, (function () { 'use strict';
|
|
6
6
|
|
|
7
|
+
/**
|
|
8
|
+
* 存储在元素属性上的事件名
|
|
9
|
+
*/
|
|
7
10
|
const SymbolEvents = Symbol("events_" + (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1));
|
|
8
11
|
|
|
9
|
-
const
|
|
12
|
+
const PopsCoreDefaultEnv = {
|
|
10
13
|
document: document,
|
|
11
14
|
window: window,
|
|
12
15
|
globalThis: globalThis,
|
|
13
16
|
self: self,
|
|
14
17
|
};
|
|
18
|
+
const PopsCoreEnv = Object.assign({}, PopsCoreDefaultEnv);
|
|
15
19
|
const PopsCore = {
|
|
16
20
|
get document() {
|
|
17
21
|
return PopsCoreEnv.document;
|
|
@@ -2231,17 +2235,18 @@
|
|
|
2231
2235
|
}
|
|
2232
2236
|
const popsDOMUtils = new PopsDOMUtils();
|
|
2233
2237
|
|
|
2234
|
-
const
|
|
2238
|
+
const PopsLayerData = {
|
|
2235
2239
|
alert: [],
|
|
2236
2240
|
confirm: [],
|
|
2237
|
-
prompt: [],
|
|
2238
|
-
loading: [],
|
|
2239
|
-
iframe: [],
|
|
2240
|
-
tooltip: [],
|
|
2241
2241
|
drawer: [],
|
|
2242
2242
|
folder: [],
|
|
2243
|
+
iframe: [],
|
|
2244
|
+
loading: [],
|
|
2243
2245
|
panel: [],
|
|
2246
|
+
prompt: [],
|
|
2244
2247
|
rightClickMenu: [],
|
|
2248
|
+
// 没有 searchSuggestion
|
|
2249
|
+
tooltip: [],
|
|
2245
2250
|
};
|
|
2246
2251
|
|
|
2247
2252
|
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\tline-height: normal;\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\r\n/* <code> */\r\n.pops code {\r\n\tfont-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\r\n\tfont-size: 0.85em;\r\n\tcolor: #000;\r\n\tbackground-color: #f0f0f0;\r\n\tborder-radius: 3px;\r\n\tborder: 0;\r\n\tpadding: 0.2em 0;\r\n\twhite-space: normal;\r\n\tbackground: #f5f5f5;\r\n\ttext-wrap: wrap;\r\n\ttext-align: left;\r\n\tword-spacing: normal;\r\n\tword-break: normal;\r\n\tword-wrap: normal;\r\n\tline-height: 1.4;\r\n\t-moz-tab-size: 8;\r\n\t-o-tab-size: 8;\r\n\ttab-size: 8;\r\n\t-webkit-hyphens: none;\r\n\t-moz-hyphens: none;\r\n\t-ms-hyphens: none;\r\n\thyphens: none;\r\n\tdirection: ltr;\r\n}\r\n\r\n.pops code::before,\r\n.pops code::after {\r\n\tletter-spacing: -0.2em;\r\n\tcontent: \"\\00a0\";\r\n}\r\n";
|
|
@@ -2436,8 +2441,8 @@
|
|
|
2436
2441
|
function isVisibleNode($css) {
|
|
2437
2442
|
return $css.position !== "static" && $css.display !== "none";
|
|
2438
2443
|
}
|
|
2439
|
-
Object.keys(
|
|
2440
|
-
let layerList =
|
|
2444
|
+
Object.keys(PopsLayerData).forEach((layerName) => {
|
|
2445
|
+
let layerList = PopsLayerData[layerName];
|
|
2441
2446
|
for (let index = 0; index < layerList.length; index++) {
|
|
2442
2447
|
const layer = layerList[index];
|
|
2443
2448
|
let nodeStyle = window.getComputedStyle(layer.animElement);
|
|
@@ -2985,8 +2990,7 @@
|
|
|
2985
2990
|
let style = configValue == null
|
|
2986
2991
|
? ""
|
|
2987
2992
|
: typeof configValue === "function"
|
|
2988
|
-
?
|
|
2989
|
-
configValue()
|
|
2993
|
+
? configValue()
|
|
2990
2994
|
: configValue;
|
|
2991
2995
|
if (typeof style === "string") {
|
|
2992
2996
|
result.style = style;
|
|
@@ -3000,7 +3004,7 @@
|
|
|
3000
3004
|
? configValue()
|
|
3001
3005
|
: configValue;
|
|
3002
3006
|
if (typeof zIndex === "string") {
|
|
3003
|
-
let newIndex = (zIndex =
|
|
3007
|
+
let newIndex = (zIndex = Number(zIndex));
|
|
3004
3008
|
if (!isNaN(newIndex)) {
|
|
3005
3009
|
result.zIndex = newIndex;
|
|
3006
3010
|
}
|
|
@@ -3081,37 +3085,38 @@
|
|
|
3081
3085
|
|
|
3082
3086
|
var SVG_arrowLeft = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 1024 1024\">\r\n\t<path\r\n\t\td=\"M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z\"></path>\r\n</svg>\r\n";
|
|
3083
3087
|
|
|
3088
|
+
const PopsIconData = {
|
|
3089
|
+
min: SVG_min,
|
|
3090
|
+
mise: SVG_mise,
|
|
3091
|
+
max: SVG_max,
|
|
3092
|
+
close: SVG_close,
|
|
3093
|
+
edit: SVG_edit,
|
|
3094
|
+
share: SVG_share,
|
|
3095
|
+
delete: SVG_delete,
|
|
3096
|
+
search: SVG_search,
|
|
3097
|
+
upload: SVG_upload,
|
|
3098
|
+
loading: SVG_loading,
|
|
3099
|
+
next: SVG_next,
|
|
3100
|
+
prev: SVG_prev,
|
|
3101
|
+
eleme: SVG_eleme,
|
|
3102
|
+
elemePlus: SVG_elemePlus,
|
|
3103
|
+
chromeFilled: SVG_chromeFilled,
|
|
3104
|
+
cpu: SVG_cpu,
|
|
3105
|
+
videoPlay: SVG_videoPlay,
|
|
3106
|
+
videoPause: SVG_videoPause,
|
|
3107
|
+
headset: SVG_headset,
|
|
3108
|
+
monitor: SVG_monitor,
|
|
3109
|
+
documentCopy: SVG_documentCopy,
|
|
3110
|
+
picture: SVG_picture,
|
|
3111
|
+
circleClose: SVG_circleClose,
|
|
3112
|
+
view: SVG_view,
|
|
3113
|
+
hide: SVG_hide,
|
|
3114
|
+
keyboard: SVG_keyboard,
|
|
3115
|
+
arrowRight: SVG_arrowRight,
|
|
3116
|
+
arrowLeft: SVG_arrowLeft,
|
|
3117
|
+
};
|
|
3084
3118
|
const PopsIcon = {
|
|
3085
|
-
$data:
|
|
3086
|
-
min: SVG_min,
|
|
3087
|
-
mise: SVG_mise,
|
|
3088
|
-
max: SVG_max,
|
|
3089
|
-
close: SVG_close,
|
|
3090
|
-
edit: SVG_edit,
|
|
3091
|
-
share: SVG_share,
|
|
3092
|
-
delete: SVG_delete,
|
|
3093
|
-
search: SVG_search,
|
|
3094
|
-
upload: SVG_upload,
|
|
3095
|
-
loading: SVG_loading,
|
|
3096
|
-
next: SVG_next,
|
|
3097
|
-
prev: SVG_prev,
|
|
3098
|
-
eleme: SVG_eleme,
|
|
3099
|
-
elemePlus: SVG_elemePlus,
|
|
3100
|
-
chromeFilled: SVG_chromeFilled,
|
|
3101
|
-
cpu: SVG_cpu,
|
|
3102
|
-
videoPlay: SVG_videoPlay,
|
|
3103
|
-
videoPause: SVG_videoPause,
|
|
3104
|
-
headset: SVG_headset,
|
|
3105
|
-
monitor: SVG_monitor,
|
|
3106
|
-
documentCopy: SVG_documentCopy,
|
|
3107
|
-
picture: SVG_picture,
|
|
3108
|
-
circleClose: SVG_circleClose,
|
|
3109
|
-
view: SVG_view,
|
|
3110
|
-
hide: SVG_hide,
|
|
3111
|
-
keyboard: SVG_keyboard,
|
|
3112
|
-
arrowRight: SVG_arrowRight,
|
|
3113
|
-
arrowLeft: SVG_arrowLeft,
|
|
3114
|
-
},
|
|
3119
|
+
$data: PopsIconData,
|
|
3115
3120
|
/**
|
|
3116
3121
|
* 判断是否存在某个icon
|
|
3117
3122
|
* @param iconName 图标名
|
|
@@ -3475,7 +3480,7 @@
|
|
|
3475
3480
|
function clickEvent(event) {
|
|
3476
3481
|
popsDOMUtils.preventEvent(event);
|
|
3477
3482
|
// 获取该类型实例存储列表
|
|
3478
|
-
let targetLayer =
|
|
3483
|
+
let targetLayer = PopsLayerData[details.type];
|
|
3479
3484
|
function originalRun() {
|
|
3480
3485
|
if (details.config.mask.clickEvent.toClose) {
|
|
3481
3486
|
/* 关闭 */
|
|
@@ -3662,13 +3667,13 @@
|
|
|
3662
3667
|
mode: mode,
|
|
3663
3668
|
guid: guid,
|
|
3664
3669
|
close() {
|
|
3665
|
-
return PopsInstanceUtils.close(mode,
|
|
3670
|
+
return PopsInstanceUtils.close(mode, PopsLayerData[mode], guid, config, animElement);
|
|
3666
3671
|
},
|
|
3667
3672
|
hide() {
|
|
3668
|
-
return PopsInstanceUtils.hide(mode,
|
|
3673
|
+
return PopsInstanceUtils.hide(mode, PopsLayerData[mode], guid, config, animElement, maskElement);
|
|
3669
3674
|
},
|
|
3670
3675
|
show() {
|
|
3671
|
-
return PopsInstanceUtils.show(mode,
|
|
3676
|
+
return PopsInstanceUtils.show(mode, PopsLayerData[mode], guid, config, animElement, maskElement);
|
|
3672
3677
|
},
|
|
3673
3678
|
};
|
|
3674
3679
|
},
|
|
@@ -3690,13 +3695,13 @@
|
|
|
3690
3695
|
mode: mode,
|
|
3691
3696
|
guid: guid,
|
|
3692
3697
|
close() {
|
|
3693
|
-
return PopsInstanceUtils.close(mode,
|
|
3698
|
+
return PopsInstanceUtils.close(mode, PopsLayerData[mode], guid, config, animElement);
|
|
3694
3699
|
},
|
|
3695
3700
|
hide() {
|
|
3696
|
-
return PopsInstanceUtils.hide(mode,
|
|
3701
|
+
return PopsInstanceUtils.hide(mode, PopsLayerData[mode], guid, config, animElement, maskElement);
|
|
3697
3702
|
},
|
|
3698
3703
|
show() {
|
|
3699
|
-
return PopsInstanceUtils.show(mode,
|
|
3704
|
+
return PopsInstanceUtils.show(mode, PopsLayerData[mode], guid, config, animElement, maskElement);
|
|
3700
3705
|
},
|
|
3701
3706
|
};
|
|
3702
3707
|
},
|
|
@@ -3808,20 +3813,20 @@
|
|
|
3808
3813
|
if (type === "loading" ||
|
|
3809
3814
|
type === "tooltip" ||
|
|
3810
3815
|
type === "rightClickMenu") {
|
|
3811
|
-
let layer =
|
|
3816
|
+
let layer = PopsLayerData[type];
|
|
3812
3817
|
if (layer) {
|
|
3813
3818
|
PopsInstanceUtils.removeInstance([layer], "", true);
|
|
3814
3819
|
}
|
|
3815
3820
|
}
|
|
3816
3821
|
else {
|
|
3817
3822
|
PopsInstanceUtils.removeInstance([
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3823
|
+
PopsLayerData.alert,
|
|
3824
|
+
PopsLayerData.confirm,
|
|
3825
|
+
PopsLayerData.prompt,
|
|
3826
|
+
PopsLayerData.iframe,
|
|
3827
|
+
PopsLayerData.drawer,
|
|
3828
|
+
PopsLayerData.folder,
|
|
3829
|
+
PopsLayerData.panel,
|
|
3825
3830
|
], "", true);
|
|
3826
3831
|
}
|
|
3827
3832
|
}
|
|
@@ -3842,7 +3847,7 @@
|
|
|
3842
3847
|
* @param value
|
|
3843
3848
|
*/
|
|
3844
3849
|
handlePush(type, value) {
|
|
3845
|
-
|
|
3850
|
+
PopsLayerData[type].push(value);
|
|
3846
3851
|
},
|
|
3847
3852
|
};
|
|
3848
3853
|
|
|
@@ -4764,7 +4769,7 @@
|
|
|
4764
4769
|
popsDOMUtils.on(headerCloseBtnElement, "click", (event) => {
|
|
4765
4770
|
event.preventDefault();
|
|
4766
4771
|
event.stopPropagation();
|
|
4767
|
-
PopsInstanceUtils.removeInstance([
|
|
4772
|
+
PopsInstanceUtils.removeInstance([PopsLayerData.iframe], guid, false);
|
|
4768
4773
|
if (typeof config?.btn?.close?.callback === "function") {
|
|
4769
4774
|
config.btn.close.callback(eventDetails, event);
|
|
4770
4775
|
}
|
|
@@ -7062,7 +7067,10 @@
|
|
|
7062
7067
|
},
|
|
7063
7068
|
};
|
|
7064
7069
|
|
|
7065
|
-
|
|
7070
|
+
/**
|
|
7071
|
+
* 处理组件(把组件配置转为组件元素)
|
|
7072
|
+
*/
|
|
7073
|
+
const PanelHandlerComponents = () => {
|
|
7066
7074
|
return {
|
|
7067
7075
|
/**
|
|
7068
7076
|
* 左侧的ul容器
|
|
@@ -9771,11 +9779,11 @@
|
|
|
9771
9779
|
if ($mask != null) {
|
|
9772
9780
|
$anim.after($mask);
|
|
9773
9781
|
}
|
|
9774
|
-
let
|
|
9782
|
+
let panelHandlerComponents = PanelHandlerComponents();
|
|
9775
9783
|
/**
|
|
9776
9784
|
* 处理内部配置
|
|
9777
9785
|
*/
|
|
9778
|
-
|
|
9786
|
+
panelHandlerComponents.init({
|
|
9779
9787
|
config: config,
|
|
9780
9788
|
$el: {
|
|
9781
9789
|
$pops: $pops,
|
|
@@ -11055,14 +11063,14 @@
|
|
|
11055
11063
|
/** 配置 */
|
|
11056
11064
|
config = {
|
|
11057
11065
|
/** 版本号 */
|
|
11058
|
-
version: "2025.
|
|
11066
|
+
version: "2025.7.1",
|
|
11059
11067
|
cssText: PopsCSS,
|
|
11060
11068
|
/** icon图标的svg代码 */
|
|
11061
11069
|
iconSVG: PopsIcon.$data,
|
|
11062
11070
|
/** 当前已配置的动画@keyframes名字映射(初始化时生成) */
|
|
11063
11071
|
animation: PopsAnimation.$data,
|
|
11064
11072
|
/** 存储已创建的元素 */
|
|
11065
|
-
layer:
|
|
11073
|
+
layer: PopsLayerData,
|
|
11066
11074
|
/** 禁止滚动 */
|
|
11067
11075
|
forbiddenScroll: {
|
|
11068
11076
|
event(event) {
|
|
@@ -11078,7 +11086,7 @@
|
|
|
11078
11086
|
/** pops处理float类型使用的工具类 */
|
|
11079
11087
|
MathFloatUtils: PopsMathFloatUtils,
|
|
11080
11088
|
/** pops.panel中用于处理各个类型的工具 */
|
|
11081
|
-
|
|
11089
|
+
PanelHandlerComponents: PanelHandlerComponents,
|
|
11082
11090
|
};
|
|
11083
11091
|
init() { }
|
|
11084
11092
|
/**
|