@whitesev/pops 3.0.1 → 3.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.amd.js +901 -494
- package/dist/index.amd.js.map +1 -1
- package/dist/index.amd.min.js +1 -1
- package/dist/index.amd.min.js.map +1 -1
- package/dist/index.cjs.js +901 -494
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +901 -494
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +901 -494
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.system.js +901 -494
- package/dist/index.system.js.map +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/dist/index.umd.js +901 -494
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/Pops.d.ts +69 -29
- package/dist/types/src/components/panel/handlerComponents.d.ts +202 -55
- package/dist/types/src/components/panel/index.d.ts +1 -1
- package/dist/types/src/components/panel/types/components-select.d.ts +42 -5
- package/package.json +3 -3
- package/src/components/panel/defaultConfig.ts +278 -228
- package/src/components/panel/handlerComponents.ts +551 -197
- package/src/components/panel/index.css +67 -12
- package/src/components/panel/types/components-select.ts +42 -5
- package/src/components/rightClickMenu/index.css +1 -1
- package/src/css/common.css +4 -4
|
@@ -278,13 +278,17 @@ section.pops-panel-container .pops-panel-forms-fold .pops-panel-forms-container-
|
|
|
278
278
|
.pops[type-value="panel"] section.pops-panel-container > ul > li div:nth-child(2) {
|
|
279
279
|
max-width: 55%;
|
|
280
280
|
}
|
|
281
|
+
.pops[type-value="panel"] .pops-panel-select .el-select__selected-item.el-select__placeholder {
|
|
282
|
+
max-width: -moz-available;
|
|
283
|
+
max-width: -webkit-fill-available;
|
|
284
|
+
}
|
|
281
285
|
.pops[type-value="panel"] section.pops-panel-container > ul > li .pops-panel-input span.pops-panel-input__suffix {
|
|
282
286
|
padding: 0 4px;
|
|
283
287
|
}
|
|
284
288
|
.pops[type-value="panel"] section.pops-panel-container .pops-panel-select select {
|
|
285
289
|
min-width: 88px !important;
|
|
286
|
-
width: -webkit-fill-available;
|
|
287
290
|
width: -moz-available;
|
|
291
|
+
width: -webkit-fill-available;
|
|
288
292
|
}
|
|
289
293
|
.pops[type-value="panel"] section.pops-panel-container .pops-panel-container-header-ul li {
|
|
290
294
|
font-size: 16px;
|
|
@@ -750,8 +754,8 @@ section.pops-panel-container .pops-panel-slider input[type="range"]::-moz-range-
|
|
|
750
754
|
flex-shrink: 0;
|
|
751
755
|
flex-wrap: nowrap;
|
|
752
756
|
height: 100%;
|
|
753
|
-
height: -webkit-fill-available;
|
|
754
757
|
height: -moz-available;
|
|
758
|
+
height: -webkit-fill-available;
|
|
755
759
|
text-align: center;
|
|
756
760
|
color: var(--pops-panel-components-input-suffix-color);
|
|
757
761
|
background: var(--pops-panel-components-input-suffix-bg-color);
|
|
@@ -893,6 +897,7 @@ section.pops-panel-container .pops-panel-slider input[type="range"]::-moz-range-
|
|
|
893
897
|
|
|
894
898
|
/* select的CSS */
|
|
895
899
|
.pops-panel-select {
|
|
900
|
+
--pops-panel-components-select-disabled-text-color: #a8abb2;
|
|
896
901
|
--pops-panel-components-select-text-color: #000000;
|
|
897
902
|
--pops-panel-components-select-bd-color: rgb(184, 184, 184, var(--pops-bd-opacity));
|
|
898
903
|
--pops-panel-components-select-hover-bd-color: rgb(184, 184, 184, var(--pops-bd-opacity));
|
|
@@ -934,10 +939,60 @@ section.pops-panel-container .pops-panel-slider input[type="range"]::-moz-range-
|
|
|
934
939
|
}
|
|
935
940
|
/* select的CSS */
|
|
936
941
|
|
|
937
|
-
/* select
|
|
938
|
-
.pops-panel-select {
|
|
942
|
+
/* select dialog 的CSS */
|
|
943
|
+
.pops-panel-select[data-mode="dialog"] {
|
|
939
944
|
}
|
|
940
|
-
/* select
|
|
945
|
+
/* select dialog 的CSS */
|
|
946
|
+
|
|
947
|
+
/* select horizontal 的CSS */
|
|
948
|
+
.pops-panel-select[data-mode="horizontal"] {
|
|
949
|
+
--pops-panel-components-select-horizontal-selected-text-color: #626aef;
|
|
950
|
+
--pops-panel-components-select-horizontal-selected-bg-color: #eff0fd;
|
|
951
|
+
}
|
|
952
|
+
.pops-panel-select[data-mode="horizontal"] .el-select__wrapper {
|
|
953
|
+
padding: 0;
|
|
954
|
+
gap: 0;
|
|
955
|
+
border: 0;
|
|
956
|
+
}
|
|
957
|
+
.pops-panel-select[data-mode="horizontal"] .select-item {
|
|
958
|
+
flex: 1;
|
|
959
|
+
display: flex;
|
|
960
|
+
justify-content: center;
|
|
961
|
+
align-items: center;
|
|
962
|
+
border: 1px solid var(--el-border-color);
|
|
963
|
+
height: -moz-available;
|
|
964
|
+
height: -webkit-fill-available;
|
|
965
|
+
border-left: 0;
|
|
966
|
+
}
|
|
967
|
+
.pops-panel-select[data-mode="horizontal"] .select-item:hover {
|
|
968
|
+
color: var(--el-color-primary);
|
|
969
|
+
}
|
|
970
|
+
.pops-panel-select[data-mode="horizontal"] .select-item:first-child {
|
|
971
|
+
border-left: 1px solid var(--el-border-color);
|
|
972
|
+
border-top-left-radius: var(--el-border-radius-base);
|
|
973
|
+
border-bottom-left-radius: var(--el-border-radius-base);
|
|
974
|
+
}
|
|
975
|
+
.pops-panel-select[data-mode="horizontal"] .select-item:last-child {
|
|
976
|
+
border-top-right-radius: var(--el-border-radius-base);
|
|
977
|
+
border-bottom-right-radius: var(--el-border-radius-base);
|
|
978
|
+
}
|
|
979
|
+
.pops-panel-select[data-mode="horizontal"] .select-item.select__selected-item {
|
|
980
|
+
color: var(--pops-panel-components-select-horizontal-selected-text-color);
|
|
981
|
+
background-color: var(--pops-panel-components-select-horizontal-selected-bg-color);
|
|
982
|
+
border-color: var(--pops-panel-components-select-horizontal-selected-bg-color);
|
|
983
|
+
}
|
|
984
|
+
.pops-panel-select[data-mode="horizontal"] .select-item:has(+ .select__selected-item) {
|
|
985
|
+
border-right: 0;
|
|
986
|
+
}
|
|
987
|
+
.pops-panel-select[data-mode="horizontal"] .select-item[disabled] {
|
|
988
|
+
color: var(--pops-panel-components-select-disabled-text-color);
|
|
989
|
+
--pops-panel-components-select-horizontal-selected-text-color: var(
|
|
990
|
+
--pops-panel-components-select-disabled-text-color
|
|
991
|
+
);
|
|
992
|
+
cursor: not-allowed;
|
|
993
|
+
background: unset;
|
|
994
|
+
}
|
|
995
|
+
/* select horizontal 的CSS */
|
|
941
996
|
|
|
942
997
|
/* select-multiple的CSS*/
|
|
943
998
|
.pops-panel-select-multiple,
|
|
@@ -1165,19 +1220,19 @@ section.pops-panel-container .pops-panel-slider input[type="range"]::-moz-range-
|
|
|
1165
1220
|
white-space: nowrap;
|
|
1166
1221
|
}
|
|
1167
1222
|
/* 禁用样式 */
|
|
1168
|
-
.pops-panel-select-
|
|
1223
|
+
.pops-panel-select-disable {
|
|
1169
1224
|
--el-fill-color-blank: #f5f7fa;
|
|
1170
1225
|
--color: #a8abb2;
|
|
1171
1226
|
--el-border-color: #cbcbcb;
|
|
1172
1227
|
}
|
|
1173
|
-
.pops-panel-select-
|
|
1228
|
+
.pops-panel-select-disable .el-tag.el-tag--info {
|
|
1174
1229
|
--el-tag-bg-color: #e7e7e7;
|
|
1175
1230
|
--el-tag-text-color: var(--pops-components-is-disabled-text-color);
|
|
1176
1231
|
}
|
|
1177
|
-
.pops-panel-select-
|
|
1178
|
-
.pops-panel-select-
|
|
1179
|
-
.pops-panel-select-
|
|
1180
|
-
.pops-panel-select-
|
|
1232
|
+
.pops-panel-select-disable .el-select__selection .el-tag,
|
|
1233
|
+
.pops-panel-select-disable .el-tag .el-tag__close:hover,
|
|
1234
|
+
.pops-panel-select-disable .el-select__wrapper,
|
|
1235
|
+
.pops-panel-select-disable .el-select__caret {
|
|
1181
1236
|
cursor: not-allowed;
|
|
1182
1237
|
}
|
|
1183
1238
|
/* select-multiple的CSS*/
|
|
@@ -1226,8 +1281,8 @@ section.pops-panel-container .pops-panel-forms-container-item ul li.pops-panel-d
|
|
|
1226
1281
|
section.pops-panel-deepMenu-container .pops-panel-container-header-ul li.pops-panel-deepMenu-container-header {
|
|
1227
1282
|
display: flex;
|
|
1228
1283
|
align-items: center;
|
|
1229
|
-
width: -webkit-fill-available;
|
|
1230
1284
|
width: -moz-available;
|
|
1285
|
+
width: -webkit-fill-available;
|
|
1231
1286
|
padding: var(--pops-panel-forms-header-padding-top-bottom)
|
|
1232
1287
|
calc(
|
|
1233
1288
|
var(--pops-panel-forms-margin-left-right) + var(--pops-panel-forms-container-li-padding-left-right) -
|
|
@@ -2,8 +2,38 @@ import type { PopsPanelGeneralConfig } from "./components-common";
|
|
|
2
2
|
import type { PopsPanelContainerConfig } from "./components-container";
|
|
3
3
|
import type { PopsPanelViewConfig } from ".";
|
|
4
4
|
import type { PopsAlertConfig } from "../../alert/types";
|
|
5
|
+
export type PopsPanelSelectMode = "native" | "dialog" | "horizontal";
|
|
5
6
|
|
|
6
|
-
|
|
7
|
+
/**
|
|
8
|
+
* 分组配置
|
|
9
|
+
*
|
|
10
|
+
* 用在mode="dialog"里
|
|
11
|
+
*/
|
|
12
|
+
export type PopsPanelSelectDialogGroupOption<T> = {
|
|
13
|
+
/**
|
|
14
|
+
* 是否是分组
|
|
15
|
+
* @default false
|
|
16
|
+
*
|
|
17
|
+
* + true 这时候text的值是显示的分组名,value是可以忽略的
|
|
18
|
+
*/
|
|
19
|
+
isGroup?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* 分组内部选择是否是单选
|
|
22
|
+
* @default false
|
|
23
|
+
*/
|
|
24
|
+
isSingleSelect?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* 分组数据列表
|
|
27
|
+
*
|
|
28
|
+
* 该数据仅在mode === "dialog"下生效
|
|
29
|
+
* @default []
|
|
30
|
+
*/
|
|
31
|
+
groupDataOptions?: IFunction<Omit<PopsPanelSelectDataOption<T>, keyof PopsPanelSelectDialogGroupOption<T>>[]>;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* 选择项的配置数据
|
|
35
|
+
*/
|
|
36
|
+
export type PopsPanelSelectDataOption<T> = {
|
|
7
37
|
/**
|
|
8
38
|
* 真正的值
|
|
9
39
|
*/
|
|
@@ -63,7 +93,7 @@ export interface PopsPanelSelectDataOption<T> {
|
|
|
63
93
|
valid: boolean;
|
|
64
94
|
message?: string;
|
|
65
95
|
};
|
|
66
|
-
}
|
|
96
|
+
};
|
|
67
97
|
/**
|
|
68
98
|
* pops.panel的 select
|
|
69
99
|
*/
|
|
@@ -110,6 +140,8 @@ export interface PopsPanelSelectConfig<T = any> extends PopsPanelGeneralConfig<P
|
|
|
110
140
|
* 点击select元素触发该回调
|
|
111
141
|
* @param event 点击事件
|
|
112
142
|
* @param selectElement 当前的select元素
|
|
143
|
+
* @returns
|
|
144
|
+
* + false 阻止更新状态
|
|
113
145
|
*/
|
|
114
146
|
clickCallBack?(
|
|
115
147
|
event: PointerEvent | MouseEvent,
|
|
@@ -121,10 +153,15 @@ export interface PopsPanelSelectConfig<T = any> extends PopsPanelGeneralConfig<P
|
|
|
121
153
|
*/
|
|
122
154
|
data: IFunction<PopsPanelSelectDataOption<T>[]>;
|
|
123
155
|
/**
|
|
124
|
-
*
|
|
125
|
-
* @default
|
|
156
|
+
* 显示模式
|
|
157
|
+
* @default "native"
|
|
158
|
+
*/
|
|
159
|
+
mode?: PopsPanelSelectMode;
|
|
160
|
+
/**
|
|
161
|
+
* 宽度
|
|
162
|
+
* @default "200px"
|
|
126
163
|
*/
|
|
127
|
-
|
|
164
|
+
width?: number | string;
|
|
128
165
|
/**
|
|
129
166
|
* 弹出的下拉列表弹窗的配置
|
|
130
167
|
*/
|
|
@@ -93,8 +93,8 @@ i.pops-rightClickMenu-icon[is-loading="true"] {
|
|
|
93
93
|
margin: 5px 5px;
|
|
94
94
|
border-radius: var(--pops-right-context-menu-row-bd-radius);
|
|
95
95
|
display: flex;
|
|
96
|
-
width: -webkit-fill-available;
|
|
97
96
|
width: -moz-available;
|
|
97
|
+
width: -webkit-fill-available;
|
|
98
98
|
text-align: left;
|
|
99
99
|
align-items: center;
|
|
100
100
|
-webkit-user-select: none;
|
package/src/css/common.css
CHANGED
|
@@ -34,21 +34,21 @@
|
|
|
34
34
|
}
|
|
35
35
|
.pops-width-fill {
|
|
36
36
|
width: 100%;
|
|
37
|
-
width: -webkit-fill-available;
|
|
38
37
|
width: -moz-available;
|
|
38
|
+
width: -webkit-fill-available;
|
|
39
39
|
}
|
|
40
40
|
.pops-height-fill {
|
|
41
41
|
height: 100%;
|
|
42
|
-
height: -webkit-fill-available;
|
|
43
42
|
height: -moz-available;
|
|
43
|
+
height: -webkit-fill-available;
|
|
44
44
|
}
|
|
45
45
|
.pops-text-is-disabled {
|
|
46
46
|
--pops-text-is-disabled-color: #a8abb2;
|
|
47
|
-
color: var(--pops-text-is-disabled-color);
|
|
48
47
|
--pops-panel-forms-container-item-left-desc-text-color: var(--pops-text-is-disabled-color);
|
|
48
|
+
color: var(--pops-text-is-disabled-color);
|
|
49
49
|
}
|
|
50
50
|
.pops-text-is-disabled-important {
|
|
51
51
|
--pops-text-is-disabled-color: #a8abb2;
|
|
52
|
-
color: var(--pops-text-is-disabled-color) !important;
|
|
53
52
|
--pops-panel-forms-container-item-left-desc-text-color: var(--pops-text-is-disabled-color) !important;
|
|
53
|
+
color: var(--pops-text-is-disabled-color) !important;
|
|
54
54
|
}
|