@whitesev/pops 2.1.3 → 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 +253 -227
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +253 -227
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +253 -227
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +253 -227
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +253 -227
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +253 -227
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/GlobalConfig.d.ts +7 -2
- package/dist/types/src/Pops.d.ts +61 -39
- 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} +39 -28
- package/dist/types/src/components/panel/index.d.ts +16 -2
- 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} +26 -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/PopsDOMUtilsEventType.d.ts +1 -1
- package/dist/types/src/types/button.d.ts +3 -2
- package/dist/types/src/types/event.d.ts +4 -3
- package/dist/types/src/types/global.d.ts +4 -4
- package/dist/types/src/types/main.d.ts +18 -10
- package/dist/types/src/types/mask.d.ts +8 -0
- 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 +9 -10
- 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} +287 -258
- package/src/components/panel/index.ts +23 -5
- 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} +28 -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/PopsDOMUtilsEventType.d.ts +1 -1
- package/src/types/button.d.ts +3 -2
- package/src/types/event.d.ts +4 -3
- package/src/types/global.d.ts +4 -4
- package/src/types/main.d.ts +18 -10
- package/src/types/mask.d.ts +8 -0
- 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 +2 -5
package/dist/index.esm.js
CHANGED
|
@@ -1,11 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 存储在元素属性上的事件名
|
|
3
|
+
*/
|
|
1
4
|
const SymbolEvents = Symbol("events_" + (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1));
|
|
2
5
|
|
|
3
|
-
const
|
|
6
|
+
const PopsCoreDefaultEnv = {
|
|
4
7
|
document: document,
|
|
5
8
|
window: window,
|
|
6
9
|
globalThis: globalThis,
|
|
7
10
|
self: self,
|
|
8
11
|
};
|
|
12
|
+
const PopsCoreEnv = Object.assign({}, PopsCoreDefaultEnv);
|
|
9
13
|
const PopsCore = {
|
|
10
14
|
get document() {
|
|
11
15
|
return PopsCoreEnv.document;
|
|
@@ -327,8 +331,7 @@ class PopsUtils {
|
|
|
327
331
|
if (target === PopsCore.self) {
|
|
328
332
|
return true;
|
|
329
333
|
}
|
|
330
|
-
if (typeof unsafeWindow !== "undefined" &&
|
|
331
|
-
target === unsafeWindow) {
|
|
334
|
+
if (typeof unsafeWindow !== "undefined" && target === unsafeWindow) {
|
|
332
335
|
return true;
|
|
333
336
|
}
|
|
334
337
|
if (target?.Math?.toString() !== "[object Math]") {
|
|
@@ -2226,17 +2229,18 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2226
2229
|
}
|
|
2227
2230
|
const popsDOMUtils = new PopsDOMUtils();
|
|
2228
2231
|
|
|
2229
|
-
const
|
|
2232
|
+
const PopsLayerData = {
|
|
2230
2233
|
alert: [],
|
|
2231
2234
|
confirm: [],
|
|
2232
|
-
prompt: [],
|
|
2233
|
-
loading: [],
|
|
2234
|
-
iframe: [],
|
|
2235
|
-
tooltip: [],
|
|
2236
2235
|
drawer: [],
|
|
2237
2236
|
folder: [],
|
|
2237
|
+
iframe: [],
|
|
2238
|
+
loading: [],
|
|
2238
2239
|
panel: [],
|
|
2240
|
+
prompt: [],
|
|
2239
2241
|
rightClickMenu: [],
|
|
2242
|
+
// 没有 searchSuggestion
|
|
2243
|
+
tooltip: [],
|
|
2240
2244
|
};
|
|
2241
2245
|
|
|
2242
2246
|
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";
|
|
@@ -2431,8 +2435,8 @@ const PopsInstanceUtils = {
|
|
|
2431
2435
|
function isVisibleNode($css) {
|
|
2432
2436
|
return $css.position !== "static" && $css.display !== "none";
|
|
2433
2437
|
}
|
|
2434
|
-
Object.keys(
|
|
2435
|
-
let layerList =
|
|
2438
|
+
Object.keys(PopsLayerData).forEach((layerName) => {
|
|
2439
|
+
let layerList = PopsLayerData[layerName];
|
|
2436
2440
|
for (let index = 0; index < layerList.length; index++) {
|
|
2437
2441
|
const layer = layerList[index];
|
|
2438
2442
|
let nodeStyle = window.getComputedStyle(layer.animElement);
|
|
@@ -2980,8 +2984,7 @@ const GlobalConfig = {
|
|
|
2980
2984
|
let style = configValue == null
|
|
2981
2985
|
? ""
|
|
2982
2986
|
: typeof configValue === "function"
|
|
2983
|
-
?
|
|
2984
|
-
configValue()
|
|
2987
|
+
? configValue()
|
|
2985
2988
|
: configValue;
|
|
2986
2989
|
if (typeof style === "string") {
|
|
2987
2990
|
result.style = style;
|
|
@@ -2995,7 +2998,7 @@ const GlobalConfig = {
|
|
|
2995
2998
|
? configValue()
|
|
2996
2999
|
: configValue;
|
|
2997
3000
|
if (typeof zIndex === "string") {
|
|
2998
|
-
let newIndex = (zIndex =
|
|
3001
|
+
let newIndex = (zIndex = Number(zIndex));
|
|
2999
3002
|
if (!isNaN(newIndex)) {
|
|
3000
3003
|
result.zIndex = newIndex;
|
|
3001
3004
|
}
|
|
@@ -3076,37 +3079,38 @@ var SVG_arrowRight = "<svg xmlns=\"http://www.w3.org/2000/svg\" viewBox=\"0 0 10
|
|
|
3076
3079
|
|
|
3077
3080
|
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";
|
|
3078
3081
|
|
|
3082
|
+
const PopsIconData = {
|
|
3083
|
+
min: SVG_min,
|
|
3084
|
+
mise: SVG_mise,
|
|
3085
|
+
max: SVG_max,
|
|
3086
|
+
close: SVG_close,
|
|
3087
|
+
edit: SVG_edit,
|
|
3088
|
+
share: SVG_share,
|
|
3089
|
+
delete: SVG_delete,
|
|
3090
|
+
search: SVG_search,
|
|
3091
|
+
upload: SVG_upload,
|
|
3092
|
+
loading: SVG_loading,
|
|
3093
|
+
next: SVG_next,
|
|
3094
|
+
prev: SVG_prev,
|
|
3095
|
+
eleme: SVG_eleme,
|
|
3096
|
+
elemePlus: SVG_elemePlus,
|
|
3097
|
+
chromeFilled: SVG_chromeFilled,
|
|
3098
|
+
cpu: SVG_cpu,
|
|
3099
|
+
videoPlay: SVG_videoPlay,
|
|
3100
|
+
videoPause: SVG_videoPause,
|
|
3101
|
+
headset: SVG_headset,
|
|
3102
|
+
monitor: SVG_monitor,
|
|
3103
|
+
documentCopy: SVG_documentCopy,
|
|
3104
|
+
picture: SVG_picture,
|
|
3105
|
+
circleClose: SVG_circleClose,
|
|
3106
|
+
view: SVG_view,
|
|
3107
|
+
hide: SVG_hide,
|
|
3108
|
+
keyboard: SVG_keyboard,
|
|
3109
|
+
arrowRight: SVG_arrowRight,
|
|
3110
|
+
arrowLeft: SVG_arrowLeft,
|
|
3111
|
+
};
|
|
3079
3112
|
const PopsIcon = {
|
|
3080
|
-
$data:
|
|
3081
|
-
min: SVG_min,
|
|
3082
|
-
mise: SVG_mise,
|
|
3083
|
-
max: SVG_max,
|
|
3084
|
-
close: SVG_close,
|
|
3085
|
-
edit: SVG_edit,
|
|
3086
|
-
share: SVG_share,
|
|
3087
|
-
delete: SVG_delete,
|
|
3088
|
-
search: SVG_search,
|
|
3089
|
-
upload: SVG_upload,
|
|
3090
|
-
loading: SVG_loading,
|
|
3091
|
-
next: SVG_next,
|
|
3092
|
-
prev: SVG_prev,
|
|
3093
|
-
eleme: SVG_eleme,
|
|
3094
|
-
elemePlus: SVG_elemePlus,
|
|
3095
|
-
chromeFilled: SVG_chromeFilled,
|
|
3096
|
-
cpu: SVG_cpu,
|
|
3097
|
-
videoPlay: SVG_videoPlay,
|
|
3098
|
-
videoPause: SVG_videoPause,
|
|
3099
|
-
headset: SVG_headset,
|
|
3100
|
-
monitor: SVG_monitor,
|
|
3101
|
-
documentCopy: SVG_documentCopy,
|
|
3102
|
-
picture: SVG_picture,
|
|
3103
|
-
circleClose: SVG_circleClose,
|
|
3104
|
-
view: SVG_view,
|
|
3105
|
-
hide: SVG_hide,
|
|
3106
|
-
keyboard: SVG_keyboard,
|
|
3107
|
-
arrowRight: SVG_arrowRight,
|
|
3108
|
-
arrowLeft: SVG_arrowLeft,
|
|
3109
|
-
},
|
|
3113
|
+
$data: PopsIconData,
|
|
3110
3114
|
/**
|
|
3111
3115
|
* 判断是否存在某个icon
|
|
3112
3116
|
* @param iconName 图标名
|
|
@@ -3470,7 +3474,7 @@ const PopsHandler = {
|
|
|
3470
3474
|
function clickEvent(event) {
|
|
3471
3475
|
popsDOMUtils.preventEvent(event);
|
|
3472
3476
|
// 获取该类型实例存储列表
|
|
3473
|
-
let targetLayer =
|
|
3477
|
+
let targetLayer = PopsLayerData[details.type];
|
|
3474
3478
|
function originalRun() {
|
|
3475
3479
|
if (details.config.mask.clickEvent.toClose) {
|
|
3476
3480
|
/* 关闭 */
|
|
@@ -3657,13 +3661,13 @@ const PopsHandler = {
|
|
|
3657
3661
|
mode: mode,
|
|
3658
3662
|
guid: guid,
|
|
3659
3663
|
close() {
|
|
3660
|
-
return PopsInstanceUtils.close(mode,
|
|
3664
|
+
return PopsInstanceUtils.close(mode, PopsLayerData[mode], guid, config, animElement);
|
|
3661
3665
|
},
|
|
3662
3666
|
hide() {
|
|
3663
|
-
return PopsInstanceUtils.hide(mode,
|
|
3667
|
+
return PopsInstanceUtils.hide(mode, PopsLayerData[mode], guid, config, animElement, maskElement);
|
|
3664
3668
|
},
|
|
3665
3669
|
show() {
|
|
3666
|
-
return PopsInstanceUtils.show(mode,
|
|
3670
|
+
return PopsInstanceUtils.show(mode, PopsLayerData[mode], guid, config, animElement, maskElement);
|
|
3667
3671
|
},
|
|
3668
3672
|
};
|
|
3669
3673
|
},
|
|
@@ -3685,13 +3689,13 @@ const PopsHandler = {
|
|
|
3685
3689
|
mode: mode,
|
|
3686
3690
|
guid: guid,
|
|
3687
3691
|
close() {
|
|
3688
|
-
return PopsInstanceUtils.close(mode,
|
|
3692
|
+
return PopsInstanceUtils.close(mode, PopsLayerData[mode], guid, config, animElement);
|
|
3689
3693
|
},
|
|
3690
3694
|
hide() {
|
|
3691
|
-
return PopsInstanceUtils.hide(mode,
|
|
3695
|
+
return PopsInstanceUtils.hide(mode, PopsLayerData[mode], guid, config, animElement, maskElement);
|
|
3692
3696
|
},
|
|
3693
3697
|
show() {
|
|
3694
|
-
return PopsInstanceUtils.show(mode,
|
|
3698
|
+
return PopsInstanceUtils.show(mode, PopsLayerData[mode], guid, config, animElement, maskElement);
|
|
3695
3699
|
},
|
|
3696
3700
|
};
|
|
3697
3701
|
},
|
|
@@ -3803,20 +3807,20 @@ const PopsHandler = {
|
|
|
3803
3807
|
if (type === "loading" ||
|
|
3804
3808
|
type === "tooltip" ||
|
|
3805
3809
|
type === "rightClickMenu") {
|
|
3806
|
-
let layer =
|
|
3810
|
+
let layer = PopsLayerData[type];
|
|
3807
3811
|
if (layer) {
|
|
3808
3812
|
PopsInstanceUtils.removeInstance([layer], "", true);
|
|
3809
3813
|
}
|
|
3810
3814
|
}
|
|
3811
3815
|
else {
|
|
3812
3816
|
PopsInstanceUtils.removeInstance([
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3817
|
+
PopsLayerData.alert,
|
|
3818
|
+
PopsLayerData.confirm,
|
|
3819
|
+
PopsLayerData.prompt,
|
|
3820
|
+
PopsLayerData.iframe,
|
|
3821
|
+
PopsLayerData.drawer,
|
|
3822
|
+
PopsLayerData.folder,
|
|
3823
|
+
PopsLayerData.panel,
|
|
3820
3824
|
], "", true);
|
|
3821
3825
|
}
|
|
3822
3826
|
}
|
|
@@ -3837,7 +3841,7 @@ const PopsHandler = {
|
|
|
3837
3841
|
* @param value
|
|
3838
3842
|
*/
|
|
3839
3843
|
handlePush(type, value) {
|
|
3840
|
-
|
|
3844
|
+
PopsLayerData[type].push(value);
|
|
3841
3845
|
},
|
|
3842
3846
|
};
|
|
3843
3847
|
|
|
@@ -4759,7 +4763,7 @@ const PopsIframe = {
|
|
|
4759
4763
|
popsDOMUtils.on(headerCloseBtnElement, "click", (event) => {
|
|
4760
4764
|
event.preventDefault();
|
|
4761
4765
|
event.stopPropagation();
|
|
4762
|
-
PopsInstanceUtils.removeInstance([
|
|
4766
|
+
PopsInstanceUtils.removeInstance([PopsLayerData.iframe], guid, false);
|
|
4763
4767
|
if (typeof config?.btn?.close?.callback === "function") {
|
|
4764
4768
|
config.btn.close.callback(eventDetails, event);
|
|
4765
4769
|
}
|
|
@@ -7057,7 +7061,10 @@ const PopsTooltip = {
|
|
|
7057
7061
|
},
|
|
7058
7062
|
};
|
|
7059
7063
|
|
|
7060
|
-
|
|
7064
|
+
/**
|
|
7065
|
+
* 处理组件(把组件配置转为组件元素)
|
|
7066
|
+
*/
|
|
7067
|
+
const PanelHandlerComponents = () => {
|
|
7061
7068
|
return {
|
|
7062
7069
|
/**
|
|
7063
7070
|
* 左侧的ul容器
|
|
@@ -7075,6 +7082,8 @@ const PanelHandleContentDetails = () => {
|
|
|
7075
7082
|
* 元素
|
|
7076
7083
|
*/
|
|
7077
7084
|
$el: {
|
|
7085
|
+
/** pops主元素 */
|
|
7086
|
+
$pops: null,
|
|
7078
7087
|
/** 内容 */
|
|
7079
7088
|
$content: null,
|
|
7080
7089
|
/** 左侧容器 */
|
|
@@ -7087,8 +7096,6 @@ const PanelHandleContentDetails = () => {
|
|
|
7087
7096
|
* @param details
|
|
7088
7097
|
*/
|
|
7089
7098
|
init(details) {
|
|
7090
|
-
// @ts-ignore
|
|
7091
|
-
this.$el = null;
|
|
7092
7099
|
this.$el = {
|
|
7093
7100
|
...details.$el,
|
|
7094
7101
|
};
|
|
@@ -7151,11 +7158,12 @@ const PanelHandleContentDetails = () => {
|
|
|
7151
7158
|
* 清空container容器的元素
|
|
7152
7159
|
*/
|
|
7153
7160
|
clearContainer() {
|
|
7161
|
+
Reflect.deleteProperty(this.$el.$contentSectionContainer, "__formConfig__");
|
|
7154
7162
|
PopsSafeUtils.setSafeHTML(this.sectionContainerHeaderULElement, "");
|
|
7155
7163
|
PopsSafeUtils.setSafeHTML(this.sectionContainerULElement, "");
|
|
7156
7164
|
this.$el.$content
|
|
7157
7165
|
?.querySelectorAll("section.pops-panel-deepMenu-container")
|
|
7158
|
-
.forEach((
|
|
7166
|
+
.forEach(($el) => $el.remove());
|
|
7159
7167
|
},
|
|
7160
7168
|
/**
|
|
7161
7169
|
* 清空左侧容器已访问记录
|
|
@@ -7163,8 +7171,8 @@ const PanelHandleContentDetails = () => {
|
|
|
7163
7171
|
clearAsideItemIsVisited() {
|
|
7164
7172
|
this.$el.$contentAside
|
|
7165
7173
|
.querySelectorAll(".pops-is-visited")
|
|
7166
|
-
.forEach((
|
|
7167
|
-
popsDOMUtils.removeClassName(
|
|
7174
|
+
.forEach(($el) => {
|
|
7175
|
+
popsDOMUtils.removeClassName($el, "pops-is-visited");
|
|
7168
7176
|
});
|
|
7169
7177
|
},
|
|
7170
7178
|
/**
|
|
@@ -7241,34 +7249,33 @@ const PanelHandleContentDetails = () => {
|
|
|
7241
7249
|
* @param asideConfig
|
|
7242
7250
|
*/
|
|
7243
7251
|
createAsideItem(asideConfig) {
|
|
7244
|
-
let
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
PopsSafeUtils.setSafeHTML(liElement, asideConfig.title);
|
|
7252
|
+
let $li = document.createElement("li");
|
|
7253
|
+
$li.id = asideConfig.id;
|
|
7254
|
+
Reflect.set($li, "__forms__", asideConfig.forms);
|
|
7255
|
+
PopsSafeUtils.setSafeHTML($li, asideConfig.title);
|
|
7249
7256
|
/* 处理className */
|
|
7250
|
-
this.setElementClassName(
|
|
7251
|
-
this.setElementAttributes(
|
|
7252
|
-
this.setElementProps(
|
|
7253
|
-
return
|
|
7257
|
+
this.setElementClassName($li, asideConfig.className);
|
|
7258
|
+
this.setElementAttributes($li, asideConfig.attributes);
|
|
7259
|
+
this.setElementProps($li, asideConfig.props);
|
|
7260
|
+
return $li;
|
|
7254
7261
|
},
|
|
7255
7262
|
/**
|
|
7256
|
-
* 创建中间容器的元素<li>
|
|
7257
7263
|
* type ==> switch
|
|
7264
|
+
* 创建中间容器的元素<li>
|
|
7258
7265
|
* @param formConfig
|
|
7259
7266
|
*/
|
|
7260
7267
|
createSectionContainerItem_switch(formConfig) {
|
|
7261
|
-
let
|
|
7262
|
-
|
|
7263
|
-
this.setElementClassName(
|
|
7264
|
-
this.setElementAttributes(
|
|
7265
|
-
this.setElementProps(
|
|
7268
|
+
let $li = document.createElement("li");
|
|
7269
|
+
Reflect.set($li, "__formConfig__", formConfig);
|
|
7270
|
+
this.setElementClassName($li, formConfig.className);
|
|
7271
|
+
this.setElementAttributes($li, formConfig.attributes);
|
|
7272
|
+
this.setElementProps($li, formConfig.props);
|
|
7266
7273
|
/* 左边底部的描述的文字 */
|
|
7267
7274
|
let leftDescriptionText = "";
|
|
7268
7275
|
if (Boolean(formConfig.description)) {
|
|
7269
7276
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
7270
7277
|
}
|
|
7271
|
-
PopsSafeUtils.setSafeHTML(
|
|
7278
|
+
PopsSafeUtils.setSafeHTML($li,
|
|
7272
7279
|
/*html*/ `
|
|
7273
7280
|
<div class="pops-panel-item-left-text">
|
|
7274
7281
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
@@ -7285,9 +7292,9 @@ const PanelHandleContentDetails = () => {
|
|
|
7285
7292
|
value: Boolean(formConfig.getValue()),
|
|
7286
7293
|
},
|
|
7287
7294
|
$ele: {
|
|
7288
|
-
switch:
|
|
7289
|
-
input:
|
|
7290
|
-
core:
|
|
7295
|
+
switch: $li.querySelector(".pops-panel-switch"),
|
|
7296
|
+
input: $li.querySelector(".pops-panel-switch__input"),
|
|
7297
|
+
core: $li.querySelector(".pops-panel-switch__core"),
|
|
7291
7298
|
},
|
|
7292
7299
|
init() {
|
|
7293
7300
|
this.setStatus(this.$data.value);
|
|
@@ -7349,26 +7356,26 @@ const PanelHandleContentDetails = () => {
|
|
|
7349
7356
|
},
|
|
7350
7357
|
};
|
|
7351
7358
|
PopsPanelSwitch.init();
|
|
7352
|
-
|
|
7353
|
-
return
|
|
7359
|
+
Reflect.set($li, "data-switch", PopsPanelSwitch);
|
|
7360
|
+
return $li;
|
|
7354
7361
|
},
|
|
7355
7362
|
/**
|
|
7356
|
-
* 获取中间容器的元素<li>
|
|
7357
7363
|
* type ==> slider
|
|
7364
|
+
* 获取中间容器的元素<li>
|
|
7358
7365
|
* @param formConfig
|
|
7359
7366
|
*/
|
|
7360
7367
|
createSectionContainerItem_slider(formConfig) {
|
|
7361
|
-
let
|
|
7362
|
-
|
|
7363
|
-
this.setElementClassName(
|
|
7364
|
-
this.setElementAttributes(
|
|
7365
|
-
this.setElementProps(
|
|
7368
|
+
let $li = document.createElement("li");
|
|
7369
|
+
Reflect.set($li, "__formConfig__", formConfig);
|
|
7370
|
+
this.setElementClassName($li, formConfig.className);
|
|
7371
|
+
this.setElementAttributes($li, formConfig.attributes);
|
|
7372
|
+
this.setElementProps($li, formConfig.props);
|
|
7366
7373
|
/* 左边底部的描述的文字 */
|
|
7367
7374
|
let leftDescriptionText = "";
|
|
7368
7375
|
if (Boolean(formConfig.description)) {
|
|
7369
7376
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
7370
7377
|
}
|
|
7371
|
-
PopsSafeUtils.setSafeHTML(
|
|
7378
|
+
PopsSafeUtils.setSafeHTML($li,
|
|
7372
7379
|
/*html*/ `
|
|
7373
7380
|
<div class="pops-panel-item-left-text">
|
|
7374
7381
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
@@ -7376,11 +7383,11 @@ const PanelHandleContentDetails = () => {
|
|
|
7376
7383
|
<input type="range" min="${formConfig.min}" max="${formConfig.max}">
|
|
7377
7384
|
</div>
|
|
7378
7385
|
`);
|
|
7379
|
-
let
|
|
7386
|
+
let $rangeInput = $li.querySelector(".pops-panel-slider input[type=range]");
|
|
7380
7387
|
if (formConfig.step) {
|
|
7381
|
-
|
|
7388
|
+
$rangeInput.setAttribute("step", formConfig.step.toString());
|
|
7382
7389
|
}
|
|
7383
|
-
|
|
7390
|
+
$rangeInput.value = formConfig.getValue().toString();
|
|
7384
7391
|
/**
|
|
7385
7392
|
* 获取提示的内容
|
|
7386
7393
|
* @param value
|
|
@@ -7394,9 +7401,9 @@ const PanelHandleContentDetails = () => {
|
|
|
7394
7401
|
}
|
|
7395
7402
|
};
|
|
7396
7403
|
let tooltip = PopsTooltip.init({
|
|
7397
|
-
target:
|
|
7404
|
+
target: $rangeInput.parentElement,
|
|
7398
7405
|
content: () => {
|
|
7399
|
-
return getToolTipContent(
|
|
7406
|
+
return getToolTipContent($rangeInput.value);
|
|
7400
7407
|
},
|
|
7401
7408
|
zIndex: () => {
|
|
7402
7409
|
return PopsInstanceUtils.getPopsMaxZIndex().zIndex;
|
|
@@ -7407,32 +7414,31 @@ const PanelHandleContentDetails = () => {
|
|
|
7407
7414
|
position: "top",
|
|
7408
7415
|
arrowDistance: 10,
|
|
7409
7416
|
});
|
|
7410
|
-
popsDOMUtils.on(
|
|
7411
|
-
tooltip.toolTip.changeContent(getToolTipContent(
|
|
7417
|
+
popsDOMUtils.on($rangeInput, ["input", "propertychange"], void 0, function (event) {
|
|
7418
|
+
tooltip.toolTip.changeContent(getToolTipContent($rangeInput.value));
|
|
7412
7419
|
if (typeof formConfig.callback === "function") {
|
|
7413
|
-
formConfig.callback(event,
|
|
7420
|
+
formConfig.callback(event, $rangeInput.valueAsNumber);
|
|
7414
7421
|
}
|
|
7415
7422
|
});
|
|
7416
|
-
return
|
|
7423
|
+
return $li;
|
|
7417
7424
|
},
|
|
7418
7425
|
/**
|
|
7419
|
-
* 获取中间容器的元素<li>
|
|
7420
7426
|
* type ==> slider
|
|
7427
|
+
* 获取中间容器的元素<li>
|
|
7421
7428
|
* @param formConfig
|
|
7422
7429
|
*/
|
|
7423
7430
|
createSectionContainerItem_slider_new(formConfig) {
|
|
7424
|
-
let
|
|
7425
|
-
|
|
7426
|
-
|
|
7427
|
-
this.
|
|
7428
|
-
this.
|
|
7429
|
-
this.setElementProps(liElement, formConfig.props);
|
|
7431
|
+
let $li = document.createElement("li");
|
|
7432
|
+
Reflect.set($li, "__formConfig__", formConfig);
|
|
7433
|
+
this.setElementClassName($li, formConfig.className);
|
|
7434
|
+
this.setElementAttributes($li, formConfig.attributes);
|
|
7435
|
+
this.setElementProps($li, formConfig.props);
|
|
7430
7436
|
/* 左边底部的描述的文字 */
|
|
7431
7437
|
let leftDescriptionText = "";
|
|
7432
7438
|
if (Boolean(formConfig.description)) {
|
|
7433
7439
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
7434
7440
|
}
|
|
7435
|
-
PopsSafeUtils.setSafeHTML(
|
|
7441
|
+
PopsSafeUtils.setSafeHTML($li,
|
|
7436
7442
|
/*html*/ `
|
|
7437
7443
|
<div class="pops-panel-item-left-text" style="flex: 1;">
|
|
7438
7444
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
@@ -7507,11 +7513,11 @@ const PanelHandleContentDetails = () => {
|
|
|
7507
7513
|
tooltip: null,
|
|
7508
7514
|
},
|
|
7509
7515
|
$ele: {
|
|
7510
|
-
slider:
|
|
7511
|
-
runAway:
|
|
7512
|
-
bar:
|
|
7513
|
-
buttonWrapper:
|
|
7514
|
-
button:
|
|
7516
|
+
slider: $li.querySelector(".pops-slider"),
|
|
7517
|
+
runAway: $li.querySelector(".pops-slider__runway"),
|
|
7518
|
+
bar: $li.querySelector(".pops-slider__bar"),
|
|
7519
|
+
buttonWrapper: $li.querySelector(".pops-slider__button-wrapper"),
|
|
7520
|
+
button: $li.querySelector(".pops-slider__button"),
|
|
7515
7521
|
},
|
|
7516
7522
|
$interval: {
|
|
7517
7523
|
isCheck: false,
|
|
@@ -7577,14 +7583,10 @@ const PanelHandleContentDetails = () => {
|
|
|
7577
7583
|
this.$ele.slider.setAttribute("data-max", this.max.toString());
|
|
7578
7584
|
this.$ele.slider.setAttribute("data-value", this.value.toString());
|
|
7579
7585
|
this.$ele.slider.setAttribute("data-step", this.step.toString());
|
|
7580
|
-
|
|
7581
|
-
this.$ele.slider
|
|
7582
|
-
|
|
7583
|
-
this.$ele.slider
|
|
7584
|
-
// @ts-ignore
|
|
7585
|
-
this.$ele.slider["data-value"] = this.value;
|
|
7586
|
-
// @ts-ignore
|
|
7587
|
-
this.$ele.slider["data-step"] = this.step;
|
|
7586
|
+
Reflect.set(this.$ele.slider, "data-min", this.min);
|
|
7587
|
+
Reflect.set(this.$ele.slider, "data-max", this.max);
|
|
7588
|
+
Reflect.set(this.$ele.slider, "data-value", this.value);
|
|
7589
|
+
Reflect.set(this.$ele.slider, "data-step", this.step);
|
|
7588
7590
|
},
|
|
7589
7591
|
/**
|
|
7590
7592
|
* 初始化滑块的总长度的数据(px)
|
|
@@ -7604,7 +7606,7 @@ const PanelHandleContentDetails = () => {
|
|
|
7604
7606
|
let widthPx = 0;
|
|
7605
7607
|
for (let stepValue = this.min; stepValue <= this.max; stepValue += this.step) {
|
|
7606
7608
|
let value = this.formatValue(stepValue);
|
|
7607
|
-
let info
|
|
7609
|
+
let info;
|
|
7608
7610
|
if (value === this.min) {
|
|
7609
7611
|
/* 起始 */
|
|
7610
7612
|
info = {
|
|
@@ -7647,7 +7649,7 @@ const PanelHandleContentDetails = () => {
|
|
|
7647
7649
|
let widthPx = 0;
|
|
7648
7650
|
for (let stepValue = this.min; stepValue <= this.max; stepValue = PopsMathFloatUtils.add(stepValue, this.step)) {
|
|
7649
7651
|
let value = this.formatValue(stepValue);
|
|
7650
|
-
let info
|
|
7652
|
+
let info;
|
|
7651
7653
|
if (value === this.min) {
|
|
7652
7654
|
/* 起始 */
|
|
7653
7655
|
info = {
|
|
@@ -7805,7 +7807,7 @@ const PanelHandleContentDetails = () => {
|
|
|
7805
7807
|
event.target !== this.$ele.bar) {
|
|
7806
7808
|
return;
|
|
7807
7809
|
}
|
|
7808
|
-
let clickX = parseFloat(event.offsetX);
|
|
7810
|
+
let clickX = parseFloat(event.offsetX.toString());
|
|
7809
7811
|
this.dragStartCallBack();
|
|
7810
7812
|
this.dragMoveCallBack(event, clickX, this.value);
|
|
7811
7813
|
this.dragEndCallBack(clickX);
|
|
@@ -7958,7 +7960,7 @@ const PanelHandleContentDetails = () => {
|
|
|
7958
7960
|
return formConfig.getToolTipContent(PopsPanelSlider.value);
|
|
7959
7961
|
}
|
|
7960
7962
|
else {
|
|
7961
|
-
return PopsPanelSlider.value;
|
|
7963
|
+
return PopsPanelSlider.value.toString();
|
|
7962
7964
|
}
|
|
7963
7965
|
}
|
|
7964
7966
|
let tooltip = PopsTooltip.init({
|
|
@@ -8002,20 +8004,20 @@ const PanelHandleContentDetails = () => {
|
|
|
8002
8004
|
},
|
|
8003
8005
|
};
|
|
8004
8006
|
PopsPanelSlider.init();
|
|
8005
|
-
|
|
8006
|
-
return
|
|
8007
|
+
Reflect.set($li, "data-slider", PopsPanelSlider);
|
|
8008
|
+
return $li;
|
|
8007
8009
|
},
|
|
8008
8010
|
/**
|
|
8009
|
-
* 获取中间容器的元素<li>
|
|
8010
8011
|
* type ==> input
|
|
8012
|
+
* 获取中间容器的元素<li>
|
|
8011
8013
|
* @param formConfig
|
|
8012
8014
|
*/
|
|
8013
8015
|
createSectionContainerItem_input(formConfig) {
|
|
8014
|
-
let
|
|
8015
|
-
|
|
8016
|
-
this.setElementClassName(
|
|
8017
|
-
this.setElementAttributes(
|
|
8018
|
-
this.setElementProps(
|
|
8016
|
+
let $li = document.createElement("li");
|
|
8017
|
+
Reflect.set($li, "__formConfig__", formConfig);
|
|
8018
|
+
this.setElementClassName($li, formConfig.className);
|
|
8019
|
+
this.setElementAttributes($li, formConfig.attributes);
|
|
8020
|
+
this.setElementProps($li, formConfig.props);
|
|
8019
8021
|
let inputType = "text";
|
|
8020
8022
|
if (formConfig.isPassword) {
|
|
8021
8023
|
inputType = "password";
|
|
@@ -8028,7 +8030,7 @@ const PanelHandleContentDetails = () => {
|
|
|
8028
8030
|
if (Boolean(formConfig.description)) {
|
|
8029
8031
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8030
8032
|
}
|
|
8031
|
-
PopsSafeUtils.setSafeHTML(
|
|
8033
|
+
PopsSafeUtils.setSafeHTML($li,
|
|
8032
8034
|
/*html*/ `
|
|
8033
8035
|
<div class="pops-panel-item-left-text">
|
|
8034
8036
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
@@ -8039,8 +8041,8 @@ const PanelHandleContentDetails = () => {
|
|
|
8039
8041
|
const PopsPanelInput = {
|
|
8040
8042
|
[Symbol.toStringTag]: "PopsPanelInput",
|
|
8041
8043
|
$ele: {
|
|
8042
|
-
panelInput:
|
|
8043
|
-
input:
|
|
8044
|
+
panelInput: $li.querySelector(".pops-panel-input"),
|
|
8045
|
+
input: $li.querySelector("input"),
|
|
8044
8046
|
inputSpanIcon: document.createElement("span"),
|
|
8045
8047
|
inputSpanIconInner: null,
|
|
8046
8048
|
icon: null,
|
|
@@ -8069,7 +8071,7 @@ const PanelHandleContentDetails = () => {
|
|
|
8069
8071
|
this.disable();
|
|
8070
8072
|
}
|
|
8071
8073
|
if (typeof formConfig.handlerCallBack === "function") {
|
|
8072
|
-
formConfig.handlerCallBack(
|
|
8074
|
+
formConfig.handlerCallBack($li, this.$ele.input);
|
|
8073
8075
|
}
|
|
8074
8076
|
},
|
|
8075
8077
|
/**
|
|
@@ -8204,26 +8206,26 @@ const PanelHandleContentDetails = () => {
|
|
|
8204
8206
|
},
|
|
8205
8207
|
};
|
|
8206
8208
|
PopsPanelInput.init();
|
|
8207
|
-
|
|
8208
|
-
return
|
|
8209
|
+
Reflect.set($li, "data-input", PopsPanelInput);
|
|
8210
|
+
return $li;
|
|
8209
8211
|
},
|
|
8210
8212
|
/**
|
|
8211
|
-
* 获取中间容器的元素<li>
|
|
8212
8213
|
* type ==> textarea
|
|
8214
|
+
* 获取中间容器的元素<li>
|
|
8213
8215
|
* @param formConfig
|
|
8214
8216
|
*/
|
|
8215
8217
|
createSectionContainerItem_textarea(formConfig) {
|
|
8216
|
-
let
|
|
8217
|
-
|
|
8218
|
-
this.setElementClassName(
|
|
8219
|
-
this.setElementAttributes(
|
|
8220
|
-
this.setElementProps(
|
|
8218
|
+
let $li = document.createElement("li");
|
|
8219
|
+
Reflect.set($li, "__formConfig__", formConfig);
|
|
8220
|
+
this.setElementClassName($li, formConfig.className);
|
|
8221
|
+
this.setElementAttributes($li, formConfig.attributes);
|
|
8222
|
+
this.setElementProps($li, formConfig.props);
|
|
8221
8223
|
/* 左边底部的描述的文字 */
|
|
8222
8224
|
let leftDescriptionText = "";
|
|
8223
8225
|
if (Boolean(formConfig.description)) {
|
|
8224
8226
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8225
8227
|
}
|
|
8226
|
-
PopsSafeUtils.setSafeHTML(
|
|
8228
|
+
PopsSafeUtils.setSafeHTML($li,
|
|
8227
8229
|
/*html*/ `
|
|
8228
8230
|
<div class="pops-panel-item-left-text">
|
|
8229
8231
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
@@ -8234,8 +8236,8 @@ const PanelHandleContentDetails = () => {
|
|
|
8234
8236
|
const PopsPanelTextArea = {
|
|
8235
8237
|
[Symbol.toStringTag]: "PopsPanelTextArea",
|
|
8236
8238
|
$ele: {
|
|
8237
|
-
panelTextarea:
|
|
8238
|
-
textarea:
|
|
8239
|
+
panelTextarea: $li.querySelector(".pops-panel-textarea"),
|
|
8240
|
+
textarea: $li.querySelector(".pops-panel-textarea textarea"),
|
|
8239
8241
|
},
|
|
8240
8242
|
$data: {
|
|
8241
8243
|
value: formConfig.getValue(),
|
|
@@ -8267,35 +8269,36 @@ const PanelHandleContentDetails = () => {
|
|
|
8267
8269
|
*/
|
|
8268
8270
|
setChangeEvent() {
|
|
8269
8271
|
popsDOMUtils.on(this.$ele.textarea, ["input", "propertychange"], void 0, (event) => {
|
|
8270
|
-
|
|
8272
|
+
let value = this.$ele.textarea.value;
|
|
8273
|
+
this.$data.value = value;
|
|
8271
8274
|
if (typeof formConfig.callback === "function") {
|
|
8272
|
-
formConfig.callback(event,
|
|
8275
|
+
formConfig.callback(event, value);
|
|
8273
8276
|
}
|
|
8274
8277
|
});
|
|
8275
8278
|
},
|
|
8276
8279
|
};
|
|
8277
8280
|
PopsPanelTextArea.init();
|
|
8278
|
-
|
|
8279
|
-
return
|
|
8281
|
+
Reflect.set($li, "data-textarea", PopsPanelTextArea);
|
|
8282
|
+
return $li;
|
|
8280
8283
|
},
|
|
8281
8284
|
/**
|
|
8282
|
-
* 获取中间容器的元素<li>
|
|
8283
8285
|
* type ==> select
|
|
8286
|
+
* 获取中间容器的元素<li>
|
|
8284
8287
|
* @param formConfig
|
|
8285
8288
|
*/
|
|
8286
8289
|
createSectionContainerItem_select(formConfig) {
|
|
8287
8290
|
const that = this;
|
|
8288
|
-
let
|
|
8289
|
-
|
|
8290
|
-
this.setElementClassName(
|
|
8291
|
-
this.setElementAttributes(
|
|
8292
|
-
this.setElementProps(
|
|
8291
|
+
let $li = document.createElement("li");
|
|
8292
|
+
Reflect.set($li, "__formConfig__", formConfig);
|
|
8293
|
+
this.setElementClassName($li, formConfig.className);
|
|
8294
|
+
this.setElementAttributes($li, formConfig.attributes);
|
|
8295
|
+
this.setElementProps($li, formConfig.props);
|
|
8293
8296
|
/* 左边底部的描述的文字 */
|
|
8294
8297
|
let leftDescriptionText = "";
|
|
8295
8298
|
if (Boolean(formConfig.description)) {
|
|
8296
8299
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8297
8300
|
}
|
|
8298
|
-
PopsSafeUtils.setSafeHTML(
|
|
8301
|
+
PopsSafeUtils.setSafeHTML($li,
|
|
8299
8302
|
/*html*/ `
|
|
8300
8303
|
<div class="pops-panel-item-left-text">
|
|
8301
8304
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
@@ -8306,8 +8309,8 @@ const PanelHandleContentDetails = () => {
|
|
|
8306
8309
|
const PopsPanelSelect = {
|
|
8307
8310
|
[Symbol.toStringTag]: "PopsPanelSelect",
|
|
8308
8311
|
$ele: {
|
|
8309
|
-
panelSelect:
|
|
8310
|
-
select:
|
|
8312
|
+
panelSelect: $li.querySelector(".pops-panel-select"),
|
|
8313
|
+
select: $li.querySelector(".pops-panel-select select"),
|
|
8311
8314
|
},
|
|
8312
8315
|
$eleKey: {
|
|
8313
8316
|
disable: "__disable__",
|
|
@@ -8427,7 +8430,7 @@ const PanelHandleContentDetails = () => {
|
|
|
8427
8430
|
*/
|
|
8428
8431
|
setChangeEvent() {
|
|
8429
8432
|
popsDOMUtils.on(this.$ele.select, "change", void 0, (event) => {
|
|
8430
|
-
let $isSelectedElement =
|
|
8433
|
+
let $isSelectedElement = this.$ele.select[this.$ele.select.selectedIndex];
|
|
8431
8434
|
let selectInfo = this.getSelectOptionInfo($isSelectedElement);
|
|
8432
8435
|
this.setSelectOptionsDisableStatus();
|
|
8433
8436
|
if (typeof formConfig.callback === "function") {
|
|
@@ -8440,9 +8443,9 @@ const PanelHandleContentDetails = () => {
|
|
|
8440
8443
|
/* 如果成功创建,加入到中间容器中 */
|
|
8441
8444
|
let childUListClassName = "pops-panel-select-child-forms";
|
|
8442
8445
|
// 移除旧的元素
|
|
8443
|
-
while (
|
|
8444
|
-
if (
|
|
8445
|
-
|
|
8446
|
+
while ($li.nextElementSibling) {
|
|
8447
|
+
if ($li.nextElementSibling.classList.contains(childUListClassName)) {
|
|
8448
|
+
$li.nextElementSibling.remove();
|
|
8446
8449
|
}
|
|
8447
8450
|
else {
|
|
8448
8451
|
break;
|
|
@@ -8450,7 +8453,7 @@ const PanelHandleContentDetails = () => {
|
|
|
8450
8453
|
}
|
|
8451
8454
|
let $childUList = document.createElement("ul");
|
|
8452
8455
|
$childUList.className = childUListClassName;
|
|
8453
|
-
popsDOMUtils.after(
|
|
8456
|
+
popsDOMUtils.after($li, $childUList);
|
|
8454
8457
|
that.uListContainerAddItem(formConfig, {
|
|
8455
8458
|
ulElement: $childUList,
|
|
8456
8459
|
});
|
|
@@ -8470,26 +8473,26 @@ const PanelHandleContentDetails = () => {
|
|
|
8470
8473
|
},
|
|
8471
8474
|
};
|
|
8472
8475
|
PopsPanelSelect.init();
|
|
8473
|
-
Reflect.set(
|
|
8474
|
-
return
|
|
8476
|
+
Reflect.set($li, "data-select", PopsPanelSelect);
|
|
8477
|
+
return $li;
|
|
8475
8478
|
},
|
|
8476
8479
|
/**
|
|
8477
|
-
* 获取中间容器的元素<li>
|
|
8478
8480
|
* type ==> select-multiple
|
|
8481
|
+
* 获取中间容器的元素<li>
|
|
8479
8482
|
* @param formConfig
|
|
8480
8483
|
*/
|
|
8481
8484
|
createSectionContainerItem_select_multiple_new(formConfig) {
|
|
8482
|
-
let
|
|
8483
|
-
Reflect.set(
|
|
8484
|
-
this.setElementClassName(
|
|
8485
|
-
this.setElementAttributes(
|
|
8486
|
-
this.setElementProps(
|
|
8485
|
+
let $li = document.createElement("li");
|
|
8486
|
+
Reflect.set($li, "__formConfig__", formConfig);
|
|
8487
|
+
this.setElementClassName($li, formConfig.className);
|
|
8488
|
+
this.setElementAttributes($li, formConfig.attributes);
|
|
8489
|
+
this.setElementProps($li, formConfig.props);
|
|
8487
8490
|
/* 左边底部的描述的文字 */
|
|
8488
8491
|
let leftDescriptionText = "";
|
|
8489
8492
|
if (Boolean(formConfig.description)) {
|
|
8490
8493
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8491
8494
|
}
|
|
8492
|
-
PopsSafeUtils.setSafeHTML(
|
|
8495
|
+
PopsSafeUtils.setSafeHTML($li,
|
|
8493
8496
|
/*html*/ `
|
|
8494
8497
|
<div class="pops-panel-item-left-text">
|
|
8495
8498
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
@@ -8564,15 +8567,14 @@ const PanelHandleContentDetails = () => {
|
|
|
8564
8567
|
},
|
|
8565
8568
|
/** 初始化$el变量 */
|
|
8566
8569
|
inintEl() {
|
|
8567
|
-
this.$el.$container =
|
|
8568
|
-
this.$el.$wrapper =
|
|
8569
|
-
this.$el.$section =
|
|
8570
|
-
this.$el.$selectedInputWrapper =
|
|
8571
|
-
this.$el.$selectedPlaceHolderWrapper =
|
|
8572
|
-
liElement.querySelector(".el-select__selected-item.el-select__placeholder");
|
|
8570
|
+
this.$el.$container = $li.querySelector(".pops-panel-select-multiple");
|
|
8571
|
+
this.$el.$wrapper = $li.querySelector(".el-select__wrapper");
|
|
8572
|
+
this.$el.$section = $li.querySelector(".el-select__selection");
|
|
8573
|
+
this.$el.$selectedInputWrapper = $li.querySelector(".el-select__selected-item.el-select__input-wrapper");
|
|
8574
|
+
this.$el.$selectedPlaceHolderWrapper = $li.querySelector(".el-select__selected-item.el-select__placeholder");
|
|
8573
8575
|
this.$el.$suffix =
|
|
8574
|
-
|
|
8575
|
-
this.$el.$suffixIcon =
|
|
8576
|
+
$li.querySelector(".el-select__suffix");
|
|
8577
|
+
this.$el.$suffixIcon = $li.querySelector(".el-select__suffix .el-icon");
|
|
8576
8578
|
// 先把手动输入框隐藏
|
|
8577
8579
|
this.hideInputWrapper();
|
|
8578
8580
|
},
|
|
@@ -9130,26 +9132,26 @@ const PanelHandleContentDetails = () => {
|
|
|
9130
9132
|
},
|
|
9131
9133
|
};
|
|
9132
9134
|
PopsPanelSelectMultiple.init();
|
|
9133
|
-
Reflect.set(
|
|
9134
|
-
return
|
|
9135
|
+
Reflect.set($li, "data-select-multiple", PopsPanelSelectMultiple);
|
|
9136
|
+
return $li;
|
|
9135
9137
|
},
|
|
9136
9138
|
/**
|
|
9137
|
-
* 获取中间容器的元素<li>
|
|
9138
9139
|
* type ==> button
|
|
9140
|
+
* 获取中间容器的元素<li>
|
|
9139
9141
|
* @param formConfig
|
|
9140
9142
|
*/
|
|
9141
9143
|
createSectionContainerItem_button(formConfig) {
|
|
9142
|
-
let
|
|
9143
|
-
|
|
9144
|
-
this.setElementClassName(
|
|
9145
|
-
this.setElementAttributes(
|
|
9146
|
-
this.setElementProps(
|
|
9144
|
+
let $li = document.createElement("li");
|
|
9145
|
+
Reflect.set($li, "__formConfig__", formConfig);
|
|
9146
|
+
this.setElementClassName($li, formConfig.className);
|
|
9147
|
+
this.setElementAttributes($li, formConfig.attributes);
|
|
9148
|
+
this.setElementProps($li, formConfig.props);
|
|
9147
9149
|
/* 左边底部的描述的文字 */
|
|
9148
9150
|
let leftDescriptionText = "";
|
|
9149
9151
|
if (Boolean(formConfig.description)) {
|
|
9150
9152
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
9151
9153
|
}
|
|
9152
|
-
PopsSafeUtils.setSafeHTML(
|
|
9154
|
+
PopsSafeUtils.setSafeHTML($li,
|
|
9153
9155
|
/*html*/ `
|
|
9154
9156
|
<div class="pops-panel-item-left-text">
|
|
9155
9157
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
@@ -9163,10 +9165,10 @@ const PanelHandleContentDetails = () => {
|
|
|
9163
9165
|
const PopsPanelButton = {
|
|
9164
9166
|
[Symbol.toStringTag]: "PopsPanelButton",
|
|
9165
9167
|
$ele: {
|
|
9166
|
-
panelButton:
|
|
9167
|
-
button:
|
|
9168
|
-
icon:
|
|
9169
|
-
spanText:
|
|
9168
|
+
panelButton: $li.querySelector(".pops-panel-button"),
|
|
9169
|
+
button: $li.querySelector(".pops-panel-button .pops-panel-button_inner"),
|
|
9170
|
+
icon: $li.querySelector(".pops-panel-button .pops-bottom-icon"),
|
|
9171
|
+
spanText: $li.querySelector(".pops-panel-button .pops-panel-button-text"),
|
|
9170
9172
|
},
|
|
9171
9173
|
$data: {},
|
|
9172
9174
|
init() {
|
|
@@ -9279,10 +9281,11 @@ const PanelHandleContentDetails = () => {
|
|
|
9279
9281
|
},
|
|
9280
9282
|
};
|
|
9281
9283
|
PopsPanelButton.init();
|
|
9282
|
-
|
|
9283
|
-
return
|
|
9284
|
+
Reflect.set($li, "data-button", PopsPanelButton);
|
|
9285
|
+
return $li;
|
|
9284
9286
|
},
|
|
9285
9287
|
/**
|
|
9288
|
+
* type ==> deepMenu
|
|
9286
9289
|
* 获取深层容器的元素<li>
|
|
9287
9290
|
* @param formConfig
|
|
9288
9291
|
*/
|
|
@@ -9290,7 +9293,7 @@ const PanelHandleContentDetails = () => {
|
|
|
9290
9293
|
let that = this;
|
|
9291
9294
|
let $li = document.createElement("li");
|
|
9292
9295
|
$li.classList.add("pops-panel-deepMenu-nav-item");
|
|
9293
|
-
$li
|
|
9296
|
+
Reflect.set($li, "__formConfig__", formConfig);
|
|
9294
9297
|
this.setElementClassName($li, formConfig.className);
|
|
9295
9298
|
// 设置属性
|
|
9296
9299
|
this.setElementAttributes($li, formConfig.attributes);
|
|
@@ -9426,6 +9429,7 @@ const PanelHandleContentDetails = () => {
|
|
|
9426
9429
|
let $deepMenuContainer = popsDOMUtils.createElement("section", {
|
|
9427
9430
|
className: "pops-panel-container pops-panel-deepMenu-container",
|
|
9428
9431
|
});
|
|
9432
|
+
Reflect.set($deepMenuContainer, "__formConfig__", formConfig);
|
|
9429
9433
|
let $deepMenuHeaderUL = popsDOMUtils.createElement("ul", {
|
|
9430
9434
|
className: "pops-panel-deepMenu-container-header-ul",
|
|
9431
9435
|
});
|
|
@@ -9440,13 +9444,13 @@ const PanelHandleContentDetails = () => {
|
|
|
9440
9444
|
className: "pops-panel-deepMenu-container-left-arrow-icon",
|
|
9441
9445
|
innerHTML: PopsIcon.getIcon("arrowLeft"),
|
|
9442
9446
|
});
|
|
9443
|
-
popsDOMUtils.on($headerLeftArrow, "click",
|
|
9444
|
-
event
|
|
9445
|
-
event?.stopPropagation();
|
|
9447
|
+
popsDOMUtils.on($headerLeftArrow, "click", (event) => {
|
|
9448
|
+
popsDOMUtils.preventEvent(event);
|
|
9446
9449
|
// 返回上一层菜单
|
|
9447
|
-
let $prev = $deepMenuContainer.previousElementSibling;
|
|
9450
|
+
let $prev = ($deepMenuContainer.previousElementSibling);
|
|
9448
9451
|
popsDOMUtils.cssShow($prev);
|
|
9449
9452
|
$deepMenuContainer.remove();
|
|
9453
|
+
that.triggerRenderRightContainer($prev);
|
|
9450
9454
|
}, {
|
|
9451
9455
|
once: true,
|
|
9452
9456
|
});
|
|
@@ -9469,6 +9473,7 @@ const PanelHandleContentDetails = () => {
|
|
|
9469
9473
|
sectionBodyContainer: $deepMenuBodyUL,
|
|
9470
9474
|
});
|
|
9471
9475
|
}
|
|
9476
|
+
that.triggerRenderRightContainer($deepMenuContainer);
|
|
9472
9477
|
},
|
|
9473
9478
|
/** 设置项的点击事件 */
|
|
9474
9479
|
setLiClickEvent() {
|
|
@@ -9484,22 +9489,22 @@ const PanelHandleContentDetails = () => {
|
|
|
9484
9489
|
},
|
|
9485
9490
|
};
|
|
9486
9491
|
PopsPanelDeepMenu.init();
|
|
9487
|
-
$li
|
|
9492
|
+
Reflect.set($li, "data-deepMenu", PopsPanelDeepMenu);
|
|
9488
9493
|
return $li;
|
|
9489
9494
|
},
|
|
9490
9495
|
/**
|
|
9491
|
-
* 获取中间容器的元素<li>
|
|
9492
9496
|
* type ===> own
|
|
9497
|
+
* 获取中间容器的元素<li>
|
|
9493
9498
|
* @param formConfig
|
|
9494
9499
|
*/
|
|
9495
9500
|
createSectionContainerItem_own(formConfig) {
|
|
9496
|
-
let
|
|
9497
|
-
|
|
9501
|
+
let $li = document.createElement("li");
|
|
9502
|
+
Reflect.set($li, "__formConfig__", formConfig);
|
|
9498
9503
|
if (formConfig.className) {
|
|
9499
|
-
|
|
9504
|
+
$li.className = formConfig.className;
|
|
9500
9505
|
}
|
|
9501
|
-
|
|
9502
|
-
return
|
|
9506
|
+
$li = formConfig.getLiElementCallBack($li);
|
|
9507
|
+
return $li;
|
|
9503
9508
|
},
|
|
9504
9509
|
/**
|
|
9505
9510
|
* 获取中间容器的元素<li>
|
|
@@ -9620,6 +9625,17 @@ const PanelHandleContentDetails = () => {
|
|
|
9620
9625
|
});
|
|
9621
9626
|
}
|
|
9622
9627
|
},
|
|
9628
|
+
/**
|
|
9629
|
+
* 触发触发渲染右侧容器的事件
|
|
9630
|
+
*/
|
|
9631
|
+
triggerRenderRightContainer($container) {
|
|
9632
|
+
let __formConfig__ = Reflect.get($container, "__formConfig__");
|
|
9633
|
+
this.$el.$pops.dispatchEvent(new CustomEvent("pops:renderRightContainer", {
|
|
9634
|
+
detail: {
|
|
9635
|
+
formConfig: __formConfig__,
|
|
9636
|
+
},
|
|
9637
|
+
}));
|
|
9638
|
+
},
|
|
9623
9639
|
/**
|
|
9624
9640
|
*
|
|
9625
9641
|
* @param formConfig
|
|
@@ -9646,6 +9662,8 @@ const PanelHandleContentDetails = () => {
|
|
|
9646
9662
|
const that = this;
|
|
9647
9663
|
popsDOMUtils.on(asideLiElement, "click", void 0, (event) => {
|
|
9648
9664
|
this.clearContainer();
|
|
9665
|
+
let rightContainerFormConfig = Reflect.get(asideLiElement, "__forms__");
|
|
9666
|
+
Reflect.set(that.$el.$contentSectionContainer, "__formConfig__", rightContainerFormConfig);
|
|
9649
9667
|
popsDOMUtils.cssShow(that.$el.$contentSectionContainer);
|
|
9650
9668
|
this.clearAsideItemIsVisited();
|
|
9651
9669
|
this.setAsideItemIsVisited(asideLiElement);
|
|
@@ -9653,20 +9671,19 @@ const PanelHandleContentDetails = () => {
|
|
|
9653
9671
|
let headerTitleText = asideConfig.headerTitle ?? asideConfig.title;
|
|
9654
9672
|
if (typeof headerTitleText === "string" &&
|
|
9655
9673
|
headerTitleText.trim() !== "") {
|
|
9656
|
-
let
|
|
9657
|
-
|
|
9658
|
-
|
|
9659
|
-
|
|
9660
|
-
|
|
9661
|
-
|
|
9662
|
-
let __forms__ = asideLiElement["__forms__"];
|
|
9663
|
-
__forms__.forEach((formConfig) => {
|
|
9674
|
+
let $containerHeaderTitle = document.createElement("li");
|
|
9675
|
+
Reflect.set($containerHeaderTitle, "__asideConfig__", asideConfig);
|
|
9676
|
+
PopsSafeUtils.setSafeHTML($containerHeaderTitle, headerTitleText);
|
|
9677
|
+
this.sectionContainerHeaderULElement.appendChild($containerHeaderTitle);
|
|
9678
|
+
}
|
|
9679
|
+
rightContainerFormConfig.forEach((formConfig) => {
|
|
9664
9680
|
this.createSectionContainerItem_forms(formConfig);
|
|
9665
9681
|
});
|
|
9666
9682
|
if (typeof asideConfig.callback === "function") {
|
|
9667
9683
|
/* 执行回调 */
|
|
9668
9684
|
asideConfig.callback(event, this.sectionContainerHeaderULElement, this.sectionContainerULElement);
|
|
9669
9685
|
}
|
|
9686
|
+
that.triggerRenderRightContainer(that.$el.$contentSectionContainer);
|
|
9670
9687
|
});
|
|
9671
9688
|
},
|
|
9672
9689
|
};
|
|
@@ -9756,13 +9773,14 @@ const PopsPanel = {
|
|
|
9756
9773
|
if ($mask != null) {
|
|
9757
9774
|
$anim.after($mask);
|
|
9758
9775
|
}
|
|
9759
|
-
let
|
|
9776
|
+
let panelHandlerComponents = PanelHandlerComponents();
|
|
9760
9777
|
/**
|
|
9761
9778
|
* 处理内部配置
|
|
9762
9779
|
*/
|
|
9763
|
-
|
|
9780
|
+
panelHandlerComponents.init({
|
|
9764
9781
|
config: config,
|
|
9765
9782
|
$el: {
|
|
9783
|
+
$pops: $pops,
|
|
9766
9784
|
$content: $content,
|
|
9767
9785
|
$contentAside: $contentAside,
|
|
9768
9786
|
$contentSectionContainer: $contentSectionContainer,
|
|
@@ -9787,7 +9805,15 @@ const PopsPanel = {
|
|
|
9787
9805
|
});
|
|
9788
9806
|
}
|
|
9789
9807
|
let result = PopsHandler.handleResultDetails(eventDetails);
|
|
9790
|
-
return
|
|
9808
|
+
return {
|
|
9809
|
+
...result,
|
|
9810
|
+
addEventListener: (event, listener, options) => {
|
|
9811
|
+
$pops.addEventListener(event, listener, options);
|
|
9812
|
+
},
|
|
9813
|
+
removeEventListener: (event, listener, options) => {
|
|
9814
|
+
$pops.removeEventListener(event, listener, options);
|
|
9815
|
+
},
|
|
9816
|
+
};
|
|
9791
9817
|
},
|
|
9792
9818
|
};
|
|
9793
9819
|
|
|
@@ -11031,14 +11057,14 @@ class Pops {
|
|
|
11031
11057
|
/** 配置 */
|
|
11032
11058
|
config = {
|
|
11033
11059
|
/** 版本号 */
|
|
11034
|
-
version: "2025.
|
|
11060
|
+
version: "2025.7.1",
|
|
11035
11061
|
cssText: PopsCSS,
|
|
11036
11062
|
/** icon图标的svg代码 */
|
|
11037
11063
|
iconSVG: PopsIcon.$data,
|
|
11038
11064
|
/** 当前已配置的动画@keyframes名字映射(初始化时生成) */
|
|
11039
11065
|
animation: PopsAnimation.$data,
|
|
11040
11066
|
/** 存储已创建的元素 */
|
|
11041
|
-
layer:
|
|
11067
|
+
layer: PopsLayerData,
|
|
11042
11068
|
/** 禁止滚动 */
|
|
11043
11069
|
forbiddenScroll: {
|
|
11044
11070
|
event(event) {
|
|
@@ -11054,7 +11080,7 @@ class Pops {
|
|
|
11054
11080
|
/** pops处理float类型使用的工具类 */
|
|
11055
11081
|
MathFloatUtils: PopsMathFloatUtils,
|
|
11056
11082
|
/** pops.panel中用于处理各个类型的工具 */
|
|
11057
|
-
|
|
11083
|
+
PanelHandlerComponents: PanelHandlerComponents,
|
|
11058
11084
|
};
|
|
11059
11085
|
init() { }
|
|
11060
11086
|
/**
|