@whitesev/pops 2.2.6 → 2.2.8

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "2.2.6",
3
+ "version": "2.2.8",
4
4
  "type": "module",
5
5
  "description": "弹窗库",
6
6
  "main": "dist/index.cjs.js",
package/src/Pops.ts CHANGED
@@ -36,7 +36,7 @@ class Pops {
36
36
  /** 配置 */
37
37
  config = {
38
38
  /** 版本号 */
39
- version: "2025.7.18",
39
+ version: "2025.7.29",
40
40
  cssText: PopsCSS,
41
41
  /** icon图标的svg代码 */
42
42
  iconSVG: PopsIcon.$data,
@@ -37,8 +37,8 @@ export const PopsAlertConfig = (): DeepRequired<PopsAlertDetails> => {
37
37
  useShadowRoot: true,
38
38
  class: "",
39
39
  only: false,
40
- width: "350px",
41
- height: "200px",
40
+ width: window.innerWidth < 550 ? "88vw" : "350px",
41
+ height: window.innerHeight < 450 ? "70vh" : "200px",
42
42
  position: "center",
43
43
  animation: "pops-anim-fadein-zoom",
44
44
  zIndex: 10000,
@@ -64,8 +64,8 @@ export const PopsConfirmConfig = (): DeepRequired<PopsConfirmDetails> => {
64
64
  useShadowRoot: true,
65
65
  class: "",
66
66
  only: false,
67
- width: "350px",
68
- height: "200px",
67
+ width: window.innerWidth < 550 ? "88vw" : "350px",
68
+ height: window.innerHeight < 450 ? "70vh" : "200px",
69
69
  position: "center",
70
70
  animation: "pops-anim-fadein-zoom",
71
71
  zIndex: 10000,
@@ -122,8 +122,8 @@ export const PopsFolderConfig = (): DeepRequired<PopsFolderDetails> => {
122
122
  useShadowRoot: true,
123
123
  class: "",
124
124
  only: false,
125
- width: "500px",
126
- height: "400px",
125
+ width: window.innerWidth < 550 ? "88vw" : "500px",
126
+ height: window.innerHeight < 450 ? "70vh" : "400px",
127
127
  position: "center",
128
128
  animation: "pops-anim-fadein-zoom",
129
129
  zIndex: 10000,
@@ -33,8 +33,8 @@ export const PopsIframeConfig = (): DeepRequired<PopsIframeDetails> => {
33
33
  dragExtraDistance: 3,
34
34
  dragMoveCallBack() {},
35
35
  dragEndCallBack() {},
36
- width: "300px",
37
- height: "250px",
36
+ width: window.innerWidth < 550 ? "88vw" : "350px",
37
+ height: window.innerHeight < 450 ? "70vh" : "200px",
38
38
  topRightButton: "min|max|mise|close",
39
39
  sandbox: false,
40
40
  forbiddenScroll: false,
@@ -420,6 +420,24 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
420
420
  },
421
421
  ],
422
422
  },
423
+ {
424
+ type: "deepMenu",
425
+ className: "panel-deepMenu2",
426
+ attributes: {},
427
+ //@ts-ignore
428
+ props: {},
429
+ text: "deepMenu2",
430
+ description: "二级菜单",
431
+ rightText: "自定义配置",
432
+ arrowRightIcon: true,
433
+ afterAddToUListCallBack(formConfig, container) {
434
+ console.log(formConfig, container);
435
+ },
436
+ clickCallBack(event, formConfig) {
437
+ console.log("进入子配置", event, formConfig);
438
+ },
439
+ forms: [],
440
+ },
423
441
  ],
424
442
  },
425
443
  {
@@ -515,8 +533,8 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
515
533
  mobileClassName: "pops-panel-is-mobile",
516
534
  isMobile: false,
517
535
  only: false,
518
- width: "700px",
519
- height: "500px",
536
+ width: window.innerWidth < 550 ? "88vw" : "700px",
537
+ height: window.innerHeight < 450 ? "70vh" : "500px",
520
538
  position: "center",
521
539
  animation: "pops-anim-fadein-zoom",
522
540
  zIndex: 10000,
@@ -2716,7 +2716,7 @@ export const PanelHandlerComponents = () => {
2716
2716
  createSectionContainerItem_deepMenu(formConfig: PopsPanelDeepMenuDetails) {
2717
2717
  let that = this;
2718
2718
  let $li = document.createElement("li");
2719
- $li.classList.add("pops-panel-deepMenu-nav-item");
2719
+ popsDOMUtils.addClassName($li, "pops-panel-deepMenu-nav-item");
2720
2720
  Reflect.set($li, "__formConfig__", formConfig);
2721
2721
  this.setElementClassName($li, formConfig.className);
2722
2722
  // 设置属性
@@ -161,10 +161,9 @@ section.pops-panel-container
161
161
  .pops-panel-forms-container-item
162
162
  ul
163
163
  li.pops-panel-deepMenu-nav-item {
164
- padding: var(--pops-panel-forms-container-li-padding-top-bottom)
165
- var(--pops-panel-forms-container-li-padding-left-right);
166
- margin: 0px;
167
- border-bottom: 0;
164
+ padding: var(--pops-panel-forms-container-li-padding-top-bottom) 0px;
165
+ margin: 0px var(--pops-panel-forms-container-li-padding-left-right);
166
+ border-bottom: 1px solid var(--pops-panel-forms-container-li-border-color);
168
167
  }
169
168
  section.pops-panel-container
170
169
  .pops-panel-forms-container-item
@@ -1176,6 +1175,7 @@ section.pops-panel-deepMenu-container
1176
1175
  .pops-panel-item-left-desc-text:has(code) {
1177
1176
  display: flex;
1178
1177
  align-items: baseline;
1178
+ flex-wrap: wrap;
1179
1179
  }
1180
1180
 
1181
1181
  @media (prefers-color-scheme: dark) {
@@ -68,8 +68,8 @@ export const PopsPromptConfig = (): DeepRequired<PopsPromptDetails> => {
68
68
  useShadowRoot: true,
69
69
  class: "",
70
70
  only: false,
71
- width: "350px",
72
- height: "200px",
71
+ width: window.innerWidth < 550 ? "88vw" : "350px",
72
+ height: window.innerHeight < 450 ? "70vh" : "200px",
73
73
  position: "center",
74
74
  animation: "pops-anim-fadein-zoom",
75
75
  zIndex: 10000,