@whitesev/pops 1.7.4 → 1.7.6
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 +104 -98
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +104 -98
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +104 -98
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +104 -98
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +104 -98
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +104 -98
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +1 -0
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/alert/index.css +13 -11
- package/src/components/confirm/index.css +13 -11
- package/src/components/drawer/config.ts +0 -4
- package/src/components/drawer/index.css +11 -7
- package/src/components/folder/index.css +20 -12
- package/src/components/iframe/config.ts +1 -1
- package/src/components/iframe/index.css +26 -11
- package/src/components/iframe/index.ts +93 -134
- package/src/components/loading/index.css +2 -1
- package/src/components/panel/index.css +33 -14
- package/src/components/prompt/index.css +13 -11
- package/src/components/rightClickMenu/index.css +2 -1
- package/src/css/button.css +1 -1
- package/src/css/common.css +15 -1
- package/src/css/index.css +7 -5
- package/src/utils/PopsInstanceUtils.ts +14 -10
|
@@ -23,26 +23,28 @@
|
|
|
23
23
|
text-overflow: ellipsis;
|
|
24
24
|
white-space: nowrap;
|
|
25
25
|
font-weight: 500;
|
|
26
|
-
line-height:
|
|
26
|
+
line-height: normal;
|
|
27
|
+
align-content: center;
|
|
27
28
|
}
|
|
28
29
|
.pops[type-value="panel"] .pops-panel-content {
|
|
29
30
|
width: 100%;
|
|
30
|
-
height: calc(
|
|
31
|
+
/*height: calc(
|
|
31
32
|
100% - var(--container-title-height) - var(--container-bottom-btn-height)
|
|
32
|
-
)
|
|
33
|
+
);*/
|
|
34
|
+
flex: 1;
|
|
33
35
|
overflow: auto;
|
|
34
36
|
word-break: break-word;
|
|
35
37
|
}
|
|
36
38
|
.pops[type-value="panel"] .pops-panel-btn {
|
|
37
|
-
position: absolute;
|
|
38
|
-
bottom: 0;
|
|
39
39
|
display: flex;
|
|
40
40
|
padding: 10px 10px 10px 10px;
|
|
41
41
|
width: 100%;
|
|
42
42
|
height: var(--container-bottom-btn-height);
|
|
43
|
+
max-height: var(--container-bottom-btn-height);
|
|
44
|
+
line-height: normal;
|
|
43
45
|
border-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
|
|
44
46
|
text-align: right;
|
|
45
|
-
|
|
47
|
+
align-content: center;
|
|
46
48
|
align-items: center;
|
|
47
49
|
}
|
|
48
50
|
|
|
@@ -226,9 +228,14 @@ section.pops-panel-container
|
|
|
226
228
|
align-items: center;
|
|
227
229
|
position: relative;
|
|
228
230
|
font-size: 14px;
|
|
229
|
-
line-height:
|
|
231
|
+
line-height: normal;
|
|
232
|
+
align-content: center;
|
|
230
233
|
height: 32px;
|
|
231
234
|
vertical-align: middle;
|
|
235
|
+
user-select: none;
|
|
236
|
+
-webkit-user-select: none;
|
|
237
|
+
-ms-user-select: none;
|
|
238
|
+
-moz-user-select: none;
|
|
232
239
|
}
|
|
233
240
|
.pops-panel-switch input.pops-panel-switch__input {
|
|
234
241
|
position: absolute;
|
|
@@ -287,7 +294,8 @@ section.pops-panel-container
|
|
|
287
294
|
section.pops-panel-container .pops-panel-slider:has(> input[type="range"]) {
|
|
288
295
|
overflow: hidden;
|
|
289
296
|
height: 25px;
|
|
290
|
-
line-height:
|
|
297
|
+
line-height: normal;
|
|
298
|
+
align-content: center;
|
|
291
299
|
display: flex;
|
|
292
300
|
align-items: center;
|
|
293
301
|
}
|
|
@@ -360,6 +368,10 @@ section.pops-panel-container
|
|
|
360
368
|
height: 32px;
|
|
361
369
|
display: flex;
|
|
362
370
|
align-items: center;
|
|
371
|
+
user-select: none;
|
|
372
|
+
-webkit-user-select: none;
|
|
373
|
+
-ms-user-select: none;
|
|
374
|
+
-moz-user-select: none;
|
|
363
375
|
}
|
|
364
376
|
|
|
365
377
|
.pops-slider-width {
|
|
@@ -575,7 +587,8 @@ section.pops-panel-container
|
|
|
575
587
|
display: inline-flex;
|
|
576
588
|
justify-content: center;
|
|
577
589
|
align-items: center;
|
|
578
|
-
line-height:
|
|
590
|
+
line-height: normal;
|
|
591
|
+
align-content: center;
|
|
579
592
|
height: 32px;
|
|
580
593
|
white-space: nowrap;
|
|
581
594
|
cursor: text;
|
|
@@ -622,7 +635,8 @@ section.pops-panel-container
|
|
|
622
635
|
}
|
|
623
636
|
.pops-panel-input .pops-panel-icon {
|
|
624
637
|
height: inherit;
|
|
625
|
-
line-height:
|
|
638
|
+
line-height: normal;
|
|
639
|
+
align-content: center;
|
|
626
640
|
display: flex;
|
|
627
641
|
justify-content: center;
|
|
628
642
|
align-items: center;
|
|
@@ -694,7 +708,8 @@ section.pops-panel-container
|
|
|
694
708
|
/* select的CSS */
|
|
695
709
|
.pops-panel-select select {
|
|
696
710
|
height: 32px;
|
|
697
|
-
line-height:
|
|
711
|
+
line-height: normal;
|
|
712
|
+
align-content: center;
|
|
698
713
|
min-width: 200px;
|
|
699
714
|
border: 1px solid rgb(184, 184, 184, var(--pops-bd-opacity));
|
|
700
715
|
border-radius: 5px;
|
|
@@ -751,7 +766,8 @@ section.pops-panel-container
|
|
|
751
766
|
padding: 4px 12px;
|
|
752
767
|
gap: 6px;
|
|
753
768
|
min-height: 32px;
|
|
754
|
-
line-height:
|
|
769
|
+
line-height: normal;
|
|
770
|
+
align-content: center;
|
|
755
771
|
border-radius: var(--el-border-radius-base);
|
|
756
772
|
background-color: var(--el-fill-color-blank);
|
|
757
773
|
transition: var(--el-transition-duration);
|
|
@@ -815,7 +831,8 @@ section.pops-panel-container
|
|
|
815
831
|
--color: inherit;
|
|
816
832
|
height: 1em;
|
|
817
833
|
width: 1em;
|
|
818
|
-
line-height:
|
|
834
|
+
line-height: normal;
|
|
835
|
+
align-content: center;
|
|
819
836
|
display: inline-flex;
|
|
820
837
|
justify-content: center;
|
|
821
838
|
align-items: center;
|
|
@@ -851,7 +868,8 @@ section.pops-panel-container
|
|
|
851
868
|
height: 24px;
|
|
852
869
|
padding: 0 9px;
|
|
853
870
|
font-size: var(--el-tag-font-size);
|
|
854
|
-
line-height:
|
|
871
|
+
line-height: normal;
|
|
872
|
+
align-content: center;
|
|
855
873
|
border-width: 1px;
|
|
856
874
|
border-style: solid;
|
|
857
875
|
border-radius: var(--el-tag-border-radius);
|
|
@@ -901,6 +919,7 @@ section.pops-panel-container
|
|
|
901
919
|
.pops-panel-select-multiple .el-select__tags-text {
|
|
902
920
|
display: block;
|
|
903
921
|
line-height: normal;
|
|
922
|
+
align-content: center;
|
|
904
923
|
overflow: hidden;
|
|
905
924
|
text-overflow: ellipsis;
|
|
906
925
|
white-space: nowrap;
|
|
@@ -16,31 +16,33 @@
|
|
|
16
16
|
text-overflow: ellipsis;
|
|
17
17
|
white-space: nowrap;
|
|
18
18
|
font-weight: 500;
|
|
19
|
-
line-height:
|
|
20
|
-
|
|
21
|
-
.pops[type-value="prompt"] .pops-prompt-content p[pops] {
|
|
22
|
-
padding: 5px 10px;
|
|
23
|
-
color: rgb(51, 51, 51);
|
|
24
|
-
text-indent: 15px;
|
|
19
|
+
line-height: normal;
|
|
20
|
+
align-content: center;
|
|
25
21
|
}
|
|
26
22
|
.pops[type-value="prompt"] .pops-prompt-content {
|
|
27
23
|
width: 100%;
|
|
28
|
-
height: calc(
|
|
24
|
+
/*height: calc(
|
|
29
25
|
100% - var(--container-title-height) - var(--container-bottom-btn-height)
|
|
30
|
-
)
|
|
26
|
+
);*/
|
|
27
|
+
flex: 1;
|
|
31
28
|
overflow: auto;
|
|
32
29
|
word-break: break-word;
|
|
33
30
|
}
|
|
31
|
+
.pops[type-value="prompt"] .pops-prompt-content p[pops] {
|
|
32
|
+
padding: 5px 10px;
|
|
33
|
+
color: rgb(51, 51, 51);
|
|
34
|
+
text-indent: 15px;
|
|
35
|
+
}
|
|
34
36
|
.pops[type-value="prompt"] .pops-prompt-btn {
|
|
35
|
-
position: absolute;
|
|
36
|
-
bottom: 0;
|
|
37
37
|
display: flex;
|
|
38
38
|
padding: 10px 10px 10px 10px;
|
|
39
39
|
width: 100%;
|
|
40
40
|
height: var(--container-bottom-btn-height);
|
|
41
|
+
max-height: var(--container-bottom-btn-height);
|
|
42
|
+
line-height: normal;
|
|
43
|
+
align-content: center;
|
|
41
44
|
border-top: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
|
|
42
45
|
text-align: right;
|
|
43
|
-
line-height: var(--container-bottom-btn-height);
|
|
44
46
|
align-items: center;
|
|
45
47
|
}
|
|
46
48
|
.pops[type-value="prompt"] input[pops] {
|
package/src/css/button.css
CHANGED
package/src/css/common.css
CHANGED
|
@@ -20,5 +20,19 @@
|
|
|
20
20
|
border: 0;
|
|
21
21
|
}
|
|
22
22
|
.pops-no-border-important {
|
|
23
|
-
border: 0;
|
|
23
|
+
border: 0 !important;
|
|
24
|
+
}
|
|
25
|
+
.pops-user-select-none {
|
|
26
|
+
user-select: none;
|
|
27
|
+
-webkit-user-select: none;
|
|
28
|
+
-ms-user-select: none;
|
|
29
|
+
-moz-user-select: none;
|
|
30
|
+
}
|
|
31
|
+
.pops-line-height-center {
|
|
32
|
+
line-height: normal;
|
|
33
|
+
align-content: center;
|
|
34
|
+
}
|
|
35
|
+
.pops-width-fill {
|
|
36
|
+
width: -webkit-fill-available;
|
|
37
|
+
width: -moz-available;
|
|
24
38
|
}
|
package/src/css/index.css
CHANGED
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
box-sizing: border-box;
|
|
26
26
|
overflow: hidden;
|
|
27
27
|
transition: all 0.35s;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
28
30
|
}
|
|
29
31
|
.pops-anim {
|
|
30
32
|
position: fixed;
|
|
@@ -51,7 +53,7 @@
|
|
|
51
53
|
.pops i.pops-bottom-icon {
|
|
52
54
|
height: 1em;
|
|
53
55
|
width: 1em;
|
|
54
|
-
line-height:
|
|
56
|
+
line-height: normal;
|
|
55
57
|
display: inline-flex;
|
|
56
58
|
justify-content: center;
|
|
57
59
|
align-items: center;
|
|
@@ -90,9 +92,6 @@
|
|
|
90
92
|
.pops-header-controls button.pops-header-control[type="max"],
|
|
91
93
|
.pops-header-controls button.pops-header-control[type="mise"],
|
|
92
94
|
.pops-header-controls button.pops-header-control[type="min"] {
|
|
93
|
-
position: relative;
|
|
94
|
-
float: right;
|
|
95
|
-
margin: 0 2px;
|
|
96
95
|
outline: 0 !important;
|
|
97
96
|
border: 0;
|
|
98
97
|
border-color: rgb(136, 136, 136, var(--pops-bd-opacity));
|
|
@@ -122,16 +121,19 @@ button.pops-header-control {
|
|
|
122
121
|
background: 0 0;
|
|
123
122
|
cursor: pointer;
|
|
124
123
|
position: unset;
|
|
125
|
-
line-height:
|
|
124
|
+
line-height: normal;
|
|
126
125
|
}
|
|
127
126
|
button.pops-header-control i:hover {
|
|
128
127
|
color: rgb(64, 158, 255);
|
|
129
128
|
}
|
|
130
129
|
.pops-header-controls[data-margin] button.pops-header-control {
|
|
131
130
|
margin: 0 6px;
|
|
131
|
+
display: flex;
|
|
132
|
+
align-items: center;
|
|
132
133
|
}
|
|
133
134
|
.pops[type-value] .pops-header-controls {
|
|
134
135
|
display: flex;
|
|
136
|
+
gap: 6px;
|
|
135
137
|
}
|
|
136
138
|
|
|
137
139
|
/* 标题禁止选中文字 */
|
|
@@ -489,6 +489,7 @@ export const PopsInstanceUtils = {
|
|
|
489
489
|
options: {
|
|
490
490
|
dragElement: HTMLElement;
|
|
491
491
|
limit: boolean;
|
|
492
|
+
triggerClick?: boolean;
|
|
492
493
|
extraDistance: number;
|
|
493
494
|
container?: Window | typeof globalThis | HTMLElement;
|
|
494
495
|
moveCallBack?: (
|
|
@@ -509,6 +510,7 @@ export const PopsInstanceUtils = {
|
|
|
509
510
|
limit: true,
|
|
510
511
|
extraDistance: 3,
|
|
511
512
|
container: PopsCore.globalThis,
|
|
513
|
+
triggerClick: true,
|
|
512
514
|
},
|
|
513
515
|
options
|
|
514
516
|
);
|
|
@@ -712,17 +714,19 @@ export const PopsInstanceUtils = {
|
|
|
712
714
|
}
|
|
713
715
|
}
|
|
714
716
|
});
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
717
|
+
if (options.triggerClick) {
|
|
718
|
+
/* 因为会覆盖上面的点击事件,主动触发一下 */
|
|
719
|
+
anyTouchElement.on(["tap"], function (event) {
|
|
720
|
+
event.changedPoints.forEach((item) => {
|
|
721
|
+
popsDOMUtils.trigger(
|
|
722
|
+
item.target! as HTMLElement,
|
|
723
|
+
"click",
|
|
724
|
+
void 0,
|
|
725
|
+
true
|
|
726
|
+
);
|
|
727
|
+
});
|
|
724
728
|
});
|
|
725
|
-
}
|
|
729
|
+
}
|
|
726
730
|
},
|
|
727
731
|
/**
|
|
728
732
|
* 排序数组
|