@whitesev/pops 2.2.3 → 2.2.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 +143 -49
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +143 -49
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +143 -49
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +143 -49
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +143 -49
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +143 -49
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +10 -10
- package/dist/types/src/PopsIcon.d.ts +2 -2
- package/dist/types/src/components/panel/types/components-selectMultiple.d.ts +1 -1
- package/dist/types/src/components/rightClickMenu/index.d.ts +2 -2
- package/dist/types/src/components/tooltip/index.d.ts +2 -2
- package/dist/types/src/config/CommonCSSClassName.d.ts +17 -0
- package/dist/types/src/{GlobalConfig.d.ts → config/GlobalConfig.d.ts} +4 -4
- package/dist/types/src/utils/PopsDOMUtils.d.ts +3 -3
- package/package.json +1 -1
- package/src/Pops.ts +2 -2
- package/src/components/alert/index.ts +1 -1
- package/src/components/confirm/index.ts +1 -1
- package/src/components/drawer/index.ts +1 -1
- package/src/components/folder/index.ts +1 -1
- package/src/components/iframe/index.ts +1 -1
- package/src/components/loading/index.ts +1 -1
- package/src/components/panel/config.ts +17 -1
- package/src/components/panel/handlerComponents.ts +200 -40
- package/src/components/panel/index.css +79 -23
- package/src/components/panel/index.ts +1 -1
- package/src/components/panel/types/components-selectMultiple.ts +1 -1
- package/src/components/prompt/index.ts +1 -1
- package/src/components/rightClickMenu/index.ts +1 -1
- package/src/components/searchSuggestion/index.ts +7 -3
- package/src/components/tooltip/index.ts +1 -1
- package/src/config/CommonCSSClassName.ts +17 -0
- package/src/{GlobalConfig.ts → config/GlobalConfig.ts} +1 -1
- package/src/css/common.css +14 -0
- package/src/css/index.css +7 -8
- package/src/utils/PopsDOMUtils.ts +22 -9
|
@@ -27,6 +27,7 @@ import type { PopsPanelSelectDetails } from "./types/components-select";
|
|
|
27
27
|
import type { PopsPanelSliderDetails } from "./types/components-slider";
|
|
28
28
|
import type { PopsPanelSwitchDetails } from "./types/components-switch";
|
|
29
29
|
import type { PopsPanelTextAreaDetails } from "./types/components-textarea";
|
|
30
|
+
import { PopsCommonCSSClassName } from "../../config/CommonCSSClassName";
|
|
30
31
|
|
|
31
32
|
/**
|
|
32
33
|
* 处理组件(把组件配置转为组件元素)
|
|
@@ -316,6 +317,9 @@ export const PanelHandlerComponents = () => {
|
|
|
316
317
|
value: Boolean(formConfig.getValue()),
|
|
317
318
|
},
|
|
318
319
|
$ele: {
|
|
320
|
+
itemLeftTextContainer: $li.querySelector<HTMLElement>(
|
|
321
|
+
".pops-panel-item-left-text"
|
|
322
|
+
),
|
|
319
323
|
switch: $li.querySelector<HTMLDivElement>(".pops-panel-switch")!,
|
|
320
324
|
input: $li.querySelector<HTMLInputElement>(
|
|
321
325
|
".pops-panel-switch__input"
|
|
@@ -333,9 +337,12 @@ export const PanelHandlerComponents = () => {
|
|
|
333
337
|
}
|
|
334
338
|
this.setClickEvent();
|
|
335
339
|
},
|
|
340
|
+
/**
|
|
341
|
+
* 设置点击事件
|
|
342
|
+
*/
|
|
336
343
|
setClickEvent() {
|
|
337
344
|
let that = this;
|
|
338
|
-
popsDOMUtils.on(this.$ele.core, "click",
|
|
345
|
+
popsDOMUtils.on(this.$ele.core, "click", function (event) {
|
|
339
346
|
if (
|
|
340
347
|
that.$ele.input.disabled ||
|
|
341
348
|
that.$ele.switch.hasAttribute("data-disabled")
|
|
@@ -388,13 +395,21 @@ export const PanelHandlerComponents = () => {
|
|
|
388
395
|
disable() {
|
|
389
396
|
this.$ele.input.disabled = true;
|
|
390
397
|
this.$ele.switch.setAttribute("data-disabled", "true");
|
|
398
|
+
popsDOMUtils.addClassName(
|
|
399
|
+
this.$ele.itemLeftTextContainer,
|
|
400
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
401
|
+
);
|
|
391
402
|
},
|
|
392
403
|
/**
|
|
393
|
-
*
|
|
404
|
+
* 取消禁用复选框
|
|
394
405
|
*/
|
|
395
406
|
notDisable() {
|
|
396
407
|
this.$ele.input.disabled = false;
|
|
397
408
|
this.$ele.switch.removeAttribute("data-disabled");
|
|
409
|
+
popsDOMUtils.removeClassName(
|
|
410
|
+
this.$ele.itemLeftTextContainer,
|
|
411
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
412
|
+
);
|
|
398
413
|
},
|
|
399
414
|
};
|
|
400
415
|
|
|
@@ -575,6 +590,9 @@ export const PanelHandlerComponents = () => {
|
|
|
575
590
|
tooltip: null as any as ReturnType<typeof PopsTooltip.init>,
|
|
576
591
|
},
|
|
577
592
|
$ele: {
|
|
593
|
+
itemLeftTextContainer: $li.querySelector<HTMLElement>(
|
|
594
|
+
".pops-panel-item-left-text"
|
|
595
|
+
),
|
|
578
596
|
slider: $li.querySelector<HTMLElement>(".pops-slider")!,
|
|
579
597
|
runAway: $li.querySelector<HTMLElement>(".pops-slider__runway")!,
|
|
580
598
|
bar: $li.querySelector<HTMLElement>(".pops-slider__bar")!,
|
|
@@ -840,19 +858,34 @@ export const PanelHandlerComponents = () => {
|
|
|
840
858
|
* 禁止拖拽
|
|
841
859
|
*/
|
|
842
860
|
disableDrag() {
|
|
843
|
-
|
|
861
|
+
popsDOMUtils.addClassName(
|
|
862
|
+
this.$ele.runAway,
|
|
863
|
+
"pops-slider-is-disabled"
|
|
864
|
+
);
|
|
865
|
+
popsDOMUtils.addClassName(
|
|
866
|
+
this.$ele.runAway,
|
|
867
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
868
|
+
);
|
|
844
869
|
},
|
|
845
870
|
/**
|
|
846
871
|
* 允许拖拽
|
|
847
872
|
*/
|
|
848
873
|
allowDrag() {
|
|
849
|
-
|
|
874
|
+
popsDOMUtils.removeClassName(
|
|
875
|
+
this.$ele.runAway,
|
|
876
|
+
"pops-slider-is-disabled"
|
|
877
|
+
);
|
|
878
|
+
popsDOMUtils.removeClassName(
|
|
879
|
+
this.$ele.runAway,
|
|
880
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
881
|
+
);
|
|
850
882
|
},
|
|
851
883
|
/**
|
|
852
884
|
* 判断当前滑块是否被禁用
|
|
853
885
|
*/
|
|
854
886
|
isDisabledDrag() {
|
|
855
|
-
return
|
|
887
|
+
return popsDOMUtils.containsClassName(
|
|
888
|
+
this.$ele.runAway,
|
|
856
889
|
"pops-slider-is-disabled"
|
|
857
890
|
);
|
|
858
891
|
},
|
|
@@ -860,14 +893,11 @@ export const PanelHandlerComponents = () => {
|
|
|
860
893
|
* 判断当前滑块是否被禁用(配置中判断)
|
|
861
894
|
*/
|
|
862
895
|
isFormConfigDisabledDrag() {
|
|
863
|
-
|
|
864
|
-
typeof formConfig.disabled === "function"
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
typeof formConfig.disabled === "function"
|
|
869
|
-
? formConfig.disabled()
|
|
870
|
-
: formConfig.disabled;
|
|
896
|
+
let isDisabled =
|
|
897
|
+
typeof formConfig.disabled === "function"
|
|
898
|
+
? formConfig.disabled()
|
|
899
|
+
: formConfig.disabled;
|
|
900
|
+
if (typeof isDisabled === "boolean") {
|
|
871
901
|
return isDisabled;
|
|
872
902
|
} else {
|
|
873
903
|
return false;
|
|
@@ -880,7 +910,6 @@ export const PanelHandlerComponents = () => {
|
|
|
880
910
|
popsDOMUtils.on<PointerEvent | MouseEvent>(
|
|
881
911
|
this.$ele.runAway,
|
|
882
912
|
"click",
|
|
883
|
-
void 0,
|
|
884
913
|
(event) => {
|
|
885
914
|
if (
|
|
886
915
|
event.target !== this.$ele.runAway &&
|
|
@@ -889,7 +918,10 @@ export const PanelHandlerComponents = () => {
|
|
|
889
918
|
return;
|
|
890
919
|
}
|
|
891
920
|
let clickX = parseFloat(event.offsetX.toString());
|
|
892
|
-
this.dragStartCallBack();
|
|
921
|
+
let dragStartResult = this.dragStartCallBack();
|
|
922
|
+
if (!dragStartResult) {
|
|
923
|
+
return;
|
|
924
|
+
}
|
|
893
925
|
this.dragMoveCallBack(event, clickX, this.value);
|
|
894
926
|
this.dragEndCallBack(clickX);
|
|
895
927
|
},
|
|
@@ -902,17 +934,18 @@ export const PanelHandlerComponents = () => {
|
|
|
902
934
|
* 拖拽开始的回调,如果返回false,禁止拖拽
|
|
903
935
|
*/
|
|
904
936
|
dragStartCallBack() {
|
|
937
|
+
if (this.isFormConfigDisabledDrag()) {
|
|
938
|
+
// 禁止
|
|
939
|
+
this.disableDrag();
|
|
940
|
+
return false;
|
|
941
|
+
}
|
|
905
942
|
if (!this.$data.isMove) {
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
this.disableDrag();
|
|
909
|
-
return false;
|
|
910
|
-
} else {
|
|
943
|
+
// 非移动中
|
|
944
|
+
if (this.isDisabledDrag()) {
|
|
911
945
|
// 允许
|
|
912
|
-
|
|
913
|
-
this.allowDrag();
|
|
914
|
-
}
|
|
946
|
+
this.allowDrag();
|
|
915
947
|
}
|
|
948
|
+
|
|
916
949
|
this.$data.isMove = true;
|
|
917
950
|
}
|
|
918
951
|
return true;
|
|
@@ -1116,7 +1149,7 @@ export const PanelHandlerComponents = () => {
|
|
|
1116
1149
|
<p class="pops-panel-item-left-main-text">${
|
|
1117
1150
|
formConfig.text
|
|
1118
1151
|
}</p>${leftDescriptionText}</div>
|
|
1119
|
-
<div class="pops-panel-input
|
|
1152
|
+
<div class="pops-panel-input">
|
|
1120
1153
|
<input type="${inputType}" placeholder="${formConfig.placeholder ?? ""}">
|
|
1121
1154
|
</div>
|
|
1122
1155
|
`
|
|
@@ -1124,6 +1157,9 @@ export const PanelHandlerComponents = () => {
|
|
|
1124
1157
|
const PopsPanelInput = {
|
|
1125
1158
|
[Symbol.toStringTag]: "PopsPanelInput",
|
|
1126
1159
|
$ele: {
|
|
1160
|
+
itemLeftTextContainer: $li.querySelector<HTMLElement>(
|
|
1161
|
+
".pops-panel-item-left-text"
|
|
1162
|
+
),
|
|
1127
1163
|
panelInput: $li.querySelector<HTMLDivElement>(".pops-panel-input")!,
|
|
1128
1164
|
input: $li.querySelector<HTMLInputElement>("input")!,
|
|
1129
1165
|
inputSpanIcon: document.createElement("span"),
|
|
@@ -1187,20 +1223,38 @@ export const PanelHandlerComponents = () => {
|
|
|
1187
1223
|
this.$ele.inputSpanIcon.querySelector<HTMLElement>(
|
|
1188
1224
|
".pops-panel-icon"
|
|
1189
1225
|
)!;
|
|
1226
|
+
popsDOMUtils.addClassName(
|
|
1227
|
+
this.$ele.panelInput,
|
|
1228
|
+
PopsCommonCSSClassName.userSelectNone
|
|
1229
|
+
);
|
|
1190
1230
|
},
|
|
1191
1231
|
/**
|
|
1192
1232
|
* 禁用
|
|
1193
1233
|
*/
|
|
1194
1234
|
disable() {
|
|
1195
1235
|
this.$ele.input.disabled = true;
|
|
1196
|
-
|
|
1236
|
+
popsDOMUtils.addClassName(
|
|
1237
|
+
this.$ele.panelInput,
|
|
1238
|
+
"pops-input-disabled"
|
|
1239
|
+
);
|
|
1240
|
+
popsDOMUtils.addClassName(
|
|
1241
|
+
this.$ele.itemLeftTextContainer,
|
|
1242
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
1243
|
+
);
|
|
1197
1244
|
},
|
|
1198
1245
|
/**
|
|
1199
1246
|
* 取消禁用
|
|
1200
1247
|
*/
|
|
1201
1248
|
notDisable() {
|
|
1202
1249
|
this.$ele.input.disabled = false;
|
|
1203
|
-
|
|
1250
|
+
popsDOMUtils.removeClassName(
|
|
1251
|
+
this.$ele.panelInput,
|
|
1252
|
+
"pops-input-disabled"
|
|
1253
|
+
);
|
|
1254
|
+
popsDOMUtils.removeClassName(
|
|
1255
|
+
this.$ele.itemLeftTextContainer,
|
|
1256
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
1257
|
+
);
|
|
1204
1258
|
},
|
|
1205
1259
|
/**
|
|
1206
1260
|
* 判断是否已被禁用
|
|
@@ -1346,6 +1400,9 @@ export const PanelHandlerComponents = () => {
|
|
|
1346
1400
|
const PopsPanelTextArea = {
|
|
1347
1401
|
[Symbol.toStringTag]: "PopsPanelTextArea",
|
|
1348
1402
|
$ele: {
|
|
1403
|
+
itemLeftTextContainer: $li.querySelector<HTMLElement>(
|
|
1404
|
+
".pops-panel-item-left-text"
|
|
1405
|
+
),
|
|
1349
1406
|
panelTextarea: $li.querySelector<HTMLDivElement>(
|
|
1350
1407
|
".pops-panel-textarea"
|
|
1351
1408
|
)!,
|
|
@@ -1369,18 +1426,31 @@ export const PanelHandlerComponents = () => {
|
|
|
1369
1426
|
},
|
|
1370
1427
|
disable() {
|
|
1371
1428
|
this.$ele.textarea.setAttribute("disabled", "true");
|
|
1372
|
-
|
|
1429
|
+
popsDOMUtils.addClassName(
|
|
1430
|
+
this.$ele.panelTextarea,
|
|
1431
|
+
"pops-panel-textarea-disable"
|
|
1432
|
+
);
|
|
1433
|
+
popsDOMUtils.addClassName(
|
|
1434
|
+
this.$ele.itemLeftTextContainer,
|
|
1435
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
1436
|
+
);
|
|
1373
1437
|
},
|
|
1374
1438
|
notDisable() {
|
|
1375
1439
|
this.$ele.textarea.removeAttribute("disabled");
|
|
1376
|
-
|
|
1440
|
+
popsDOMUtils.removeClassName(
|
|
1441
|
+
this.$ele.panelTextarea,
|
|
1377
1442
|
"pops-panel-textarea-disable"
|
|
1378
1443
|
);
|
|
1444
|
+
popsDOMUtils.removeClassName(
|
|
1445
|
+
this.$ele.itemLeftTextContainer,
|
|
1446
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
1447
|
+
);
|
|
1379
1448
|
},
|
|
1380
1449
|
isDisabled() {
|
|
1381
1450
|
return (
|
|
1382
1451
|
this.$ele.textarea.hasAttribute("disabled") ||
|
|
1383
|
-
|
|
1452
|
+
popsDOMUtils.containsClassName(
|
|
1453
|
+
this.$ele.panelTextarea,
|
|
1384
1454
|
"pops-panel-textarea-disable"
|
|
1385
1455
|
)
|
|
1386
1456
|
);
|
|
@@ -1395,7 +1465,6 @@ export const PanelHandlerComponents = () => {
|
|
|
1395
1465
|
popsDOMUtils.on<InputEvent>(
|
|
1396
1466
|
this.$ele.textarea,
|
|
1397
1467
|
["input", "propertychange"],
|
|
1398
|
-
void 0,
|
|
1399
1468
|
(event) => {
|
|
1400
1469
|
let value = this.$ele.textarea.value;
|
|
1401
1470
|
this.$data.value = value;
|
|
@@ -1439,7 +1508,7 @@ export const PanelHandlerComponents = () => {
|
|
|
1439
1508
|
/*html*/ `
|
|
1440
1509
|
<div class="pops-panel-item-left-text">
|
|
1441
1510
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>${leftDescriptionText}</div>
|
|
1442
|
-
<div class="pops-panel-select
|
|
1511
|
+
<div class="pops-panel-select">
|
|
1443
1512
|
<select></select>
|
|
1444
1513
|
</div>
|
|
1445
1514
|
`
|
|
@@ -1448,6 +1517,9 @@ export const PanelHandlerComponents = () => {
|
|
|
1448
1517
|
const PopsPanelSelect = {
|
|
1449
1518
|
[Symbol.toStringTag]: "PopsPanelSelect",
|
|
1450
1519
|
$ele: {
|
|
1520
|
+
itemLeftTextContainer: $li.querySelector<HTMLElement>(
|
|
1521
|
+
".pops-panel-item-left-text"
|
|
1522
|
+
),
|
|
1451
1523
|
panelSelect: $li.querySelector<HTMLDivElement>(".pops-panel-select")!,
|
|
1452
1524
|
select: $li.querySelector<HTMLSelectElement>(
|
|
1453
1525
|
".pops-panel-select select"
|
|
@@ -1462,6 +1534,10 @@ export const PanelHandlerComponents = () => {
|
|
|
1462
1534
|
defaultValue: formConfig.getValue(),
|
|
1463
1535
|
},
|
|
1464
1536
|
init() {
|
|
1537
|
+
popsDOMUtils.addClassName(
|
|
1538
|
+
this.$ele.panelSelect,
|
|
1539
|
+
PopsCommonCSSClassName.userSelectNone
|
|
1540
|
+
);
|
|
1465
1541
|
this.initOption();
|
|
1466
1542
|
this.setChangeEvent();
|
|
1467
1543
|
this.setClickEvent();
|
|
@@ -1496,14 +1572,28 @@ export const PanelHandlerComponents = () => {
|
|
|
1496
1572
|
*/
|
|
1497
1573
|
disable() {
|
|
1498
1574
|
this.$ele.select.setAttribute("disabled", "true");
|
|
1499
|
-
|
|
1575
|
+
popsDOMUtils.addClassName(
|
|
1576
|
+
this.$ele.panelSelect,
|
|
1577
|
+
"pops-panel-select-disable"
|
|
1578
|
+
);
|
|
1579
|
+
popsDOMUtils.addClassName(
|
|
1580
|
+
this.$ele.itemLeftTextContainer,
|
|
1581
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
1582
|
+
);
|
|
1500
1583
|
},
|
|
1501
1584
|
/**
|
|
1502
1585
|
* 取消禁用
|
|
1503
1586
|
*/
|
|
1504
1587
|
notDisable() {
|
|
1505
1588
|
this.$ele.select.removeAttribute("disabled");
|
|
1506
|
-
|
|
1589
|
+
popsDOMUtils.removeClassName(
|
|
1590
|
+
this.$ele.panelSelect,
|
|
1591
|
+
"pops-panel-select-disable"
|
|
1592
|
+
);
|
|
1593
|
+
popsDOMUtils.removeClassName(
|
|
1594
|
+
this.$ele.itemLeftTextContainer,
|
|
1595
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
1596
|
+
);
|
|
1507
1597
|
},
|
|
1508
1598
|
/**
|
|
1509
1599
|
* 判断是否禁用
|
|
@@ -1511,7 +1601,8 @@ export const PanelHandlerComponents = () => {
|
|
|
1511
1601
|
isDisabled() {
|
|
1512
1602
|
return (
|
|
1513
1603
|
this.$ele.select.hasAttribute("disabled") ||
|
|
1514
|
-
|
|
1604
|
+
popsDOMUtils.containsClassName(
|
|
1605
|
+
this.$ele.panelSelect,
|
|
1515
1606
|
"pops-panel-select-disable"
|
|
1516
1607
|
)
|
|
1517
1608
|
);
|
|
@@ -1703,6 +1794,10 @@ export const PanelHandlerComponents = () => {
|
|
|
1703
1794
|
const PopsPanelSelectMultiple = {
|
|
1704
1795
|
[Symbol.toStringTag]: "PopsPanelSelectMultiple",
|
|
1705
1796
|
$el: {
|
|
1797
|
+
/** 左侧文本容器 */
|
|
1798
|
+
itemLeftTextContainer: $li.querySelector<HTMLElement>(
|
|
1799
|
+
".pops-panel-item-left-text"
|
|
1800
|
+
),
|
|
1706
1801
|
/** 容器 */
|
|
1707
1802
|
$container: void 0 as any as HTMLElement,
|
|
1708
1803
|
/** 包括的容器 */
|
|
@@ -1732,6 +1827,14 @@ export const PanelHandlerComponents = () => {
|
|
|
1732
1827
|
this.initPlaceHolder();
|
|
1733
1828
|
this.initTagElement();
|
|
1734
1829
|
this.setSelectContainerClickEvent();
|
|
1830
|
+
|
|
1831
|
+
let disabled =
|
|
1832
|
+
typeof formConfig.disabled === "function"
|
|
1833
|
+
? formConfig.disabled()
|
|
1834
|
+
: formConfig.disabled;
|
|
1835
|
+
if (disabled) {
|
|
1836
|
+
this.disable();
|
|
1837
|
+
}
|
|
1735
1838
|
},
|
|
1736
1839
|
/** 初始化默认值 */
|
|
1737
1840
|
initDefault() {
|
|
@@ -2161,6 +2264,9 @@ export const PanelHandlerComponents = () => {
|
|
|
2161
2264
|
setSelectContainerClickEvent() {
|
|
2162
2265
|
const that = this;
|
|
2163
2266
|
popsDOMUtils.on(this.$el.$container, "click", (event) => {
|
|
2267
|
+
if (this.isDisabled()) {
|
|
2268
|
+
return;
|
|
2269
|
+
}
|
|
2164
2270
|
/** 弹窗的选中的值 */
|
|
2165
2271
|
let selectedInfo = that.$data.selectInfo;
|
|
2166
2272
|
let { style, ...userConfirmDetails } =
|
|
@@ -2311,6 +2417,9 @@ export const PanelHandlerComponents = () => {
|
|
|
2311
2417
|
"click",
|
|
2312
2418
|
(event) => {
|
|
2313
2419
|
popsDOMUtils.preventEvent(event);
|
|
2420
|
+
if (this.isDisabled()) {
|
|
2421
|
+
return;
|
|
2422
|
+
}
|
|
2314
2423
|
if (typeof formConfig.closeIconClickCallBack === "function") {
|
|
2315
2424
|
let result = formConfig.closeIconClickCallBack(event, {
|
|
2316
2425
|
$tag: data.$tag,
|
|
@@ -2400,6 +2509,41 @@ export const PanelHandlerComponents = () => {
|
|
|
2400
2509
|
removeSectionIsNear() {
|
|
2401
2510
|
this.$el.$section.classList.remove("is-near");
|
|
2402
2511
|
},
|
|
2512
|
+
/**
|
|
2513
|
+
* 禁用标签
|
|
2514
|
+
*/
|
|
2515
|
+
disable() {
|
|
2516
|
+
popsDOMUtils.addClassName(
|
|
2517
|
+
this.$el.itemLeftTextContainer,
|
|
2518
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
2519
|
+
);
|
|
2520
|
+
popsDOMUtils.addClassName(
|
|
2521
|
+
this.$el.$container,
|
|
2522
|
+
"pops-panel-select-multiple-disable"
|
|
2523
|
+
);
|
|
2524
|
+
},
|
|
2525
|
+
/**
|
|
2526
|
+
* 判断是否被禁用
|
|
2527
|
+
*/
|
|
2528
|
+
isDisabled() {
|
|
2529
|
+
return popsDOMUtils.containsClassName(
|
|
2530
|
+
this.$el.$container,
|
|
2531
|
+
"pops-panel-select-multiple-disable"
|
|
2532
|
+
);
|
|
2533
|
+
},
|
|
2534
|
+
/**
|
|
2535
|
+
* 取消禁用标签
|
|
2536
|
+
*/
|
|
2537
|
+
cancleDisable() {
|
|
2538
|
+
popsDOMUtils.removeClassName(
|
|
2539
|
+
this.$el.itemLeftTextContainer,
|
|
2540
|
+
PopsCommonCSSClassName.textIsDisabled
|
|
2541
|
+
);
|
|
2542
|
+
popsDOMUtils.removeClassName(
|
|
2543
|
+
this.$el.$container,
|
|
2544
|
+
"pops-panel-select-multiple-disable"
|
|
2545
|
+
);
|
|
2546
|
+
},
|
|
2403
2547
|
};
|
|
2404
2548
|
|
|
2405
2549
|
PopsPanelSelectMultiple.init();
|
|
@@ -2672,12 +2816,19 @@ export const PanelHandlerComponents = () => {
|
|
|
2672
2816
|
formContainerListElement.setAttribute("data-fold-enable", "");
|
|
2673
2817
|
}
|
|
2674
2818
|
});
|
|
2675
|
-
|
|
2819
|
+
popsDOMUtils.addClassName(
|
|
2820
|
+
formHeaderDivElement,
|
|
2676
2821
|
"pops-panel-forms-fold-container"
|
|
2677
2822
|
);
|
|
2678
|
-
|
|
2823
|
+
popsDOMUtils.addClassName(
|
|
2824
|
+
formHeaderDivElement,
|
|
2825
|
+
PopsCommonCSSClassName.userSelectNone
|
|
2826
|
+
);
|
|
2679
2827
|
formContainerListElement.setAttribute("data-fold-enable", "");
|
|
2680
|
-
|
|
2828
|
+
popsDOMUtils.addClassName(
|
|
2829
|
+
formHeaderDivElement,
|
|
2830
|
+
"pops-panel-forms-fold"
|
|
2831
|
+
);
|
|
2681
2832
|
formContainerListElement.appendChild(formHeaderDivElement);
|
|
2682
2833
|
} else {
|
|
2683
2834
|
/* 加进容器内 */
|
|
@@ -2938,10 +3089,19 @@ export const PanelHandlerComponents = () => {
|
|
|
2938
3089
|
formContainerListElement.setAttribute("data-fold-enable", "");
|
|
2939
3090
|
}
|
|
2940
3091
|
});
|
|
2941
|
-
|
|
2942
|
-
|
|
3092
|
+
popsDOMUtils.addClassName(
|
|
3093
|
+
formHeaderDivElement,
|
|
3094
|
+
"pops-panel-forms-fold-container"
|
|
3095
|
+
);
|
|
3096
|
+
popsDOMUtils.addClassName(
|
|
3097
|
+
formHeaderDivElement,
|
|
3098
|
+
PopsCommonCSSClassName.userSelectNone
|
|
3099
|
+
);
|
|
2943
3100
|
formContainerListElement.setAttribute("data-fold-enable", "");
|
|
2944
|
-
|
|
3101
|
+
popsDOMUtils.addClassName(
|
|
3102
|
+
formContainerListElement,
|
|
3103
|
+
"pops-panel-forms-fold"
|
|
3104
|
+
);
|
|
2945
3105
|
formContainerListElement.appendChild(formHeaderDivElement);
|
|
2946
3106
|
} else {
|
|
2947
3107
|
/* 加进容器内 */
|
|
@@ -24,12 +24,7 @@
|
|
|
24
24
|
--pops-panel-forms-container-item-margin-left-right: var(
|
|
25
25
|
--pops-panel-forms-margin-left-right
|
|
26
26
|
);
|
|
27
|
-
--pops-panel-forms-container-li-border-color:
|
|
28
|
-
229,
|
|
29
|
-
229,
|
|
30
|
-
229,
|
|
31
|
-
var(--pops-bd-opacity)
|
|
32
|
-
);
|
|
27
|
+
--pops-panel-forms-container-li-border-color: var(--pops-bd-color);
|
|
33
28
|
--pops-panel-forms-container-li-padding-top-bottom: 12px;
|
|
34
29
|
--pops-panel-forms-container-li-padding-left-right: 16px;
|
|
35
30
|
}
|
|
@@ -82,7 +77,7 @@ section.pops-panel-container {
|
|
|
82
77
|
}
|
|
83
78
|
section.pops-panel-container .pops-panel-container-header-ul,
|
|
84
79
|
section.pops-panel-container .pops-panel-deepMenu-container-header-ul {
|
|
85
|
-
border-bottom: 1px solid
|
|
80
|
+
border-bottom: 1px solid rgba(223, 223, 223, var(--pops-bg-opacity));
|
|
86
81
|
flex: 0 auto;
|
|
87
82
|
}
|
|
88
83
|
section.pops-panel-container .pops-panel-container-header-ul li,
|
|
@@ -139,6 +134,7 @@ section.pops-panel-container .pops-panel-forms-container-item-header-text {
|
|
|
139
134
|
color: var(--pops-panel-forms-container-item-title-color);
|
|
140
135
|
}
|
|
141
136
|
section.pops-panel-container li.pops-panel-forms-container-item {
|
|
137
|
+
/* 去除<li>左侧的圆点 */
|
|
142
138
|
display: block;
|
|
143
139
|
}
|
|
144
140
|
section.pops-panel-container
|
|
@@ -194,7 +190,6 @@ section.pops-panel-container .pops-panel-item-left-desc-text {
|
|
|
194
190
|
}
|
|
195
191
|
|
|
196
192
|
/* 折叠面板 */
|
|
197
|
-
|
|
198
193
|
section.pops-panel-container .pops-panel-forms-fold {
|
|
199
194
|
border-radius: var(--pops-panel-forms-container-item-border-radius);
|
|
200
195
|
background: var(--pops-panel-forms-container-item-bg-color);
|
|
@@ -226,11 +221,18 @@ section.pops-panel-container
|
|
|
226
221
|
transform: rotate(-90deg);
|
|
227
222
|
transition: transform 0.3s;
|
|
228
223
|
}
|
|
224
|
+
/* 折叠状态 */
|
|
229
225
|
section.pops-panel-container
|
|
230
226
|
.pops-panel-forms-fold[data-fold-enable]
|
|
231
227
|
.pops-panel-forms-container-item-formlist {
|
|
232
228
|
height: 0;
|
|
233
229
|
}
|
|
230
|
+
/* 非折叠状态 */
|
|
231
|
+
section.pops-panel-container
|
|
232
|
+
.pops-panel-forms-fold
|
|
233
|
+
ul.pops-panel-forms-container-item-formlist {
|
|
234
|
+
margin: 0;
|
|
235
|
+
}
|
|
234
236
|
section.pops-panel-container
|
|
235
237
|
.pops-panel-forms-fold
|
|
236
238
|
.pops-panel-forms-container-item-formlist {
|
|
@@ -239,7 +241,6 @@ section.pops-panel-container
|
|
|
239
241
|
border-radius: unset;
|
|
240
242
|
background: unset;
|
|
241
243
|
margin: 0;
|
|
242
|
-
height: auto;
|
|
243
244
|
height: calc-size(auto, size);
|
|
244
245
|
}
|
|
245
246
|
/* 折叠面板 */
|
|
@@ -771,10 +772,7 @@ section.pops-panel-container
|
|
|
771
772
|
}
|
|
772
773
|
|
|
773
774
|
.pops-input-disabled {
|
|
774
|
-
background-color: var(--
|
|
775
|
-
}
|
|
776
|
-
.pops-panel-input.pops-input-disabled {
|
|
777
|
-
border: none;
|
|
775
|
+
background-color: var(--pops-components-is-disabled-bg-color);
|
|
778
776
|
}
|
|
779
777
|
.pops-panel-input.pops-input-disabled:hover {
|
|
780
778
|
--pops-panel-components-input-hover-bd-color: var(
|
|
@@ -833,8 +831,16 @@ section.pops-panel-container
|
|
|
833
831
|
--pops-panel-components-textarea-bd-color
|
|
834
832
|
);
|
|
835
833
|
}
|
|
836
|
-
.pops-panel-textarea-disable
|
|
837
|
-
|
|
834
|
+
.pops-panel-textarea-disable {
|
|
835
|
+
--pops-panel-components-textarea-text-bg-color: var(
|
|
836
|
+
--pops-components-is-disabled-bg-color
|
|
837
|
+
) !important;
|
|
838
|
+
--pops-panel-components-textarea-text-color: var(
|
|
839
|
+
--pops-components-is-disabled-text-color
|
|
840
|
+
);
|
|
841
|
+
}
|
|
842
|
+
.pops-panel-textarea-disable textarea {
|
|
843
|
+
cursor: not-allowed;
|
|
838
844
|
}
|
|
839
845
|
.pops-panel-textarea textarea:focus {
|
|
840
846
|
outline: 0;
|
|
@@ -851,13 +857,18 @@ section.pops-panel-container
|
|
|
851
857
|
184,
|
|
852
858
|
var(--pops-bd-opacity)
|
|
853
859
|
);
|
|
860
|
+
--pops-panel-components-select-hover-bd-color: rgb(
|
|
861
|
+
184,
|
|
862
|
+
184,
|
|
863
|
+
184,
|
|
864
|
+
var(--pops-bd-opacity)
|
|
865
|
+
);
|
|
854
866
|
--pops-panel-components-select-bg-color: rgb(
|
|
855
867
|
255,
|
|
856
868
|
255,
|
|
857
869
|
255,
|
|
858
870
|
var(--pops-bg-opacity)
|
|
859
871
|
);
|
|
860
|
-
--pops-panel-components-select-hover-bd-color: #c0c4cc;
|
|
861
872
|
}
|
|
862
873
|
.pops-panel-select {
|
|
863
874
|
border: 0;
|
|
@@ -876,12 +887,24 @@ section.pops-panel-container
|
|
|
876
887
|
box-shadow: none;
|
|
877
888
|
}
|
|
878
889
|
.pops-panel-select select:hover {
|
|
879
|
-
--pops-panel-components-select-bd-color
|
|
880
|
-
|
|
890
|
+
border: 1px solid var(--pops-panel-components-select-hover-bd-color);
|
|
891
|
+
}
|
|
892
|
+
.pops-panel-select-disable {
|
|
893
|
+
--pops-panel-components-select-text-color: var(
|
|
894
|
+
--pops-components-is-disabled-text-color
|
|
895
|
+
);
|
|
896
|
+
--pops-panel-components-select-bg-color: var(
|
|
897
|
+
--pops-components-is-disabled-bg-color
|
|
881
898
|
);
|
|
882
899
|
}
|
|
883
|
-
.pops-panel-select-disable
|
|
900
|
+
.pops-panel-select-disable select {
|
|
901
|
+
cursor: not-allowed;
|
|
902
|
+
}
|
|
903
|
+
.pops-panel-select-disable select:hover {
|
|
884
904
|
box-shadow: none;
|
|
905
|
+
--pops-panel-components-select-hover-bd-color: var(
|
|
906
|
+
--pops-panel-components-select-bd-color
|
|
907
|
+
);
|
|
885
908
|
}
|
|
886
909
|
.pops-panel-select select:focus {
|
|
887
910
|
border: 1px solid rgb(64, 158, 255, var(--pops-bd-opacity));
|
|
@@ -894,7 +917,7 @@ section.pops-panel-container
|
|
|
894
917
|
--el-border-radius-base: 4px;
|
|
895
918
|
--el-fill-color-blank: #ffffff;
|
|
896
919
|
--el-transition-duration: 0.3s;
|
|
897
|
-
--el-border-color: #
|
|
920
|
+
--el-border-color: #cbcbcb;
|
|
898
921
|
--el-text-color-placeholder: #a8abb2;
|
|
899
922
|
--color: inherit;
|
|
900
923
|
--el-select-input-color: #a8abb2;
|
|
@@ -926,10 +949,10 @@ section.pops-panel-container
|
|
|
926
949
|
background-color: var(--el-fill-color-blank);
|
|
927
950
|
transition: var(--el-transition-duration);
|
|
928
951
|
transform: translateZ(0);
|
|
929
|
-
|
|
952
|
+
border: 1px solid var(--el-border-color);
|
|
930
953
|
}
|
|
931
954
|
.pops-panel-select-multiple .el-select__wrapper.is-focused {
|
|
932
|
-
|
|
955
|
+
--el-border-color: var(--el-color-primary);
|
|
933
956
|
}
|
|
934
957
|
.pops-panel-select-multiple .el-select__selection {
|
|
935
958
|
position: relative;
|
|
@@ -1078,6 +1101,21 @@ section.pops-panel-container
|
|
|
1078
1101
|
text-overflow: ellipsis;
|
|
1079
1102
|
white-space: nowrap;
|
|
1080
1103
|
}
|
|
1104
|
+
.pops-panel-select-multiple-disable {
|
|
1105
|
+
--el-fill-color-blank: #f5f7fa;
|
|
1106
|
+
--color: #a8abb2;
|
|
1107
|
+
--el-border-color: #cbcbcb;
|
|
1108
|
+
}
|
|
1109
|
+
.pops-panel-select-multiple-disable .el-tag.el-tag--info {
|
|
1110
|
+
--el-tag-bg-color: #e7e7e7;
|
|
1111
|
+
--el-tag-text-color: var(--pops-components-is-disabled-text-color);
|
|
1112
|
+
}
|
|
1113
|
+
.pops-panel-select-multiple-disable .el-select__selection .el-tag,
|
|
1114
|
+
.pops-panel-select-multiple-disable .el-tag .el-tag__close:hover,
|
|
1115
|
+
.pops-panel-select-multiple-disable .el-select__wrapper,
|
|
1116
|
+
.pops-panel-select-multiple-disable .el-select__caret {
|
|
1117
|
+
cursor: not-allowed;
|
|
1118
|
+
}
|
|
1081
1119
|
/* select-multiple的CSS*/
|
|
1082
1120
|
|
|
1083
1121
|
/* deepMenu的css */
|
|
@@ -1208,10 +1246,16 @@ section.pops-panel-deepMenu-container
|
|
|
1208
1246
|
--el-color-primary: #409eff;
|
|
1209
1247
|
--el-color-white: #ffffff;
|
|
1210
1248
|
}
|
|
1211
|
-
/* select-multiple的CSS*/
|
|
1212
1249
|
.pops-panel-select-multiple .el-tag {
|
|
1213
1250
|
--el-color-info-light-9: #202121;
|
|
1214
1251
|
}
|
|
1252
|
+
.pops-panel-select-multiple-disable {
|
|
1253
|
+
--el-border-color: rgb(51, 51, 51, var(--pops-bd-opacity));
|
|
1254
|
+
}
|
|
1255
|
+
.pops-panel-select-multiple-disable .el-tag.el-tag--info {
|
|
1256
|
+
--el-tag-bg-color: #2f2f2f;
|
|
1257
|
+
}
|
|
1258
|
+
/* select-multiple的CSS*/
|
|
1215
1259
|
/* slider的CSS */
|
|
1216
1260
|
.pops-slider {
|
|
1217
1261
|
--pops-slider-border-color-light: #414243;
|
|
@@ -1233,4 +1277,16 @@ section.pops-panel-deepMenu-container
|
|
|
1233
1277
|
--pops-panel-components-textarea-hover-bd-color: #6f7175;
|
|
1234
1278
|
--pops-panel-components-textarea-focus-bd-color: #409eff;
|
|
1235
1279
|
}
|
|
1280
|
+
.pops-panel-textarea-disable {
|
|
1281
|
+
--pops-panel-components-textarea-text-color: var(
|
|
1282
|
+
--pops-components-is-disabled-text-color
|
|
1283
|
+
);
|
|
1284
|
+
--pops-panel-components-textarea-text-bg-color: var(
|
|
1285
|
+
--pops-components-is-disabled-bg-color
|
|
1286
|
+
);
|
|
1287
|
+
}
|
|
1288
|
+
/* slider */
|
|
1289
|
+
.pops-slider {
|
|
1290
|
+
--pops-slider-text-color-placeholder: #8d9095;
|
|
1291
|
+
}
|
|
1236
1292
|
}
|