@whitesev/pops 2.4.4 → 2.4.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/README.md +117 -111
- package/dist/index.amd.js +687 -733
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +687 -733
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +687 -733
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +687 -733
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +687 -733
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +687 -733
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +9 -10
- package/dist/types/src/components/panel/types/components-common.d.ts +26 -26
- package/dist/types/src/components/panel/types/index.d.ts +2 -2
- package/dist/types/src/components/rightClickMenu/index.d.ts +3 -4
- package/dist/types/src/components/searchSuggestion/index.d.ts +2 -2
- package/dist/types/src/components/searchSuggestion/types/index.d.ts +2 -2
- package/dist/types/src/handler/PopsHandler.d.ts +3 -3
- package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +141 -145
- package/dist/types/src/types/animation.d.ts +15 -15
- package/dist/types/src/types/button.d.ts +141 -141
- package/dist/types/src/types/components.d.ts +175 -178
- package/dist/types/src/types/event.d.ts +44 -44
- package/dist/types/src/types/global.d.ts +18 -13
- package/dist/types/src/types/icon.d.ts +28 -28
- package/dist/types/src/types/inst.d.ts +14 -14
- package/dist/types/src/types/main.d.ts +46 -49
- package/dist/types/src/types/mask.d.ts +36 -36
- package/dist/types/src/types/position.d.ts +46 -46
- package/dist/types/src/utils/PopsDOMUtils.d.ts +1 -1
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +1 -1
- package/dist/types/src/utils/PopsUtils.d.ts +16 -16
- package/package.json +17 -8
package/dist/index.umd.js
CHANGED
|
@@ -18,12 +18,12 @@
|
|
|
18
18
|
* 获取全局配置
|
|
19
19
|
*/
|
|
20
20
|
getGlobalConfig() {
|
|
21
|
-
|
|
21
|
+
const result = {};
|
|
22
22
|
Object.keys(GlobalConfig.config).forEach((keyName) => {
|
|
23
|
-
|
|
23
|
+
const configValue = Reflect.get(GlobalConfig.config, keyName);
|
|
24
24
|
if (keyName === "style") {
|
|
25
25
|
// 设置style属性
|
|
26
|
-
|
|
26
|
+
const style = configValue == null ? "" : typeof configValue === "function" ? configValue() : configValue;
|
|
27
27
|
if (typeof style === "string") {
|
|
28
28
|
result.style = style;
|
|
29
29
|
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
// 设置zIndex属性
|
|
33
33
|
let zIndex = configValue == null ? "" : typeof configValue === "function" ? configValue() : configValue;
|
|
34
34
|
if (typeof zIndex === "string") {
|
|
35
|
-
|
|
35
|
+
const newIndex = (zIndex = Number(zIndex));
|
|
36
36
|
if (!isNaN(newIndex)) {
|
|
37
37
|
result.zIndex = newIndex;
|
|
38
38
|
}
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
}
|
|
45
45
|
}
|
|
46
46
|
else if (keyName === "mask") {
|
|
47
|
-
|
|
47
|
+
const mask = GlobalConfig.config.mask == null ? {} : GlobalConfig.config.mask;
|
|
48
48
|
if (typeof mask === "object" && mask != null) {
|
|
49
49
|
result.mask = mask;
|
|
50
50
|
}
|
|
@@ -556,7 +556,7 @@
|
|
|
556
556
|
}
|
|
557
557
|
}
|
|
558
558
|
assign(target = {}, source = {}, isAdd = false) {
|
|
559
|
-
|
|
559
|
+
const UtilsContext = this;
|
|
560
560
|
if (source == null) {
|
|
561
561
|
return target;
|
|
562
562
|
}
|
|
@@ -564,7 +564,7 @@
|
|
|
564
564
|
target = {};
|
|
565
565
|
}
|
|
566
566
|
if (Array.isArray(source)) {
|
|
567
|
-
|
|
567
|
+
const canTraverse = source.filter((item) => {
|
|
568
568
|
return typeof item === "object";
|
|
569
569
|
});
|
|
570
570
|
if (!canTraverse.length) {
|
|
@@ -574,8 +574,8 @@
|
|
|
574
574
|
if (isAdd) {
|
|
575
575
|
for (const sourceKeyName in source) {
|
|
576
576
|
const targetKeyName = sourceKeyName;
|
|
577
|
-
|
|
578
|
-
|
|
577
|
+
const targetValue = target[targetKeyName];
|
|
578
|
+
const sourceValue = source[sourceKeyName];
|
|
579
579
|
if (typeof sourceValue === "object" &&
|
|
580
580
|
sourceValue != null &&
|
|
581
581
|
sourceKeyName in target &&
|
|
@@ -590,22 +590,19 @@
|
|
|
590
590
|
else {
|
|
591
591
|
for (const targetKeyName in target) {
|
|
592
592
|
if (targetKeyName in source) {
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
// @ts-ignore
|
|
596
|
-
let sourceValue = source[targetKeyName];
|
|
593
|
+
const targetValue = Reflect.get(target, targetKeyName);
|
|
594
|
+
const sourceValue = Reflect.get(source, targetKeyName);
|
|
597
595
|
if (typeof sourceValue === "object" &&
|
|
598
596
|
sourceValue != null &&
|
|
599
597
|
!UtilsContext.isDOM(sourceValue) &&
|
|
600
598
|
Object.keys(sourceValue).length) {
|
|
601
599
|
/* 源端的值是object类型,且不是元素节点 */
|
|
602
|
-
|
|
603
|
-
|
|
600
|
+
const childObjectValue = UtilsContext.assign(targetValue, sourceValue, isAdd);
|
|
601
|
+
Reflect.set(target, targetKeyName, childObjectValue);
|
|
604
602
|
continue;
|
|
605
603
|
}
|
|
606
604
|
/* 直接赋值 */
|
|
607
|
-
|
|
608
|
-
target[targetKeyName] = sourceValue;
|
|
605
|
+
Reflect.set(target, targetKeyName, sourceValue);
|
|
609
606
|
}
|
|
610
607
|
}
|
|
611
608
|
}
|
|
@@ -620,15 +617,16 @@
|
|
|
620
617
|
}
|
|
621
618
|
else {
|
|
622
619
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (charStr) {
|
|
623
|
-
|
|
620
|
+
const randomValue = (Math.random() * 16) | 0, randomCharValue = charStr === "x" ? randomValue : (randomValue & 0x3) | 0x8;
|
|
624
621
|
return randomCharValue.toString(16);
|
|
625
622
|
});
|
|
626
623
|
}
|
|
627
624
|
}
|
|
628
|
-
contains(
|
|
629
|
-
|
|
625
|
+
contains(...args) {
|
|
626
|
+
const [context, target] = args;
|
|
627
|
+
if (args.length === 1) {
|
|
630
628
|
// 只判断该页面是否存在该元素
|
|
631
|
-
return this.contains(PopsCore.document.body || PopsCore.document.documentElement,
|
|
629
|
+
return this.contains(PopsCore.document.body || PopsCore.document.documentElement, args[0]);
|
|
632
630
|
}
|
|
633
631
|
else {
|
|
634
632
|
if (target == null) {
|
|
@@ -651,7 +649,7 @@
|
|
|
651
649
|
}
|
|
652
650
|
}
|
|
653
651
|
formatTime(text = new Date(), formatType = "yyyy-MM-dd HH:mm:ss") {
|
|
654
|
-
|
|
652
|
+
const time = text == null ? new Date() : new Date(text);
|
|
655
653
|
/**
|
|
656
654
|
* 校验时间补0
|
|
657
655
|
* @param timeNum
|
|
@@ -670,7 +668,7 @@
|
|
|
670
668
|
function timeSystemChange(hourNum) {
|
|
671
669
|
return hourNum > 12 ? hourNum - 12 : hourNum;
|
|
672
670
|
}
|
|
673
|
-
|
|
671
|
+
const timeRegexp = {
|
|
674
672
|
yyyy: time.getFullYear(),
|
|
675
673
|
/* 年 */
|
|
676
674
|
MM: checkTime(time.getMonth() + 1),
|
|
@@ -687,7 +685,7 @@
|
|
|
687
685
|
/* 秒 */
|
|
688
686
|
};
|
|
689
687
|
Object.keys(timeRegexp).forEach(function (key) {
|
|
690
|
-
|
|
688
|
+
const replaecRegexp = new RegExp(key, "g");
|
|
691
689
|
formatType = formatType.replace(replaecRegexp, timeRegexp[key]);
|
|
692
690
|
});
|
|
693
691
|
return formatType;
|
|
@@ -699,7 +697,7 @@
|
|
|
699
697
|
}
|
|
700
698
|
let result = 0;
|
|
701
699
|
let resultType = "KB";
|
|
702
|
-
|
|
700
|
+
const sizeData = {};
|
|
703
701
|
sizeData.B = 1;
|
|
704
702
|
sizeData.KB = 1024;
|
|
705
703
|
sizeData.MB = sizeData.KB * sizeData.KB;
|
|
@@ -712,7 +710,7 @@
|
|
|
712
710
|
sizeData.BB = sizeData.YB * sizeData.KB;
|
|
713
711
|
sizeData.NB = sizeData.BB * sizeData.KB;
|
|
714
712
|
sizeData.DB = sizeData.NB * sizeData.KB;
|
|
715
|
-
for (
|
|
713
|
+
for (const key in sizeData) {
|
|
716
714
|
result = byteSize / sizeData[key];
|
|
717
715
|
resultType = key;
|
|
718
716
|
if (sizeData.KB >= result) {
|
|
@@ -740,7 +738,7 @@
|
|
|
740
738
|
try {
|
|
741
739
|
return setTimeout$1(callback, timeout);
|
|
742
740
|
}
|
|
743
|
-
catch
|
|
741
|
+
catch {
|
|
744
742
|
return PopsCore.setTimeout(callback, timeout);
|
|
745
743
|
}
|
|
746
744
|
}
|
|
@@ -753,7 +751,8 @@
|
|
|
753
751
|
clearTimeout$1(timeId);
|
|
754
752
|
}
|
|
755
753
|
}
|
|
756
|
-
catch
|
|
754
|
+
catch {
|
|
755
|
+
// TODO
|
|
757
756
|
}
|
|
758
757
|
finally {
|
|
759
758
|
PopsCore.clearTimeout(timeId);
|
|
@@ -766,7 +765,7 @@
|
|
|
766
765
|
try {
|
|
767
766
|
return setInterval$1(callback, timeout);
|
|
768
767
|
}
|
|
769
|
-
catch
|
|
768
|
+
catch {
|
|
770
769
|
return PopsCore.setInterval(callback, timeout);
|
|
771
770
|
}
|
|
772
771
|
}
|
|
@@ -779,7 +778,8 @@
|
|
|
779
778
|
clearInterval$1(timeId);
|
|
780
779
|
}
|
|
781
780
|
}
|
|
782
|
-
catch
|
|
781
|
+
catch {
|
|
782
|
+
// 忽略
|
|
783
783
|
}
|
|
784
784
|
finally {
|
|
785
785
|
PopsCore.clearInterval(timeId);
|
|
@@ -793,10 +793,8 @@
|
|
|
793
793
|
* 获取安全的html
|
|
794
794
|
*/
|
|
795
795
|
getSafeHTML(text) {
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
// @ts-ignore
|
|
799
|
-
const policy = globalThis.trustedTypes.createPolicy("safe-innerHTML", {
|
|
796
|
+
if (window.trustedTypes) {
|
|
797
|
+
const policy = window.trustedTypes.createPolicy("safe-innerHTML", {
|
|
800
798
|
createHTML: (html) => html,
|
|
801
799
|
});
|
|
802
800
|
return policy.createHTML(text);
|
|
@@ -834,7 +832,7 @@
|
|
|
834
832
|
* @param option
|
|
835
833
|
*/
|
|
836
834
|
function getOption(args, startIndex, option) {
|
|
837
|
-
|
|
835
|
+
const currentParam = args[startIndex];
|
|
838
836
|
if (typeof currentParam === "boolean") {
|
|
839
837
|
option.capture = currentParam;
|
|
840
838
|
if (typeof args[startIndex + 1] === "boolean") {
|
|
@@ -856,8 +854,9 @@
|
|
|
856
854
|
}
|
|
857
855
|
return option;
|
|
858
856
|
}
|
|
859
|
-
|
|
860
|
-
|
|
857
|
+
const DOMUtilsContext = this;
|
|
858
|
+
// eslint-disable-next-line prefer-rest-params
|
|
859
|
+
const args = arguments;
|
|
861
860
|
if (typeof element === "string") {
|
|
862
861
|
element = DOMUtilsContext.selectorAll(element);
|
|
863
862
|
}
|
|
@@ -933,14 +932,14 @@
|
|
|
933
932
|
totalParent = PopsCore.document.documentElement;
|
|
934
933
|
}
|
|
935
934
|
}
|
|
936
|
-
|
|
935
|
+
const findValue = selectorList.find((selectorItem) => {
|
|
937
936
|
// 判断目标元素是否匹配选择器
|
|
938
937
|
if (DOMUtilsContext.matches(eventTarget, selectorItem)) {
|
|
939
938
|
/* 当前目标可以被selector所匹配到 */
|
|
940
939
|
return true;
|
|
941
940
|
}
|
|
942
941
|
/* 在上层与主元素之间寻找可以被selector所匹配到的 */
|
|
943
|
-
|
|
942
|
+
const $closestMatches = DOMUtilsContext.closest(eventTarget, selectorItem);
|
|
944
943
|
if ($closestMatches && totalParent?.contains($closestMatches)) {
|
|
945
944
|
eventTarget = $closestMatches;
|
|
946
945
|
return true;
|
|
@@ -956,7 +955,9 @@
|
|
|
956
955
|
},
|
|
957
956
|
});
|
|
958
957
|
}
|
|
959
|
-
catch
|
|
958
|
+
catch {
|
|
959
|
+
// 忽略
|
|
960
|
+
}
|
|
960
961
|
listenerCallBack.call(eventTarget, event, eventTarget);
|
|
961
962
|
checkOptionOnceToRemoveEventListener();
|
|
962
963
|
}
|
|
@@ -971,7 +972,7 @@
|
|
|
971
972
|
eventTypeList.forEach((eventName) => {
|
|
972
973
|
elementItem.addEventListener(eventName, domUtilsEventCallBack, listenerOption);
|
|
973
974
|
/* 获取对象上的事件 */
|
|
974
|
-
|
|
975
|
+
const elementEvents = Reflect.get(elementItem, SymbolEvents) || {};
|
|
975
976
|
/* 初始化对象上的xx事件 */
|
|
976
977
|
elementEvents[eventName] = elementEvents[eventName] || [];
|
|
977
978
|
elementEvents[eventName].push({
|
|
@@ -993,7 +994,7 @@
|
|
|
993
994
|
* @param option
|
|
994
995
|
*/
|
|
995
996
|
function getOption(args1, startIndex, option) {
|
|
996
|
-
|
|
997
|
+
const currentParam = args1[startIndex];
|
|
997
998
|
if (typeof currentParam === "boolean") {
|
|
998
999
|
option.capture = currentParam;
|
|
999
1000
|
}
|
|
@@ -1002,8 +1003,9 @@
|
|
|
1002
1003
|
}
|
|
1003
1004
|
return option;
|
|
1004
1005
|
}
|
|
1005
|
-
|
|
1006
|
-
|
|
1006
|
+
const DOMUtilsContext = this;
|
|
1007
|
+
// eslint-disable-next-line prefer-rest-params
|
|
1008
|
+
const args = arguments;
|
|
1007
1009
|
if (typeof element === "string") {
|
|
1008
1010
|
element = DOMUtilsContext.selectorAll(element);
|
|
1009
1011
|
}
|
|
@@ -1065,14 +1067,14 @@
|
|
|
1065
1067
|
}
|
|
1066
1068
|
elementList.forEach((elementItem) => {
|
|
1067
1069
|
/* 获取对象上的事件 */
|
|
1068
|
-
|
|
1070
|
+
const elementEvents = Reflect.get(elementItem, SymbolEvents) || {};
|
|
1069
1071
|
eventTypeList.forEach((eventName) => {
|
|
1070
1072
|
let handlers = elementEvents[eventName] || [];
|
|
1071
1073
|
if (typeof filter === "function") {
|
|
1072
1074
|
handlers = handlers.filter(filter);
|
|
1073
1075
|
}
|
|
1074
1076
|
for (let index = 0; index < handlers.length; index++) {
|
|
1075
|
-
|
|
1077
|
+
const handler = handlers[index];
|
|
1076
1078
|
let flag = true;
|
|
1077
1079
|
if (flag && listenerCallBack && handler.originCallBack !== listenerCallBack) {
|
|
1078
1080
|
// callback不同
|
|
@@ -1132,10 +1134,10 @@
|
|
|
1132
1134
|
if (!__symbolEvents.toString().startsWith("Symbol(events_")) {
|
|
1133
1135
|
return;
|
|
1134
1136
|
}
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
+
const elementEvents = elementItem[__symbolEvents] || {};
|
|
1138
|
+
const iterEventNameList = eventTypeList.length ? eventTypeList : Object.keys(elementEvents);
|
|
1137
1139
|
iterEventNameList.forEach((eventName) => {
|
|
1138
|
-
|
|
1140
|
+
const handlers = elementEvents[eventName];
|
|
1139
1141
|
if (!handlers) {
|
|
1140
1142
|
return;
|
|
1141
1143
|
}
|
|
@@ -1175,7 +1177,7 @@
|
|
|
1175
1177
|
return false;
|
|
1176
1178
|
}
|
|
1177
1179
|
}
|
|
1178
|
-
catch
|
|
1180
|
+
catch {
|
|
1179
1181
|
return false;
|
|
1180
1182
|
}
|
|
1181
1183
|
}
|
|
@@ -1186,7 +1188,7 @@
|
|
|
1186
1188
|
removeDomReadyListener();
|
|
1187
1189
|
callback();
|
|
1188
1190
|
}
|
|
1189
|
-
|
|
1191
|
+
const targetList = [
|
|
1190
1192
|
{
|
|
1191
1193
|
target: PopsCore.document,
|
|
1192
1194
|
eventType: "DOMContentLoaded",
|
|
@@ -1203,7 +1205,7 @@
|
|
|
1203
1205
|
*/
|
|
1204
1206
|
function addDomReadyListener() {
|
|
1205
1207
|
for (let index = 0; index < targetList.length; index++) {
|
|
1206
|
-
|
|
1208
|
+
const item = targetList[index];
|
|
1207
1209
|
that.on(item.target, item.eventType, item.callback);
|
|
1208
1210
|
}
|
|
1209
1211
|
}
|
|
@@ -1212,7 +1214,7 @@
|
|
|
1212
1214
|
*/
|
|
1213
1215
|
function removeDomReadyListener() {
|
|
1214
1216
|
for (let index = 0; index < targetList.length; index++) {
|
|
1215
|
-
|
|
1217
|
+
const item = targetList[index];
|
|
1216
1218
|
that.off(item.target, item.eventType, item.callback);
|
|
1217
1219
|
}
|
|
1218
1220
|
}
|
|
@@ -1263,7 +1265,7 @@
|
|
|
1263
1265
|
}
|
|
1264
1266
|
elementList.forEach((elementItem) => {
|
|
1265
1267
|
/* 获取对象上的事件 */
|
|
1266
|
-
|
|
1268
|
+
const events = elementItem[SymbolEvents] || {};
|
|
1267
1269
|
eventTypeList.forEach((_eventType_) => {
|
|
1268
1270
|
let event = null;
|
|
1269
1271
|
if (details && details instanceof Event) {
|
|
@@ -1303,7 +1305,7 @@
|
|
|
1303
1305
|
* })
|
|
1304
1306
|
* */
|
|
1305
1307
|
click(element, handler, details, useDispatchToTriggerEvent) {
|
|
1306
|
-
|
|
1308
|
+
const DOMUtilsContext = this;
|
|
1307
1309
|
if (typeof element === "string") {
|
|
1308
1310
|
element = PopsCore.document.querySelector(element);
|
|
1309
1311
|
}
|
|
@@ -1332,7 +1334,7 @@
|
|
|
1332
1334
|
* })
|
|
1333
1335
|
* */
|
|
1334
1336
|
blur(element, handler, details, useDispatchToTriggerEvent) {
|
|
1335
|
-
|
|
1337
|
+
const DOMUtilsContext = this;
|
|
1336
1338
|
if (typeof element === "string") {
|
|
1337
1339
|
element = PopsCore.document.querySelector(element);
|
|
1338
1340
|
}
|
|
@@ -1361,7 +1363,7 @@
|
|
|
1361
1363
|
* })
|
|
1362
1364
|
* */
|
|
1363
1365
|
focus(element, handler, details, useDispatchToTriggerEvent) {
|
|
1364
|
-
|
|
1366
|
+
const DOMUtilsContext = this;
|
|
1365
1367
|
if (typeof element === "string") {
|
|
1366
1368
|
element = PopsCore.document.querySelector(element);
|
|
1367
1369
|
}
|
|
@@ -1390,7 +1392,7 @@
|
|
|
1390
1392
|
* })
|
|
1391
1393
|
*/
|
|
1392
1394
|
hover(element, handler, option) {
|
|
1393
|
-
|
|
1395
|
+
const DOMUtilsContext = this;
|
|
1394
1396
|
if (typeof element === "string") {
|
|
1395
1397
|
element = PopsCore.document.querySelector(element);
|
|
1396
1398
|
}
|
|
@@ -1416,7 +1418,7 @@
|
|
|
1416
1418
|
* })
|
|
1417
1419
|
*/
|
|
1418
1420
|
keyup(target, handler, option) {
|
|
1419
|
-
|
|
1421
|
+
const DOMUtilsContext = this;
|
|
1420
1422
|
if (target == null) {
|
|
1421
1423
|
return;
|
|
1422
1424
|
}
|
|
@@ -1441,7 +1443,7 @@
|
|
|
1441
1443
|
* })
|
|
1442
1444
|
*/
|
|
1443
1445
|
keydown(target, handler, option) {
|
|
1444
|
-
|
|
1446
|
+
const DOMUtilsContext = this;
|
|
1445
1447
|
if (target == null) {
|
|
1446
1448
|
return;
|
|
1447
1449
|
}
|
|
@@ -1466,7 +1468,7 @@
|
|
|
1466
1468
|
* })
|
|
1467
1469
|
*/
|
|
1468
1470
|
keypress(target, handler, option) {
|
|
1469
|
-
|
|
1471
|
+
const DOMUtilsContext = this;
|
|
1470
1472
|
if (target == null) {
|
|
1471
1473
|
return;
|
|
1472
1474
|
}
|
|
@@ -1487,6 +1489,7 @@
|
|
|
1487
1489
|
}
|
|
1488
1490
|
if (arguments.length === 1) {
|
|
1489
1491
|
/* 直接阻止事件 */
|
|
1492
|
+
// eslint-disable-next-line prefer-rest-params
|
|
1490
1493
|
return stopEvent(arguments[0]);
|
|
1491
1494
|
}
|
|
1492
1495
|
else {
|
|
@@ -1511,32 +1514,28 @@
|
|
|
1511
1514
|
return $ele?.innerHTML?.trim() === "";
|
|
1512
1515
|
});
|
|
1513
1516
|
}
|
|
1514
|
-
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) ||
|
|
1515
|
-
selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1517
|
+
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) || selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1516
1518
|
// contains 语法
|
|
1517
|
-
|
|
1518
|
-
|
|
1519
|
+
const textMatch = selector.match(/:contains\(("|')(.*)("|')\)$/i);
|
|
1520
|
+
const text = textMatch[2];
|
|
1519
1521
|
selector = selector.replace(/:contains\(("|')(.*)("|')\)$/gi, "");
|
|
1520
1522
|
return Array.from(PopsCore.document.querySelectorAll(selector)).filter(($ele) => {
|
|
1521
|
-
// @ts-ignore
|
|
1522
1523
|
return ($ele?.textContent || $ele?.innerText)?.includes(text);
|
|
1523
1524
|
});
|
|
1524
1525
|
}
|
|
1525
|
-
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) ||
|
|
1526
|
-
selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1526
|
+
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) || selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1527
1527
|
// regexp 语法
|
|
1528
|
-
|
|
1528
|
+
const textMatch = selector.match(/:regexp\(("|')(.*)("|')\)$/i);
|
|
1529
1529
|
let pattern = textMatch[2];
|
|
1530
|
-
|
|
1530
|
+
const flagMatch = pattern.match(/("|'),[\s]*("|')([igm]{0,3})$/i);
|
|
1531
1531
|
let flags = "";
|
|
1532
1532
|
if (flagMatch) {
|
|
1533
1533
|
pattern = pattern.replace(/("|'),[\s]*("|')([igm]{0,3})$/gi, "");
|
|
1534
1534
|
flags = flagMatch[3];
|
|
1535
1535
|
}
|
|
1536
|
-
|
|
1536
|
+
const regexp = new RegExp(pattern, flags);
|
|
1537
1537
|
selector = selector.replace(/:regexp\(("|')(.*)("|')\)$/gi, "");
|
|
1538
1538
|
return Array.from(PopsCore.document.querySelectorAll(selector)).filter(($ele) => {
|
|
1539
|
-
// @ts-ignore
|
|
1540
1539
|
return Boolean(($ele?.textContent || $ele?.innerText)?.match(regexp));
|
|
1541
1540
|
});
|
|
1542
1541
|
}
|
|
@@ -1576,33 +1575,29 @@
|
|
|
1576
1575
|
selector = selector.replace(/:empty$/gi, "");
|
|
1577
1576
|
return $el.matches(selector) && $el?.innerHTML?.trim() === "";
|
|
1578
1577
|
}
|
|
1579
|
-
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) ||
|
|
1580
|
-
selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1578
|
+
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) || selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1581
1579
|
// contains 语法
|
|
1582
|
-
|
|
1583
|
-
|
|
1580
|
+
const textMatch = selector.match(/:contains\(("|')(.*)("|')\)$/i);
|
|
1581
|
+
const text = textMatch[2];
|
|
1584
1582
|
selector = selector.replace(/:contains\(("|')(.*)("|')\)$/gi, "");
|
|
1585
|
-
// @ts-ignore
|
|
1586
1583
|
let content = $el?.textContent || $el?.innerText;
|
|
1587
1584
|
if (typeof content !== "string") {
|
|
1588
1585
|
content = "";
|
|
1589
1586
|
}
|
|
1590
1587
|
return $el.matches(selector) && content?.includes(text);
|
|
1591
1588
|
}
|
|
1592
|
-
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) ||
|
|
1593
|
-
selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1589
|
+
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) || selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1594
1590
|
// regexp 语法
|
|
1595
|
-
|
|
1591
|
+
const textMatch = selector.match(/:regexp\(("|')(.*)("|')\)$/i);
|
|
1596
1592
|
let pattern = textMatch[2];
|
|
1597
|
-
|
|
1593
|
+
const flagMatch = pattern.match(/("|'),[\s]*("|')([igm]{0,3})$/i);
|
|
1598
1594
|
let flags = "";
|
|
1599
1595
|
if (flagMatch) {
|
|
1600
1596
|
pattern = pattern.replace(/("|'),[\s]*("|')([igm]{0,3})$/gi, "");
|
|
1601
1597
|
flags = flagMatch[3];
|
|
1602
1598
|
}
|
|
1603
|
-
|
|
1599
|
+
const regexp = new RegExp(pattern, flags);
|
|
1604
1600
|
selector = selector.replace(/:regexp\(("|')(.*)("|')\)$/gi, "");
|
|
1605
|
-
// @ts-ignore
|
|
1606
1601
|
let content = $el?.textContent || $el?.innerText;
|
|
1607
1602
|
if (typeof content !== "string") {
|
|
1608
1603
|
content = "";
|
|
@@ -1619,45 +1614,41 @@
|
|
|
1619
1614
|
if (selector.match(/[^\s]{1}:empty$/gi)) {
|
|
1620
1615
|
// empty 语法
|
|
1621
1616
|
selector = selector.replace(/:empty$/gi, "");
|
|
1622
|
-
|
|
1617
|
+
const $closest = $el?.closest(selector);
|
|
1623
1618
|
if ($closest && $closest?.innerHTML?.trim() === "") {
|
|
1624
1619
|
return $closest;
|
|
1625
1620
|
}
|
|
1626
1621
|
return null;
|
|
1627
1622
|
}
|
|
1628
|
-
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) ||
|
|
1629
|
-
selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1623
|
+
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) || selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1630
1624
|
// contains 语法
|
|
1631
|
-
|
|
1632
|
-
|
|
1625
|
+
const textMatch = selector.match(/:contains\(("|')(.*)("|')\)$/i);
|
|
1626
|
+
const text = textMatch[2];
|
|
1633
1627
|
selector = selector.replace(/:contains\(("|')(.*)("|')\)$/gi, "");
|
|
1634
|
-
|
|
1628
|
+
const $closest = $el?.closest(selector);
|
|
1635
1629
|
if ($closest) {
|
|
1636
|
-
|
|
1637
|
-
let content = $el?.textContent || $el?.innerText;
|
|
1630
|
+
const content = $el?.textContent || $el?.innerText;
|
|
1638
1631
|
if (typeof content === "string" && content.includes(text)) {
|
|
1639
1632
|
return $closest;
|
|
1640
1633
|
}
|
|
1641
1634
|
}
|
|
1642
1635
|
return null;
|
|
1643
1636
|
}
|
|
1644
|
-
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) ||
|
|
1645
|
-
selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1637
|
+
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) || selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1646
1638
|
// regexp 语法
|
|
1647
|
-
|
|
1639
|
+
const textMatch = selector.match(/:regexp\(("|')(.*)("|')\)$/i);
|
|
1648
1640
|
let pattern = textMatch[2];
|
|
1649
|
-
|
|
1641
|
+
const flagMatch = pattern.match(/("|'),[\s]*("|')([igm]{0,3})$/i);
|
|
1650
1642
|
let flags = "";
|
|
1651
1643
|
if (flagMatch) {
|
|
1652
1644
|
pattern = pattern.replace(/("|'),[\s]*("|')([igm]{0,3})$/gi, "");
|
|
1653
1645
|
flags = flagMatch[3];
|
|
1654
1646
|
}
|
|
1655
|
-
|
|
1647
|
+
const regexp = new RegExp(pattern, flags);
|
|
1656
1648
|
selector = selector.replace(/:regexp\(("|')(.*)("|')\)$/gi, "");
|
|
1657
|
-
|
|
1649
|
+
const $closest = $el?.closest(selector);
|
|
1658
1650
|
if ($closest) {
|
|
1659
|
-
|
|
1660
|
-
let content = $el?.textContent || $el?.innerText;
|
|
1651
|
+
const content = $el?.textContent || $el?.innerText;
|
|
1661
1652
|
if (typeof content === "string" && content.match(regexp)) {
|
|
1662
1653
|
return $closest;
|
|
1663
1654
|
}
|
|
@@ -1666,7 +1657,7 @@
|
|
|
1666
1657
|
}
|
|
1667
1658
|
else {
|
|
1668
1659
|
// 普通语法
|
|
1669
|
-
|
|
1660
|
+
const $closest = $el?.closest(selector);
|
|
1670
1661
|
return $closest;
|
|
1671
1662
|
}
|
|
1672
1663
|
}
|
|
@@ -1686,13 +1677,13 @@
|
|
|
1686
1677
|
* @param calcScroll 计算滚动距离
|
|
1687
1678
|
*/
|
|
1688
1679
|
offset(element, calcScroll = true) {
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1680
|
+
const rect = element.getBoundingClientRect();
|
|
1681
|
+
const win = element.ownerDocument.defaultView;
|
|
1682
|
+
const resultRect = new DOMRect(calcScroll ? parseFloat((rect.left + (win?.pageXOffset || 0)).toString()) : rect.left, calcScroll ? parseFloat((rect.top + (win?.pageYOffset || 0)).toString()) : rect.top, rect.width, rect.height);
|
|
1692
1683
|
return resultRect;
|
|
1693
1684
|
}
|
|
1694
1685
|
width(element, isShow = false, parent) {
|
|
1695
|
-
|
|
1686
|
+
const DOMUtilsContext = this;
|
|
1696
1687
|
if (typeof element === "string") {
|
|
1697
1688
|
element = PopsCore.document.querySelector(element);
|
|
1698
1689
|
}
|
|
@@ -1717,11 +1708,11 @@
|
|
|
1717
1708
|
}
|
|
1718
1709
|
/* 如果从css里获取到的值不是大于0 可能是auto 则通过offsetWidth来进行计算 */
|
|
1719
1710
|
if (element.offsetWidth > 0) {
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1711
|
+
const borderLeftWidth = popsDOMUtils.getStyleValue(element, "borderLeftWidth");
|
|
1712
|
+
const borderRightWidth = popsDOMUtils.getStyleValue(element, "borderRightWidth");
|
|
1713
|
+
const paddingLeft = popsDOMUtils.getStyleValue(element, "paddingLeft");
|
|
1714
|
+
const paddingRight = popsDOMUtils.getStyleValue(element, "paddingRight");
|
|
1715
|
+
const backHeight = parseFloat(element.offsetWidth.toString()) -
|
|
1725
1716
|
parseFloat(borderLeftWidth.toString()) -
|
|
1726
1717
|
parseFloat(borderRightWidth.toString()) -
|
|
1727
1718
|
parseFloat(paddingLeft.toString()) -
|
|
@@ -1733,14 +1724,14 @@
|
|
|
1733
1724
|
else {
|
|
1734
1725
|
/* 未显示 */
|
|
1735
1726
|
element = element;
|
|
1736
|
-
|
|
1737
|
-
|
|
1727
|
+
const { cloneNode, recovery } = popsDOMUtils.showElement(element, parent);
|
|
1728
|
+
const width = DOMUtilsContext.width(cloneNode, true, parent);
|
|
1738
1729
|
recovery();
|
|
1739
1730
|
return width;
|
|
1740
1731
|
}
|
|
1741
1732
|
}
|
|
1742
1733
|
height(element, isShow = false, parent) {
|
|
1743
|
-
|
|
1734
|
+
const DOMUtilsContext = this;
|
|
1744
1735
|
if (popsUtils.isWin(element)) {
|
|
1745
1736
|
return PopsCore.window.document.documentElement.clientHeight;
|
|
1746
1737
|
}
|
|
@@ -1765,11 +1756,11 @@
|
|
|
1765
1756
|
}
|
|
1766
1757
|
/* 如果从css里获取到的值不是大于0 可能是auto 则通过offsetHeight来进行计算 */
|
|
1767
1758
|
if (element.offsetHeight > 0) {
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1759
|
+
const borderTopWidth = popsDOMUtils.getStyleValue(element, "borderTopWidth");
|
|
1760
|
+
const borderBottomWidth = popsDOMUtils.getStyleValue(element, "borderBottomWidth");
|
|
1761
|
+
const paddingTop = popsDOMUtils.getStyleValue(element, "paddingTop");
|
|
1762
|
+
const paddingBottom = popsDOMUtils.getStyleValue(element, "paddingBottom");
|
|
1763
|
+
const backHeight = parseFloat(element.offsetHeight.toString()) -
|
|
1773
1764
|
parseFloat(borderTopWidth.toString()) -
|
|
1774
1765
|
parseFloat(borderBottomWidth.toString()) -
|
|
1775
1766
|
parseFloat(paddingTop.toString()) -
|
|
@@ -1781,14 +1772,14 @@
|
|
|
1781
1772
|
else {
|
|
1782
1773
|
/* 未显示 */
|
|
1783
1774
|
element = element;
|
|
1784
|
-
|
|
1785
|
-
|
|
1775
|
+
const { cloneNode, recovery } = popsDOMUtils.showElement(element, parent);
|
|
1776
|
+
const height = DOMUtilsContext.height(cloneNode, true, parent);
|
|
1786
1777
|
recovery();
|
|
1787
1778
|
return height;
|
|
1788
1779
|
}
|
|
1789
1780
|
}
|
|
1790
1781
|
outerWidth(element, isShow = false, parent) {
|
|
1791
|
-
|
|
1782
|
+
const DOMUtilsContext = this;
|
|
1792
1783
|
if (popsUtils.isWin(element)) {
|
|
1793
1784
|
return PopsCore.window.innerWidth;
|
|
1794
1785
|
}
|
|
@@ -1800,40 +1791,36 @@
|
|
|
1800
1791
|
}
|
|
1801
1792
|
element = element;
|
|
1802
1793
|
if (isShow || (!isShow && popsDOMUtils.isShow(element))) {
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1794
|
+
const style = getComputedStyle(element, null);
|
|
1795
|
+
const marginLeft = popsDOMUtils.getStyleValue(style, "marginLeft");
|
|
1796
|
+
const marginRight = popsDOMUtils.getStyleValue(style, "marginRight");
|
|
1806
1797
|
return element.offsetWidth + marginLeft + marginRight;
|
|
1807
1798
|
}
|
|
1808
1799
|
else {
|
|
1809
|
-
|
|
1810
|
-
|
|
1800
|
+
const { cloneNode, recovery } = popsDOMUtils.showElement(element, parent);
|
|
1801
|
+
const outerWidth = DOMUtilsContext.outerWidth(cloneNode, true, parent);
|
|
1811
1802
|
recovery();
|
|
1812
1803
|
return outerWidth;
|
|
1813
1804
|
}
|
|
1814
1805
|
}
|
|
1815
1806
|
outerHeight(element, isShow = false, parent) {
|
|
1816
|
-
|
|
1807
|
+
const DOMUtilsContext = this;
|
|
1817
1808
|
if (popsUtils.isWin(element)) {
|
|
1818
1809
|
return PopsCore.window.innerHeight;
|
|
1819
1810
|
}
|
|
1820
1811
|
if (typeof element === "string") {
|
|
1821
1812
|
element = PopsCore.document.querySelector(element);
|
|
1822
1813
|
}
|
|
1823
|
-
if (element == null) {
|
|
1824
|
-
// @ts-ignore
|
|
1825
|
-
return;
|
|
1826
|
-
}
|
|
1827
1814
|
element = element;
|
|
1828
1815
|
if (isShow || (!isShow && popsDOMUtils.isShow(element))) {
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1816
|
+
const style = getComputedStyle(element, null);
|
|
1817
|
+
const marginTop = popsDOMUtils.getStyleValue(style, "marginTop");
|
|
1818
|
+
const marginBottom = popsDOMUtils.getStyleValue(style, "marginBottom");
|
|
1832
1819
|
return element.offsetHeight + marginTop + marginBottom;
|
|
1833
1820
|
}
|
|
1834
1821
|
else {
|
|
1835
|
-
|
|
1836
|
-
|
|
1822
|
+
const { cloneNode, recovery } = popsDOMUtils.showElement(element, parent);
|
|
1823
|
+
const outerHeight = DOMUtilsContext.outerHeight(cloneNode, true, parent);
|
|
1837
1824
|
recovery();
|
|
1838
1825
|
return outerHeight;
|
|
1839
1826
|
}
|
|
@@ -1896,13 +1883,11 @@
|
|
|
1896
1883
|
* 把纯数字没有px的加上
|
|
1897
1884
|
*/
|
|
1898
1885
|
function handlePixe(propertyName, propertyValue) {
|
|
1899
|
-
|
|
1886
|
+
const allowAddPixe = ["width", "height", "top", "left", "right", "bottom", "font-size"];
|
|
1900
1887
|
if (typeof propertyValue === "number") {
|
|
1901
1888
|
propertyValue = propertyValue.toString();
|
|
1902
1889
|
}
|
|
1903
|
-
if (typeof propertyValue === "string" &&
|
|
1904
|
-
allowAddPixe.includes(propertyName) &&
|
|
1905
|
-
propertyValue.match(/[0-9]$/gi)) {
|
|
1890
|
+
if (typeof propertyValue === "string" && allowAddPixe.includes(propertyName) && propertyValue.match(/[0-9]$/gi)) {
|
|
1906
1891
|
propertyValue = propertyValue + "px";
|
|
1907
1892
|
}
|
|
1908
1893
|
return propertyValue;
|
|
@@ -1913,7 +1898,7 @@
|
|
|
1913
1898
|
if (element == null) {
|
|
1914
1899
|
return;
|
|
1915
1900
|
}
|
|
1916
|
-
|
|
1901
|
+
const setStyleProperty = (propertyName, propertyValue) => {
|
|
1917
1902
|
if (typeof propertyValue === "string" && propertyValue.trim().endsWith("!important")) {
|
|
1918
1903
|
propertyValue = propertyValue
|
|
1919
1904
|
.trim()
|
|
@@ -1935,8 +1920,8 @@
|
|
|
1935
1920
|
}
|
|
1936
1921
|
}
|
|
1937
1922
|
else if (typeof property === "object") {
|
|
1938
|
-
for (
|
|
1939
|
-
|
|
1923
|
+
for (const prop in property) {
|
|
1924
|
+
const value = property[prop];
|
|
1940
1925
|
setStyleProperty(prop, value);
|
|
1941
1926
|
}
|
|
1942
1927
|
}
|
|
@@ -1966,7 +1951,7 @@
|
|
|
1966
1951
|
property,
|
|
1967
1952
|
/** 自定义属性 */
|
|
1968
1953
|
attributes) {
|
|
1969
|
-
|
|
1954
|
+
const tempElement = PopsCore.document.createElement(tagName);
|
|
1970
1955
|
if (typeof property === "string") {
|
|
1971
1956
|
PopsSafeUtils.setSafeHTML(tempElement, property);
|
|
1972
1957
|
return tempElement;
|
|
@@ -1978,13 +1963,12 @@
|
|
|
1978
1963
|
attributes = {};
|
|
1979
1964
|
}
|
|
1980
1965
|
Object.keys(property).forEach((key) => {
|
|
1981
|
-
|
|
1966
|
+
const value = property[key];
|
|
1982
1967
|
if (key === "innerHTML") {
|
|
1983
1968
|
PopsSafeUtils.setSafeHTML(tempElement, value);
|
|
1984
1969
|
return;
|
|
1985
1970
|
}
|
|
1986
|
-
|
|
1987
|
-
tempElement[key] = value;
|
|
1971
|
+
Reflect.set(tempElement, key, value);
|
|
1988
1972
|
});
|
|
1989
1973
|
Object.keys(attributes).forEach((key) => {
|
|
1990
1974
|
let value = attributes[key];
|
|
@@ -2008,7 +1992,7 @@
|
|
|
2008
1992
|
parseTextToDOM(elementString) {
|
|
2009
1993
|
/* 去除前后的换行和空格 */
|
|
2010
1994
|
elementString = elementString.replace(/^[\n|\s]*/g, "").replace(/[\n|\s]*$/g, "");
|
|
2011
|
-
|
|
1995
|
+
const targetElement = this.createElement("div", {
|
|
2012
1996
|
innerHTML: elementString,
|
|
2013
1997
|
});
|
|
2014
1998
|
return targetElement.firstChild;
|
|
@@ -2046,16 +2030,21 @@
|
|
|
2046
2030
|
selectionEnd = Math.min(input.value.length, selectionEnd);
|
|
2047
2031
|
// If available (thus IE), use the createTextRange method
|
|
2048
2032
|
if (typeof input.createTextRange == "function") {
|
|
2049
|
-
|
|
2033
|
+
const range = input.createTextRange();
|
|
2050
2034
|
range.collapse(true);
|
|
2051
2035
|
range.moveStart("character", selectionStart);
|
|
2052
2036
|
range.moveEnd("character", selectionEnd - selectionStart);
|
|
2053
2037
|
return range.getBoundingClientRect();
|
|
2054
2038
|
}
|
|
2055
2039
|
// createTextRange is not supported, create a fake text range
|
|
2056
|
-
|
|
2040
|
+
const offset = getInputOffset();
|
|
2041
|
+
let topPos = offset.top;
|
|
2042
|
+
let leftPos = offset.left;
|
|
2043
|
+
const width = getInputCSS("width", true);
|
|
2044
|
+
const height = getInputCSS("height", true);
|
|
2057
2045
|
// Styles to simulate a node in an input field
|
|
2058
|
-
|
|
2046
|
+
let cssDefaultStyles = "white-space:pre;padding:0;margin:0;";
|
|
2047
|
+
const listOfModifiers = [
|
|
2059
2048
|
"direction",
|
|
2060
2049
|
"font-family",
|
|
2061
2050
|
"font-size",
|
|
@@ -2071,26 +2060,21 @@
|
|
|
2071
2060
|
"word-wrap",
|
|
2072
2061
|
"word-spacing",
|
|
2073
2062
|
];
|
|
2074
|
-
// @ts-ignore
|
|
2075
2063
|
topPos += getInputCSS("padding-top", true);
|
|
2076
|
-
// @ts-ignore
|
|
2077
2064
|
topPos += getInputCSS("border-top-width", true);
|
|
2078
|
-
// @ts-ignore
|
|
2079
2065
|
leftPos += getInputCSS("padding-left", true);
|
|
2080
|
-
// @ts-ignore
|
|
2081
2066
|
leftPos += getInputCSS("border-left-width", true);
|
|
2082
2067
|
leftPos += 1; //Seems to be necessary
|
|
2083
|
-
for (
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
cssDefaultStyles += property + ":" + getInputCSS(property) + ";";
|
|
2068
|
+
for (let i = 0; i < listOfModifiers.length; i++) {
|
|
2069
|
+
const property = listOfModifiers[i];
|
|
2070
|
+
cssDefaultStyles += property + ":" + getInputCSS(property, false) + ";";
|
|
2087
2071
|
}
|
|
2088
2072
|
// End of CSS variable checks
|
|
2089
2073
|
// 不能为空,不然获取不到高度
|
|
2090
|
-
|
|
2074
|
+
const text = input.value || "G", textLen = text.length, fakeClone = document.createElement("div");
|
|
2091
2075
|
if (selectionStart > 0)
|
|
2092
2076
|
appendPart(0, selectionStart);
|
|
2093
|
-
|
|
2077
|
+
const fakeRange = appendPart(selectionStart, selectionEnd);
|
|
2094
2078
|
if (textLen > selectionEnd)
|
|
2095
2079
|
appendPart(selectionEnd, textLen);
|
|
2096
2080
|
// Styles to inherit the font styles of the element
|
|
@@ -2102,7 +2086,7 @@
|
|
|
2102
2086
|
fakeClone.style.width = width + "px";
|
|
2103
2087
|
fakeClone.style.height = height + "px";
|
|
2104
2088
|
PopsCore.document.body.appendChild(fakeClone);
|
|
2105
|
-
|
|
2089
|
+
const returnValue = fakeRange.getBoundingClientRect(); //Get rect
|
|
2106
2090
|
if (!debug)
|
|
2107
2091
|
fakeClone.parentNode.removeChild(fakeClone); //Remove temp
|
|
2108
2092
|
return returnValue;
|
|
@@ -2113,7 +2097,7 @@
|
|
|
2113
2097
|
* @param end
|
|
2114
2098
|
*/
|
|
2115
2099
|
function appendPart(start, end) {
|
|
2116
|
-
|
|
2100
|
+
const span = document.createElement("span");
|
|
2117
2101
|
span.style.cssText = cssDefaultStyles; //Force styles to prevent unexpected results
|
|
2118
2102
|
span.textContent = text.substring(start, end);
|
|
2119
2103
|
fakeClone.appendChild(span);
|
|
@@ -2121,35 +2105,31 @@
|
|
|
2121
2105
|
}
|
|
2122
2106
|
// Computing offset position
|
|
2123
2107
|
function getInputOffset() {
|
|
2124
|
-
|
|
2108
|
+
const body = document.body, win = document.defaultView, docElem = document.documentElement, box = document.createElement("div");
|
|
2125
2109
|
box.style.paddingLeft = box.style.width = "1px";
|
|
2126
2110
|
body.appendChild(box);
|
|
2127
|
-
|
|
2111
|
+
const isBoxModel = box.offsetWidth == 2;
|
|
2128
2112
|
body.removeChild(box);
|
|
2129
|
-
|
|
2130
|
-
|
|
2131
|
-
var clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, scrollTop =
|
|
2132
|
-
// @ts-ignore
|
|
2133
|
-
win.pageYOffset || (isBoxModel && docElem.scrollTop) || body.scrollTop, scrollLeft =
|
|
2134
|
-
// @ts-ignore
|
|
2135
|
-
win.pageXOffset || (isBoxModel && docElem.scrollLeft) || body.scrollLeft;
|
|
2113
|
+
const boxRect = input.getBoundingClientRect();
|
|
2114
|
+
const clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, scrollTop = win?.pageYOffset || (isBoxModel && docElem.scrollTop) || body.scrollTop, scrollLeft = win?.pageXOffset || (isBoxModel && docElem.scrollLeft) || body.scrollLeft;
|
|
2136
2115
|
return {
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
// @ts-ignore
|
|
2140
|
-
left: box.left + scrollLeft - clientLeft,
|
|
2116
|
+
top: boxRect.top + scrollTop - clientTop,
|
|
2117
|
+
left: boxRect.left + scrollLeft - clientLeft,
|
|
2141
2118
|
};
|
|
2142
2119
|
}
|
|
2143
2120
|
/**
|
|
2144
2121
|
*
|
|
2145
2122
|
* @param prop
|
|
2146
2123
|
* @param isnumber
|
|
2147
|
-
* @returns
|
|
2148
2124
|
*/
|
|
2149
2125
|
function getInputCSS(prop, isnumber) {
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2126
|
+
const val = PopsCore.document.defaultView.getComputedStyle(input, null).getPropertyValue(prop);
|
|
2127
|
+
if (isnumber) {
|
|
2128
|
+
return parseFloat(val);
|
|
2129
|
+
}
|
|
2130
|
+
else {
|
|
2131
|
+
return val;
|
|
2132
|
+
}
|
|
2153
2133
|
}
|
|
2154
2134
|
}
|
|
2155
2135
|
/**
|
|
@@ -2181,7 +2161,7 @@
|
|
|
2181
2161
|
}
|
|
2182
2162
|
parseHTML(html, useParser = false, isComplete = false) {
|
|
2183
2163
|
function parseHTMLByDOMParser() {
|
|
2184
|
-
|
|
2164
|
+
const parser = new DOMParser();
|
|
2185
2165
|
if (isComplete) {
|
|
2186
2166
|
return parser.parseFromString(html, "text/html");
|
|
2187
2167
|
}
|
|
@@ -2190,7 +2170,7 @@
|
|
|
2190
2170
|
}
|
|
2191
2171
|
}
|
|
2192
2172
|
function parseHTMLByCreateDom() {
|
|
2193
|
-
|
|
2173
|
+
const tempDIV = PopsCore.document.createElement("div");
|
|
2194
2174
|
PopsSafeUtils.setSafeHTML(tempDIV, html);
|
|
2195
2175
|
if (isComplete) {
|
|
2196
2176
|
return tempDIV;
|
|
@@ -2232,7 +2212,7 @@
|
|
|
2232
2212
|
}
|
|
2233
2213
|
if (Array.isArray(content) || content instanceof NodeList) {
|
|
2234
2214
|
/* 数组 */
|
|
2235
|
-
|
|
2215
|
+
const fragment = PopsCore.document.createDocumentFragment();
|
|
2236
2216
|
content.forEach((ele) => {
|
|
2237
2217
|
if (typeof ele === "string") {
|
|
2238
2218
|
ele = this.parseHTML(ele, true, false);
|
|
@@ -2282,11 +2262,11 @@
|
|
|
2282
2262
|
*/
|
|
2283
2263
|
showElement($ele, ownParent) {
|
|
2284
2264
|
/** 克隆元素 */
|
|
2285
|
-
|
|
2265
|
+
const $cloneNode = $ele.cloneNode(true);
|
|
2286
2266
|
$cloneNode.setAttribute("style", "visibility: hidden !important;display:block !important;");
|
|
2287
2267
|
let $parent = PopsCore.document.documentElement;
|
|
2288
2268
|
// 这里需要的是先获取元素的父节点,把元素同样添加到父节点中
|
|
2289
|
-
|
|
2269
|
+
const $root = $ele.getRootNode();
|
|
2290
2270
|
if (ownParent == null) {
|
|
2291
2271
|
if ($root == $ele) {
|
|
2292
2272
|
// 未添加到任意节点中,那么直接添加到页面中去
|
|
@@ -2334,7 +2314,7 @@
|
|
|
2334
2314
|
}
|
|
2335
2315
|
styles = view.getComputedStyle(element);
|
|
2336
2316
|
}
|
|
2337
|
-
|
|
2317
|
+
const value = parseFloat(styles[styleName]);
|
|
2338
2318
|
if (isNaN(value)) {
|
|
2339
2319
|
return 0;
|
|
2340
2320
|
}
|
|
@@ -2394,10 +2374,9 @@
|
|
|
2394
2374
|
* @returns
|
|
2395
2375
|
*/
|
|
2396
2376
|
getKeyFrames(sheet) {
|
|
2397
|
-
|
|
2377
|
+
const result = {};
|
|
2398
2378
|
Object.keys(sheet.cssRules).forEach((key) => {
|
|
2399
|
-
if (sheet.cssRules[key].type === 7 &&
|
|
2400
|
-
sheet.cssRules[key].name.startsWith("pops-anim-")) {
|
|
2379
|
+
if (sheet.cssRules[key].type === 7 && sheet.cssRules[key].name.startsWith("pops-anim-")) {
|
|
2401
2380
|
result[sheet.cssRules[key].name] = sheet.cssRules[key];
|
|
2402
2381
|
}
|
|
2403
2382
|
});
|
|
@@ -2421,7 +2400,7 @@
|
|
|
2421
2400
|
*/
|
|
2422
2401
|
str) => {
|
|
2423
2402
|
let hexs = "";
|
|
2424
|
-
|
|
2403
|
+
const reg = /^#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/;
|
|
2425
2404
|
if (!reg.test(str)) {
|
|
2426
2405
|
console.warn("输入错误的hex");
|
|
2427
2406
|
return "";
|
|
@@ -2448,12 +2427,12 @@
|
|
|
2448
2427
|
* 蓝色
|
|
2449
2428
|
*/
|
|
2450
2429
|
b) => {
|
|
2451
|
-
|
|
2430
|
+
const reg = /^\d{1,3}$/;
|
|
2452
2431
|
if (!reg.test(r) || !reg.test(g) || !reg.test(b)) {
|
|
2453
2432
|
console.warn("输入错误的rgb颜色值");
|
|
2454
2433
|
return "";
|
|
2455
2434
|
}
|
|
2456
|
-
|
|
2435
|
+
const hexs = [r.toString(16), g.toString(16), b.toString(16)];
|
|
2457
2436
|
for (let i = 0; i < 3; i++)
|
|
2458
2437
|
if (hexs[i].length == 1)
|
|
2459
2438
|
hexs[i] = `0${hexs[i]}`;
|
|
@@ -2471,12 +2450,12 @@
|
|
|
2471
2450
|
* 加深的程度,限0-1之间
|
|
2472
2451
|
*/
|
|
2473
2452
|
level) => {
|
|
2474
|
-
|
|
2453
|
+
const reg = /^#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/;
|
|
2475
2454
|
if (!reg.test(color)) {
|
|
2476
2455
|
console.warn("输入错误的hex颜色值");
|
|
2477
2456
|
return "";
|
|
2478
2457
|
}
|
|
2479
|
-
|
|
2458
|
+
const rgb = useChangeColor().hexToRgb(color);
|
|
2480
2459
|
for (let i = 0; i < 3; i++)
|
|
2481
2460
|
rgb[i] = Math.floor(rgb[i] * (1 - level));
|
|
2482
2461
|
return useChangeColor().rgbToHex(rgb[0], rgb[1], rgb[2]);
|
|
@@ -2493,12 +2472,12 @@
|
|
|
2493
2472
|
* 加深的程度,限0-1之间
|
|
2494
2473
|
*/
|
|
2495
2474
|
level) => {
|
|
2496
|
-
|
|
2475
|
+
const reg = /^#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/;
|
|
2497
2476
|
if (!reg.test(color)) {
|
|
2498
2477
|
console.warn("输入错误的hex颜色值");
|
|
2499
2478
|
return "";
|
|
2500
2479
|
}
|
|
2501
|
-
|
|
2480
|
+
const rgb = useChangeColor().hexToRgb(color);
|
|
2502
2481
|
for (let i = 0; i < 3; i++)
|
|
2503
2482
|
rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i]);
|
|
2504
2483
|
return useChangeColor().rgbToHex(rgb[0], rgb[1], rgb[2]);
|
|
@@ -2519,9 +2498,11 @@
|
|
|
2519
2498
|
getTransform(element) {
|
|
2520
2499
|
let transform_left = 0;
|
|
2521
2500
|
let transform_top = 0;
|
|
2522
|
-
|
|
2501
|
+
const elementTransform = PopsCore.globalThis.getComputedStyle(element).transform;
|
|
2523
2502
|
if (elementTransform !== "none" && elementTransform != null && elementTransform !== "") {
|
|
2524
|
-
|
|
2503
|
+
const elementTransformMatch = elementTransform.match(/\((.+)\)/);
|
|
2504
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2505
|
+
const elementTransformSplit = elementTransformMatch?.[1]?.split?.(",");
|
|
2525
2506
|
transform_left = Math.abs(parseInt(elementTransformSplit[4]));
|
|
2526
2507
|
transform_top = Math.abs(parseInt(elementTransformSplit[5]));
|
|
2527
2508
|
}
|
|
@@ -2535,15 +2516,15 @@
|
|
|
2535
2516
|
*/
|
|
2536
2517
|
onInput($el, callback, option) {
|
|
2537
2518
|
let isComposite = false;
|
|
2538
|
-
|
|
2519
|
+
const __callback = async (event) => {
|
|
2539
2520
|
if (isComposite)
|
|
2540
2521
|
return;
|
|
2541
2522
|
await callback(event);
|
|
2542
2523
|
};
|
|
2543
|
-
|
|
2524
|
+
const __composition_start_callback = () => {
|
|
2544
2525
|
isComposite = true;
|
|
2545
2526
|
};
|
|
2546
|
-
|
|
2527
|
+
const __composition_end_callback = () => {
|
|
2547
2528
|
isComposite = false;
|
|
2548
2529
|
this.trigger($el, "input", {
|
|
2549
2530
|
isComposite,
|
|
@@ -2587,10 +2568,10 @@
|
|
|
2587
2568
|
* @param zIndex
|
|
2588
2569
|
*/
|
|
2589
2570
|
createAnim(guid, type, config, html = "", bottomBtnHTML = "", zIndex) {
|
|
2590
|
-
|
|
2571
|
+
const __config = config;
|
|
2591
2572
|
let popsAnimStyle = "";
|
|
2592
2573
|
let popsStyle = "";
|
|
2593
|
-
|
|
2574
|
+
const popsPosition = __config.position || "";
|
|
2594
2575
|
if (config.zIndex != null) {
|
|
2595
2576
|
popsAnimStyle += `z-index: ${zIndex};`;
|
|
2596
2577
|
popsStyle += `z-index: ${zIndex};`;
|
|
@@ -2601,7 +2582,7 @@
|
|
|
2601
2582
|
if (__config.height != null) {
|
|
2602
2583
|
popsStyle += `height: ${__config.height};`;
|
|
2603
2584
|
}
|
|
2604
|
-
|
|
2585
|
+
const hasBottomBtn = bottomBtnHTML.trim() === "" ? false : true;
|
|
2605
2586
|
return /*html*/ `
|
|
2606
2587
|
<div class="pops-anim" anim="${__config.animation || ""}" style="${popsAnimStyle}" data-guid="${guid}">${config.style != null ? `<style tyle="text/css">${config.style}</style>` : ""}
|
|
2607
2588
|
<div class="pops ${config.class || ""}" data-bottom-btn="${hasBottomBtn}" type-value="${type}" style="${popsStyle}" position="${popsPosition}" data-guid="${guid}">${html}</div>
|
|
@@ -2616,14 +2597,14 @@
|
|
|
2616
2597
|
if (!config.btn) {
|
|
2617
2598
|
return "";
|
|
2618
2599
|
}
|
|
2619
|
-
|
|
2600
|
+
const confirm_config = config;
|
|
2620
2601
|
if (type !== "iframe" && !confirm_config.btn?.close?.enable) {
|
|
2621
2602
|
return "";
|
|
2622
2603
|
}
|
|
2623
2604
|
let resultHTML = "";
|
|
2624
2605
|
// let btnStyle = "";
|
|
2625
2606
|
let closeHTML = "";
|
|
2626
|
-
|
|
2607
|
+
const iframe_config = config;
|
|
2627
2608
|
if (type === "iframe" && iframe_config.topRightButton?.trim() !== "") {
|
|
2628
2609
|
/* iframe的 */
|
|
2629
2610
|
let topRightButtonHTML = "";
|
|
@@ -2673,7 +2654,7 @@
|
|
|
2673
2654
|
// 未设置btn参数
|
|
2674
2655
|
return "";
|
|
2675
2656
|
}
|
|
2676
|
-
|
|
2657
|
+
const confirm_config = config;
|
|
2677
2658
|
if (!(config.btn?.ok?.enable || confirm_config.btn?.cancel?.enable || confirm_config.btn?.other?.enable)) {
|
|
2678
2659
|
// 确定、取消、其它按钮都未启用直接返回
|
|
2679
2660
|
return "";
|
|
@@ -2699,7 +2680,7 @@
|
|
|
2699
2680
|
okButtonSizeClassName = "pops-button-" + config.btn.ok.size;
|
|
2700
2681
|
}
|
|
2701
2682
|
let okIconHTML = "";
|
|
2702
|
-
|
|
2683
|
+
const okIcon = confirm_config.btn.ok.icon;
|
|
2703
2684
|
if (okIcon !== "") {
|
|
2704
2685
|
// 判断图标是否是svg库内的
|
|
2705
2686
|
let iconHTML = "";
|
|
@@ -2732,7 +2713,7 @@
|
|
|
2732
2713
|
cancelButtonSizeClassName = "pops-button-" + confirm_config.btn.cancel.size;
|
|
2733
2714
|
}
|
|
2734
2715
|
let cancelIconHTML = "";
|
|
2735
|
-
|
|
2716
|
+
const cancelIcon = confirm_config.btn.cancel.icon;
|
|
2736
2717
|
if (cancelIcon !== "") {
|
|
2737
2718
|
let iconHTML = "";
|
|
2738
2719
|
// 判断图标是否是svg库内的
|
|
@@ -2765,7 +2746,7 @@
|
|
|
2765
2746
|
otherButtonSizeClassName = "pops-button-" + confirm_config.btn.other.size;
|
|
2766
2747
|
}
|
|
2767
2748
|
let otherIconHTML = "";
|
|
2768
|
-
|
|
2749
|
+
const otherIcon = confirm_config.btn.other.icon;
|
|
2769
2750
|
if (otherIcon !== "") {
|
|
2770
2751
|
let iconHTML = "";
|
|
2771
2752
|
// 判断图标是否是svg库内的
|
|
@@ -2825,37 +2806,37 @@
|
|
|
2825
2806
|
},
|
|
2826
2807
|
};
|
|
2827
2808
|
|
|
2828
|
-
var indexCSS = "@charset \"utf-8\";\n.pops * {\n
|
|
2809
|
+
var indexCSS = "@charset \"utf-8\";\n.pops * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n -webkit-tap-highlight-color: transparent;\n /* 代替::-webkit-scrollbar */\n scrollbar-width: thin;\n}\n.pops {\n --pops-bg-opacity: 1;\n --pops-bd-opacity: 1;\n --pops-font-size: 16px;\n interpolate-size: allow-keywords;\n --pops-color: #000000;\n --pops-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n --pops-bd-color: rgb(235, 238, 245, var(--pops-bd-opacity));\n --pops-box-shadow-color: rgba(0, 0, 0, 0.12);\n --pops-title-color: #000000;\n --pops-title-border-color: var(--pops-bd-color);\n --pops-content-color: #000000;\n --pops-bottom-btn-controls-border-color: var(--pops-bd-color);\n --pops-components-is-disabled-text-color: #a8abb2;\n --pops-components-is-disabled-bg-color: #f5f7fa;\n}\n@media (prefers-color-scheme: dark) {\n .pops {\n --pops-mask-bg-opacity: 0.8;\n --pops-color: #ffffff;\n --pops-bg-color: rgb(17, 17, 17, var(--pops-bg-opacity));\n --pops-bd-color: rgb(55, 55, 55, var(--pops-bd-opacity));\n --pops-box-shadow-color: rgba(81, 81, 81, 0.12);\n --pops-title-color: #e8e8e8;\n --pops-title-border-color: var(--pops-bd-color);\n --pops-content-color: #e5e5e5;\n --pops-components-is-disabled-text-color: #a8abb2;\n --pops-components-is-disabled-bg-color: #262727;\n }\n}\n.pops {\n color: var(--pops-color);\n background-color: var(--pops-bg-color);\n border: 1px solid var(--pops-bd-color);\n border-radius: 4px;\n font-size: var(--pops-font-size);\n line-height: normal;\n box-shadow: 0 0 12px var(--pops-box-shadow-color);\n box-sizing: border-box;\n overflow: hidden;\n transition: all 0.35s;\n display: flex;\n flex-direction: column;\n}\n.pops-anim {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n}\n.pops-anim[anim=\"\"] {\n top: unset;\n right: unset;\n bottom: unset;\n left: unset;\n width: unset;\n height: unset;\n transition: none;\n}\n/* 底部图标动画和样式 */\n.pops i.pops-bottom-icon[is-loading=\"true\"] {\n animation: rotating 2s linear infinite;\n}\n.pops i.pops-bottom-icon {\n height: 1em;\n width: 1em;\n line-height: normal;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: relative;\n fill: currentColor;\n color: inherit;\n font-size: inherit;\n}\n\n/* 遮罩层样式 */\n.pops-mask {\n --pops-mask-bg-opacity: 0.4;\n --pops-mask-bg-color: rgba(0, 0, 0, var(--pops-mask-bg-opacity));\n}\n.pops-mask {\n position: fixed;\n top: 0;\n right: 0;\n bottom: 0;\n left: 0;\n width: 100%;\n height: 100%;\n border: 0;\n border-radius: 0;\n background-color: var(--pops-mask-bg-color);\n box-shadow: none;\n transition: none;\n}\n\n.pops-header-controls button.pops-header-control[type][data-header] {\n float: right;\n margin: 0 0;\n outline: 0;\n border: 0;\n border-color: rgb(136, 136, 136, var(--pops-bd-opacity));\n background-color: transparent;\n color: #888;\n cursor: pointer;\n}\n.pops-header-controls button.pops-header-control[data-type=\"max\"],\n.pops-header-controls button.pops-header-control[data-type=\"mise\"],\n.pops-header-controls button.pops-header-control[data-type=\"min\"] {\n outline: 0 !important;\n border: 0;\n border-color: rgb(136, 136, 136, var(--pops-bd-opacity));\n background-color: transparent;\n color: rgb(136, 136, 136);\n cursor: pointer;\n transition: all 0.3s ease-in-out;\n}\nbutton.pops-header-control i {\n color: rgb(144, 147, 153);\n font-size: inherit;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: relative;\n fill: currentColor;\n}\nbutton.pops-header-control svg {\n height: 1.25em;\n width: 1.25em;\n}\nbutton.pops-header-control {\n right: 15px;\n padding: 0;\n border: none;\n outline: 0;\n background: 0 0;\n cursor: pointer;\n position: unset;\n line-height: normal;\n}\nbutton.pops-header-control i:hover {\n color: rgb(64, 158, 255);\n}\n.pops-header-controls[data-margin] button.pops-header-control {\n margin: 0 6px;\n display: flex;\n align-items: center;\n}\n.pops[type-value] .pops-header-controls {\n display: flex;\n gap: 6px;\n}\n\n/* 代码块 <code> */\n.pops code {\n font-family: Menlo, Monaco, Consolas, \"Courier New\", monospace;\n font-size: 0.85em;\n color: #000;\n background-color: #f0f0f0;\n border-radius: 3px;\n border: 0;\n padding: 0.2em 0;\n white-space: normal;\n background: #f5f5f5;\n text-wrap: wrap;\n text-align: left;\n word-spacing: normal;\n word-break: normal;\n word-wrap: normal;\n line-height: 1.4;\n -moz-tab-size: 8;\n -o-tab-size: 8;\n tab-size: 8;\n -webkit-hyphens: none;\n -moz-hyphens: none;\n -ms-hyphens: none;\n hyphens: none;\n direction: ltr;\n}\n\n.pops code::before,\n.pops code::after {\n letter-spacing: -0.2em;\n content: \"\\00a0\";\n}\n\n/* 标题 */\n.pops .pops-title {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n display: flex;\n align-items: center;\n justify-content: space-between;\n border-bottom: 1px solid var(--pops-title-border-color);\n width: 100%;\n height: var(--container-title-height);\n}\n/* 标题-普通文本 */\n.pops .pops-title p[pops] {\n color: var(--pops-title-color);\n width: 100%;\n overflow: hidden;\n text-indent: 15px;\n text-overflow: ellipsis;\n white-space: nowrap;\n font-weight: 500;\n line-height: normal;\n}\n\n/* 内容 */\n.pops .pops-content {\n width: 100%;\n /*height: calc(\n\t\t100% - var(--container-title-height) - var(--container-bottom-btn-height)\n\t);*/\n flex: 1;\n overflow: auto;\n word-break: break-word;\n}\n/* 内容-普通文本 */\n.pops .pops-content p[pops] {\n color: var(--pops-content-color);\n padding: 5px 10px;\n text-indent: 15px;\n}\n\n/* 底部-按钮组 */\n.pops .pops-botttom-btn-controls {\n display: flex;\n padding: 10px 10px 10px 10px;\n width: 100%;\n height: var(--container-bottom-btn-height);\n max-height: var(--container-bottom-btn-height);\n line-height: normal;\n border-top: 1px solid var(--pops-bottom-btn-controls-border-color);\n text-align: right;\n align-items: center;\n}\n";
|
|
2829
2810
|
|
|
2830
|
-
var ninePalaceGridPositionCSS = ".pops[position=\"top_left\"] {\n
|
|
2811
|
+
var ninePalaceGridPositionCSS = ".pops[position=\"top_left\"] {\n position: fixed;\n top: 0;\n left: 0;\n}\n.pops[position=\"top\"] {\n position: fixed;\n top: 0;\n left: 50%;\n transform: translateX(-50%);\n}\n.pops[position=\"top_right\"] {\n position: fixed;\n top: 0;\n right: 0;\n}\n.pops[position=\"center_left\"] {\n position: fixed;\n top: 50%;\n left: 0;\n transform: translateY(-50%);\n}\n.pops[position=\"center\"] {\n position: fixed;\n top: 50%;\n left: 50%;\n transform: translate(-50%, -50%);\n}\n.pops[position=\"center_right\"] {\n position: fixed;\n top: 50%;\n right: 0;\n transform: translateY(-50%);\n}\n.pops[position=\"bottom_left\"] {\n position: fixed;\n bottom: 0;\n left: 0;\n}\n.pops[position=\"bottom\"] {\n position: fixed;\n bottom: 0;\n left: 50%;\n transform: translate(-50%, 0);\n}\n.pops[position=\"bottom_right\"] {\n position: fixed;\n right: 0;\n bottom: 0;\n}\n";
|
|
2831
2812
|
|
|
2832
|
-
var scrollbarCSS = "/* ::-webkit-scrollbar 是非标准的css */\n/* https://caniuse.com/?search=%20%3A%3A-webkit-scrollbar */\n.pops ::-webkit-scrollbar {\n
|
|
2813
|
+
var scrollbarCSS = "/* ::-webkit-scrollbar 是非标准的css */\n/* https://caniuse.com/?search=%20%3A%3A-webkit-scrollbar */\n.pops ::-webkit-scrollbar {\n width: 6px;\n height: 0;\n}\n\n/* 滚动条轨道 */\n.pops ::-webkit-scrollbar-track {\n width: 0;\n}\n/* 滚动条滑块 */\n.pops ::-webkit-scrollbar-thumb {\n min-height: 28px;\n border-radius: 2em;\n background: rgb(204, 204, 204, var(--pops-bg-opacity, 1));\n background-clip: padding-box;\n}\n/* 滚动条滑块 */\n.pops ::-webkit-scrollbar-thumb:hover {\n background: rgb(178, 178, 178, var(--pops-bg-opacity, 1));\n}\n";
|
|
2833
2814
|
|
|
2834
|
-
var buttonCSS = ".pops {\n\t--button-font-size: 14px;\n\t--button-height: 32px;\n\t--button-color: rgb(51, 51, 51);\n\t--button-bd-color: rgb(220, 223, 230, var(--pops-bd-opacity));\n\t--button-bg-color: rgb(220, 223, 230, var(--pops-bg-opacity));\n\t--button-margin-top: 0px;\n\t--button-margin-bottom: 0px;\n\t--button-margin-left: 5px;\n\t--button-margin-right: 5px;\n\t--button-padding-top: 6px;\n\t--button-padding-bottom: 6px;\n\t--button-padding-left: 12px;\n\t--button-padding-right: 12px;\n\t--button-radius: 4px;\n\n\t--container-title-height: 55px;\n\t--container-bottom-btn-height: 55px;\n\n\t/* default按钮 */\n\t--button-default-color: #333333;\n\t--button-default-bd-color: #dcdfe6;\n\t--button-default-bg-color: #ffffff;\n\t--button-default-active-color: #409eff;\n\t--button-default-active-bd-color: #409eff;\n\t--button-default-active-bg-color: #ecf5ff;\n\t--button-default-hover-color: #409eff;\n\t--button-default-hover-bd-color: #c6e2ff;\n\t--button-default-hover-bg-color: #ecf5ff;\n\t--button-default-focus-visible-outline-color: #a0cfff;\n\t--button-default-focus-visible-outline: 2px solid var(--button-default-focus-visible-outline-color);\n\t--button-default-focus-visible-outline-offset: 1px;\n\t--button-default-disabled-color: #a8abb2;\n\t--button-default-disabled-bd-color: #ffffff;\n\t--button-default-disabled-bg-color: #e4e7ed;\n\n\t/* primary按钮 */\n\t--button-primary-color: #ffffff;\n\t--button-primary-bd-color: #409eff;\n\t--button-primary-bg-color: #409eff;\n\t--button-primary-active-color: #ffffff;\n\t--button-primary-active-bd-color: #337ecc;\n\t--button-primary-active-bg-color: #337ecc;\n\t--button-primary-hover-color: #ffffff;\n\t--button-primary-hover-bd-color: #79bbff;\n\t--button-primary-hover-bg-color: #79bbff;\n\t--button-primary-focus-visible-outline-color: #a0cfff;\n\t--button-primary-focus-visible-outline: 2px solid var(--button-primary-focus-visible-outline-color);\n\t--button-primary-focus-visible-outline-offset: 1px;\n\t--button-primary-disabled-color: #ffffff80;\n\t--button-primary-disabled-bd-color: #a0cfff;\n\t--button-primary-disabled-bg-color: #a0cfff;\n\n\t/* success按钮 */\n\t--button-success-color: #ffffff;\n\t--button-success-bd-color: #4cae4c;\n\t--button-success-bg-color: #5cb85c;\n\t--button-success-active-color: #ffffff;\n\t--button-success-active-bd-color: #529b2e;\n\t--button-success-active-bg-color: #529b2e;\n\t--button-success-hover-color: #ffffff;\n\t--button-success-hover-bd-color: #95d475;\n\t--button-success-hover-bg-color: #95d475;\n\t--button-success-focus-visible-outline-color: #b3e19d;\n\t--button-success-focus-visible-outline: 2px solid var(--button-success-focus-visible-outline-color);\n\t--button-success-focus-visible-outline-offset: 1px;\n\t--button-success-disabled-color: #ffffff80;\n\t--button-success-disabled-bd-color: #b3e19d;\n\t--button-success-disabled-bg-color: #b3e19d;\n\n\t/* info按钮 */\n\t--button-info-color: #ffffff;\n\t--button-info-bd-color: #909399;\n\t--button-info-bg-color: #909399;\n\t--button-info-active-color: #ffffff;\n\t--button-info-active-bd-color: #73767a;\n\t--button-info-active-bg-color: #73767a;\n\t--button-info-hover-color: #ffffff;\n\t--button-info-hover-bd-color: #b1b3b8;\n\t--button-info-hover-bg-color: #b1b3b8;\n\t--button-info-focus-visible-outline-color: #c8c9cc;\n\t--button-info-focus-visible-outline: 2px solid var(--button-info-focus-visible-outline-color);\n\t--button-info-focus-visible-outline-offset: 1px;\n\t--button-info-disabled-color: #ffffff80;\n\t--button-info-disabled-bd-color: #c8c9cc;\n\t--button-info-disabled-bg-color: #c8c9cc;\n\n\t/* warning按钮 */\n\t--button-warning-color: #ffffff;\n\t--button-warning-bd-color: #e6a23c;\n\t--button-warning-bg-color: #e6a23c;\n\t--button-warning-active-color: #ffffff;\n\t--button-warning-active-bd-color: #b88230;\n\t--button-warning-active-bg-color: #b88230;\n\t--button-warning-hover-color: #ffffff80;\n\t--button-warning-hover-bd-color: #eebe77;\n\t--button-warning-hover-bg-color: #eebe77;\n\t--button-warning-focus-visible-outline-color: #f3d19e;\n\t--button-warning-focus-visible-outline: 2px solid var(--button-warning-focus-visible-outline-color);\n\t--button-warning-focus-visible-outline-offset: 1px;\n\t--button-warning-disabled-color: #ffffff80;\n\t--button-warning-disabled-bd-color: #f3d19e;\n\t--button-warning-disabled-bg-color: #f3d19e;\n\n\t/* danger按钮 */\n\t--button-danger-color: #ffffff;\n\t--button-danger-bd-color: #f56c6c;\n\t--button-danger-bg-color: #f56c6c;\n\t--button-danger-active-color: #ffffff;\n\t--button-danger-active-bd-color: #c45656;\n\t--button-danger-active-bg-color: #c45656;\n\t--button-danger-hover-color: #ffffff;\n\t--button-danger-hover-bd-color: #f89898;\n\t--button-danger-hover-bg-color: #f89898;\n\t--button-danger-focus-visible-outline-color: #fab6b6;\n\t--button-danger-focus-visible-outline: 2px solid var(--button-danger-focus-visible-outline-color);\n\t--button-danger-focus-visible-outline-offset: 1px;\n\t--button-danger-disabled-color: #ffffff80;\n\t--button-danger-disabled-bd-color: #fab6b6;\n\t--button-danger-disabled-bg-color: #fab6b6;\n\n\t/* xiaomi-primary按钮 */\n\t--button-xiaomi-primary-color: #ffffff;\n\t--button-xiaomi-primary-bd-color: #ff5c00;\n\t--button-xiaomi-primary-bg-color: #ff5c00;\n\t--button-xiaomi-primary-active-color: #ffffff;\n\t--button-xiaomi-primary-active-bd-color: #da4f00;\n\t--button-xiaomi-primary-active-bg-color: #da4f00;\n\t--button-xiaomi-primary-hover-color: #ffffff;\n\t--button-xiaomi-primary-hover-bd-color: #ff7e29;\n\t--button-xiaomi-primary-hover-bg-color: #ff7e29;\n\t--button-xiaomi-primary-focus-visible-outline-color: #ffa061;\n\t--button-xiaomi-primary-focus-visible-outline: 2px solid\n\t\tvar(--button-xiaomi-primary-focus-visible-outline-color);\n\t--button-xiaomi-primary-focus-visible-outline-offset: 1px;\n\t--button-xiaomi-primary-disabled-color: #ffffff80;\n\t--button-xiaomi-primary-disabled-bd-color: #fad5b6;\n\t--button-xiaomi-primary-disabled-bg-color: #fad5b6;\n\n\t/* violet按钮 */\n\t--button-violet-color: #ffffff;\n\t--button-violet-bd-color: #626aef;\n\t--button-violet-bg-color: #626aef;\n\t--button-violet-active-color: #ffffff;\n\t--button-violet-active-bd-color: #8188f2;\n\t--button-violet-active-bg-color: #8188f2;\n\t--button-violet-hover-color: #ffffff;\n\t--button-violet-hover-bd-color: #4b50ad;\n\t--button-violet-hover-bg-color: #4b50ad;\n\t--button-violet-focus-visible-outline-color: #2a598a;\n\t--button-violet-focus-visible-outline: 2px solid var(--button-violet-focus-visible-outline-color);\n\t--button-violet-focus-visible-outline-offset: 1px;\n\t--button-violet-disabled-color: #ffffff80;\n\t--button-violet-disabled-bd-color: #3b3f82;\n\t--button-violet-disabled-bg-color: #3b3f82;\n}\n\n@media (prefers-color-scheme: dark) {\n\t.pops {\n\t\t/* default按钮 */\n\t\t--button-default-color: #cfd3dc;\n\t\t--button-default-bd-color: #4c4d4f;\n\t\t--button-default-bg-color: transparent;\n\t\t--button-default-active-color: #409eff;\n\t\t--button-default-active-bd-color: #409eff;\n\t\t--button-default-active-bg-color: #18222c;\n\t\t--button-default-hover-color: #409eff;\n\t\t--button-default-hover-bd-color: #213d5b;\n\t\t--button-default-hover-bg-color: #18222c;\n\t\t--button-default-focus-visible-outline-color: #2a598a;\n\t\t--button-default-focus-visible-outline: 2px solid var(--button-default-focus-visible-outline-color);\n\t\t--button-default-focus-visible-outline-offset: 1px;\n\t\t--button-default-disabled-color: #ffffff80;\n\t\t--button-default-disabled-bd-color: #414243;\n\t\t--button-default-disabled-bg-color: transparent;\n\n\t\t/* primary按钮 */\n\t\t--button-primary-color: #ffffff;\n\t\t--button-primary-bd-color: #409eff;\n\t\t--button-primary-bg-color: #409eff;\n\t\t--button-primary-active-color: #ffffff;\n\t\t--button-primary-active-bd-color: #66b1ff;\n\t\t--button-primary-active-bg-color: #66b1ff;\n\t\t--button-primary-hover-color: #ffffff;\n\t\t--button-primary-hover-bd-color: #3375b9;\n\t\t--button-primary-hover-bg-color: #3375b9;\n\t\t--button-primary-focus-visible-outline-color: #2a598a;\n\t\t--button-primary-focus-visible-outline: 2px solid var(--button-primary-focus-visible-outline-color);\n\t\t--button-primary-focus-visible-outline-offset: 1px;\n\t\t--button-primary-disabled-color: #ffffff80;\n\t\t--button-primary-disabled-bd-color: #2a598a;\n\t\t--button-primary-disabled-bg-color: #2a598a;\n\n\t\t/* success按钮 */\n\t\t--button-success-color: #ffffff;\n\t\t--button-success-bd-color: #67c23a;\n\t\t--button-success-bg-color: #67c23a;\n\t\t--button-success-active-color: #ffffff;\n\t\t--button-success-active-bd-color: #85ce61;\n\t\t--button-success-active-bg-color: #85ce61;\n\t\t--button-success-hover-color: #ffffff;\n\t\t--button-success-hover-bd-color: #4e8e2f;\n\t\t--button-success-hover-bg-color: #4e8e2f;\n\t\t--button-success-focus-visible-outline-color: #3e6b27;\n\t\t--button-success-focus-visible-outline: 2px solid var(--button-success-focus-visible-outline-color);\n\t\t--button-success-focus-visible-outline-offset: 1px;\n\t\t--button-success-disabled-color: #ffffff80;\n\t\t--button-success-disabled-bd-color: #3e6b27;\n\t\t--button-success-disabled-bg-color: #3e6b27;\n\n\t\t/* info按钮 */\n\t\t--button-info-color: #ffffff;\n\t\t--button-info-bd-color: #909399;\n\t\t--button-info-bg-color: #909399;\n\t\t--button-info-active-color: #ffffff;\n\t\t--button-info-active-bd-color: #a6a9ad;\n\t\t--button-info-active-bg-color: #a6a9ad;\n\t\t--button-info-hover-color: #ffffff;\n\t\t--button-info-hover-bd-color: #6b6d71;\n\t\t--button-info-hover-bg-color: #6b6d71;\n\t\t--button-info-focus-visible-outline-color: #525457;\n\t\t--button-info-focus-visible-outline: 2px solid var(--button-info-focus-visible-outline-color);\n\t\t--button-info-focus-visible-outline-offset: 1px;\n\t\t--button-info-disabled-color: #ffffff80;\n\t\t--button-info-disabled-bd-color: #525457;\n\t\t--button-info-disabled-bg-color: #525457;\n\n\t\t/* warning按钮 */\n\t\t--button-warning-color: #ffffff;\n\t\t--button-warning-bd-color: #e6a23c;\n\t\t--button-warning-bg-color: #e6a23c;\n\t\t--button-warning-active-color: #ffffff;\n\t\t--button-warning-active-bd-color: #ebb563;\n\t\t--button-warning-active-bg-color: #ebb563;\n\t\t--button-warning-hover-color: #ffffff80;\n\t\t--button-warning-hover-bd-color: #a77730;\n\t\t--button-warning-hover-bg-color: #a77730;\n\t\t--button-warning-focus-visible-outline-color: #7d5b28;\n\t\t--button-warning-focus-visible-outline: 2px solid var(--button-warning-focus-visible-outline-color);\n\t\t--button-warning-focus-visible-outline-offset: 1px;\n\t\t--button-warning-disabled-color: #ffffff80;\n\t\t--button-warning-disabled-bd-color: #7d5b28;\n\t\t--button-warning-disabled-bg-color: #7d5b28;\n\n\t\t/* danger按钮 */\n\t\t--button-danger-color: #ffffff;\n\t\t--button-danger-bd-color: #f56c6c;\n\t\t--button-danger-bg-color: #f56c6c;\n\t\t--button-danger-active-color: #ffffff;\n\t\t--button-danger-active-bd-color: #f78989;\n\t\t--button-danger-active-bg-color: #f78989;\n\t\t--button-danger-hover-color: #ffffff;\n\t\t--button-danger-hover-bd-color: #b25252;\n\t\t--button-danger-hover-bg-color: #b25252;\n\t\t--button-danger-focus-visible-outline-color: #854040;\n\t\t--button-danger-focus-visible-outline: 2px solid var(--button-danger-focus-visible-outline-color);\n\t\t--button-danger-focus-visible-outline-offset: 1px;\n\t\t--button-danger-disabled-color: #ffffff80;\n\t\t--button-danger-disabled-bd-color: #854040;\n\t\t--button-danger-disabled-bg-color: #854040;\n\t}\n}\n.pops[data-bottom-btn=\"false\"] {\n\t--container-bottom-btn-height: 0px;\n}\n.pops button {\n\twhite-space: nowrap;\n\tfloat: right;\n\tdisplay: inline-block;\n\tmargin: var(--button-margin-top) var(--button-margin-right) var(--button-margin-bottom)\n\t\tvar(--button-margin-left);\n\tpadding: var(--button-padding-top) var(--button-padding-right) var(--button-padding-bottom)\n\t\tvar(--button-padding-left);\n\toutline: 0;\n}\n.pops button[data-has-icon=\"false\"] .pops-bottom-icon {\n\tdisplay: none;\n}\n.pops button {\n\tborder-radius: var(--button-radius);\n\tbox-shadow: none;\n\tfont-weight: 400;\n\tfont-size: var(--button-font-size);\n\tcursor: pointer;\n\ttransition: all 0.3s ease-in-out;\n}\n.pops button {\n\tdisplay: flex;\n\talign-items: center;\n\theight: var(--button-height);\n\tline-height: normal;\n\tbox-sizing: border-box;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tborder: 1px solid var(--button-bd-color);\n}\n.pops button {\n\tcolor: var(--button-color);\n\tborder-color: var(--button-bd-color);\n\tbackground-color: var(--button-bg-color);\n}\n.pops button:active {\n\tcolor: var(--button-color);\n\tborder-color: var(--button-bd-color);\n\tbackground-color: var(--button-bg-color);\n\toutline: 0;\n}\n.pops button:hover {\n\tcolor: var(--button-color);\n\tborder-color: var(--button-bd-color);\n\tbackground-color: var(--button-bg-color);\n}\n.pops button:focus-visible {\n\tcolor: var(--button-color);\n\tborder-color: var(--button-bd-color);\n\tbackground-color: var(--button-bg-color);\n}\n.pops button:disabled {\n\tcursor: not-allowed;\n\tcolor: var(--button-color);\n\tborder-color: var(--button-bd-color);\n\tbackground-color: var(--button-bg-color);\n}\n.pops button.pops-button-large {\n\t--button-height: 32px;\n\t--button-padding-top: 12px;\n\t--button-padding-bottom: 12px;\n\t--button-padding-left: 19px;\n\t--button-padding-right: 19px;\n\t--button-font-size: 14px;\n\t--button-border-radius: 4px;\n}\n\n.pops button.pops-button-small {\n\t--button-height: 24px;\n\t--button-padding-top: 5px;\n\t--button-padding-bottom: 5px;\n\t--button-padding-left: 11px;\n\t--button-padding-right: 11px;\n\t--button-font-size: 12px;\n\t--button-border-radius: 4px;\n}\n.pops-panel-button-no-icon .pops-panel-button_inner i {\n\tdisplay: none;\n}\n.pops-panel-button-right-icon .pops-panel-button_inner {\n\tflex-direction: row-reverse;\n}\n.pops-panel-button .pops-panel-button_inner i:has(svg),\n.pops-panel-button-right-icon .pops-panel-button-text {\n\tmargin-right: 6px;\n}\n\n.pops button[data-type=\"default\"] {\n\t--button-color: var(--button-default-color);\n\t--button-bd-color: var(--button-default-bd-color);\n\t--button-bg-color: var(--button-default-bg-color);\n}\n.pops button[data-type=\"default\"]:active {\n\t--button-color: var(--button-default-active-color);\n\t--button-bd-color: var(--button-default-active-bd-color);\n\t--button-bg-color: var(--button-default-active-bg-color);\n}\n.pops button[data-type=\"default\"]:hover {\n\t--button-color: var(--button-default-hover-color);\n\t--button-bd-color: var(--button-default-hover-bd-color);\n\t--button-bg-color: var(--button-default-hover-bg-color);\n}\n.pops button[data-type=\"default\"]:focus-visible {\n\toutline: var(--button-default-focus-visible-outline);\n\toutline-offset: var(--button-default-focus-visible-outline-offset);\n}\n.pops button[data-type=\"default\"]:disabled {\n\t--button-color: var(--button-default-disabled-color);\n\t--button-bd-color: var(--button-default-disabled-bd-color);\n\t--button-bg-color: var(--button-default-disabled-bg-color);\n}\n\n.pops button[data-type=\"primary\"] {\n\t--button-color: var(--button-primary-color);\n\t--button-bd-color: var(--button-primary-bd-color);\n\t--button-bg-color: var(--button-primary-bg-color);\n}\n.pops button[data-type=\"primary\"]:active {\n\t--button-color: var(--button-primary-active-color);\n\t--button-bd-color: var(--button-primary-active-bd-color);\n\t--button-bg-color: var(--button-primary-active-bg-color);\n}\n.pops button[data-type=\"primary\"]:hover {\n\t--button-color: var(--button-primary-hover-color);\n\t--button-bd-color: var(--button-primary-hover-bd-color);\n\t--button-bg-color: var(--button-primary-hover-bg-color);\n}\n.pops button[data-type=\"primary\"]:focus-visible {\n\toutline: var(--button-primary-focus-visible-outline);\n\toutline-offset: var(--button-primary-focus-visible-outline-offset);\n}\n.pops button[data-type=\"primary\"]:disabled {\n\t--button-color: var(--button-primary-disabled-color);\n\t--button-bd-color: var(--button-primary-disabled-bd-color);\n\t--button-bg-color: var(--button-primary-disabled-bg-color);\n}\n\n.pops button[data-type=\"success\"] {\n\t--button-color: var(--button-success-color);\n\t--button-bd-color: var(--button-success-bd-color);\n\t--button-bg-color: var(--button-success-bg-color);\n}\n.pops button[data-type=\"success\"]:active {\n\t--button-color: var(--button-success-active-color);\n\t--button-bd-color: var(--button-success-active-bd-color);\n\t--button-bg-color: var(--button-success-active-bg-color);\n}\n.pops button[data-type=\"success\"]:hover {\n\t--button-color: var(--button-success-hover-color);\n\t--button-bd-color: var(--button-success-hover-bd-color);\n\t--button-bg-color: var(--button-success-hover-bg-color);\n}\n.pops button[data-type=\"success\"]:focus-visible {\n\toutline: var(--button-success-focus-visible-outline);\n\toutline-offset: var(--button-success-focus-visible-outline-offset);\n}\n.pops button[data-type=\"success\"]:disabled {\n\t--button-color: var(--button-success-disabled-color);\n\t--button-bd-color: var(--button-success-disabled-bd-color);\n\t--button-bg-color: var(--button-success-disabled-bg-color);\n}\n\n.pops button[data-type=\"info\"] {\n\t--button-color: var(--button-info-color);\n\t--button-bd-color: var(--button-info-bd-color);\n\t--button-bg-color: var(--button-info-bg-color);\n}\n.pops button[data-type=\"info\"]:active {\n\t--button-color: var(--button-info-active-color);\n\t--button-bd-color: var(--button-info-active-bd-color);\n\t--button-bg-color: var(--button-info-active-bg-color);\n}\n.pops button[data-type=\"info\"]:hover {\n\t--button-color: var(--button-info-hover-color);\n\t--button-bd-color: var(--button-info-hover-bd-color);\n\t--button-bg-color: var(--button-info-hover-bg-color);\n}\n.pops button[data-type=\"info\"]:focus-visible {\n\toutline: var(--button-info-focus-visible-outline);\n\toutline-offset: var(--button-info-focus-visible-outline-offset);\n}\n.pops button[data-type=\"info\"]:disabled {\n\t--button-color: var(--button-info-disabled-color);\n\t--button-bd-color: var(--button-info-disabled-bd-color);\n\t--button-bg-color: var(--button-info-disabled-bg-color);\n}\n\n.pops button[data-type=\"warning\"] {\n\t--button-color: var(--button-warning-color);\n\t--button-bd-color: var(--button-warning-bd-color);\n\t--button-bg-color: var(--button-warning-bg-color);\n}\n.pops button[data-type=\"warning\"]:active {\n\t--button-color: var(--button-warning-active-color);\n\t--button-bd-color: var(--button-warning-active-bd-color);\n\t--button-bg-color: var(--button-warning-active-bg-color);\n}\n.pops button[data-type=\"warning\"]:hover {\n\t--button-color: var(--button-warning-hover-color);\n\t--button-bd-color: var(--button-warning-hover-bd-color);\n\t--button-bg-color: var(--button-warning-hover-bg-color);\n}\n.pops button[data-type=\"warning\"]:focus-visible {\n\toutline: var(--button-warning-focus-visible-outline);\n\toutline-offset: var(--button-warning-focus-visible-outline-offset);\n}\n.pops button[data-type=\"warning\"]:disabled {\n\t--button-color: var(--button-warning-disabled-color);\n\t--button-bd-color: var(--button-warning-disabled-bd-color);\n\t--button-bg-color: var(--button-warning-disabled-bg-color);\n}\n\n.pops button[data-type=\"danger\"] {\n\t--button-color: var(--button-danger-color);\n\t--button-bd-color: var(--button-danger-bd-color);\n\t--button-bg-color: var(--button-danger-bg-color);\n}\n.pops button[data-type=\"danger\"]:active {\n\t--button-color: var(--button-danger-active-color);\n\t--button-bd-color: var(--button-danger-active-bd-color);\n\t--button-bg-color: var(--button-danger-active-bg-color);\n}\n.pops button[data-type=\"danger\"]:hover {\n\t--button-color: var(--button-danger-hover-color);\n\t--button-bd-color: var(--button-danger-hover-bd-color);\n\t--button-bg-color: var(--button-danger-hover-bg-color);\n}\n.pops button[data-type=\"danger\"]:focus-visible {\n\toutline: var(--button-danger-focus-visible-outline);\n\toutline-offset: var(--button-danger-focus-visible-outline-offset);\n}\n.pops button[data-type=\"danger\"]:disabled {\n\t--button-color: var(--button-danger-disabled-color);\n\t--button-bd-color: var(--button-danger-disabled-bd-color);\n\t--button-bg-color: var(--button-danger-disabled-bg-color);\n}\n\n.pops button[data-type=\"xiaomi-primary\"] {\n\t--button-color: var(--button-xiaomi-primary-color);\n\t--button-bd-color: var(--button-xiaomi-primary-bd-color);\n\t--button-bg-color: var(--button-xiaomi-primary-bg-color);\n}\n.pops button[data-type=\"xiaomi-primary\"]:active {\n\t--button-color: var(--button-xiaomi-primary-active-color);\n\t--button-bd-color: var(--button-xiaomi-primary-active-bd-color);\n\t--button-bg-color: var(--button-xiaomi-primary-active-bg-color);\n}\n.pops button[data-type=\"xiaomi-primary\"]:hover {\n\t--button-color: var(--button-xiaomi-primary-hover-color);\n\t--button-bd-color: var(--button-xiaomi-primary-hover-bd-color);\n\t--button-bg-color: var(--button-xiaomi-primary-hover-bg-color);\n}\n.pops button[data-type=\"xiaomi-primary\"]:focus-visible {\n\toutline: var(--button-xiaomi-primary-focus-visible-outline);\n\toutline-offset: var(--button-xiaomi-primary-focus-visible-outline-offset);\n}\n.pops button[data-type=\"xiaomi-primary\"]:disabled {\n\t--button-color: var(--button-xiaomi-primary-disabled-color);\n\t--button-bd-color: var(--button-xiaomi-primary-disabled-bd-color);\n\t--button-bg-color: var(--button-xiaomi-primary-disabled-bg-color);\n}\n\n.pops button[data-type=\"violet\"] {\n\t--button-color: var(--button-violet-color);\n\t--button-bd-color: var(--button-violet-bd-color);\n\t--button-bg-color: var(--button-violet-bg-color);\n}\n.pops button[data-type=\"violet\"]:active {\n\t--button-color: var(--button-violet-active-color);\n\t--button-bd-color: var(--button-violet-active-bd-color);\n\t--button-bg-color: var(--button-violet-active-bg-color);\n}\n.pops button[data-type=\"violet\"]:hover {\n\t--button-color: var(--button-violet-hover-color);\n\t--button-bd-color: var(--button-violet-hover-bd-color);\n\t--button-bg-color: var(--button-violet-hover-bg-color);\n}\n.pops button[data-type=\"violet\"]:focus-visible {\n\toutline: var(--button-violet-focus-visible-outline);\n\toutline-offset: var(--button-violet-focus-visible-outline-offset);\n}\n.pops button[data-type=\"violet\"]:disabled {\n\t--button-color: var(--button-violet-disabled-color);\n\t--button-bd-color: var(--button-violet-disabled-bd-color);\n\t--button-bg-color: var(--button-violet-disabled-bg-color);\n}\n";
|
|
2815
|
+
var buttonCSS = ".pops {\n --button-font-size: 14px;\n --button-height: 32px;\n --button-color: rgb(51, 51, 51);\n --button-bd-color: rgb(220, 223, 230, var(--pops-bd-opacity));\n --button-bg-color: rgb(220, 223, 230, var(--pops-bg-opacity));\n --button-margin-top: 0px;\n --button-margin-bottom: 0px;\n --button-margin-left: 5px;\n --button-margin-right: 5px;\n --button-padding-top: 6px;\n --button-padding-bottom: 6px;\n --button-padding-left: 12px;\n --button-padding-right: 12px;\n --button-radius: 4px;\n\n --container-title-height: 55px;\n --container-bottom-btn-height: 55px;\n\n /* default按钮 */\n --button-default-color: #333333;\n --button-default-bd-color: #dcdfe6;\n --button-default-bg-color: #ffffff;\n --button-default-active-color: #409eff;\n --button-default-active-bd-color: #409eff;\n --button-default-active-bg-color: #ecf5ff;\n --button-default-hover-color: #409eff;\n --button-default-hover-bd-color: #c6e2ff;\n --button-default-hover-bg-color: #ecf5ff;\n --button-default-focus-visible-outline-color: #a0cfff;\n --button-default-focus-visible-outline: 2px solid var(--button-default-focus-visible-outline-color);\n --button-default-focus-visible-outline-offset: 1px;\n --button-default-disabled-color: #a8abb2;\n --button-default-disabled-bd-color: #ffffff;\n --button-default-disabled-bg-color: #e4e7ed;\n\n /* primary按钮 */\n --button-primary-color: #ffffff;\n --button-primary-bd-color: #409eff;\n --button-primary-bg-color: #409eff;\n --button-primary-active-color: #ffffff;\n --button-primary-active-bd-color: #337ecc;\n --button-primary-active-bg-color: #337ecc;\n --button-primary-hover-color: #ffffff;\n --button-primary-hover-bd-color: #79bbff;\n --button-primary-hover-bg-color: #79bbff;\n --button-primary-focus-visible-outline-color: #a0cfff;\n --button-primary-focus-visible-outline: 2px solid var(--button-primary-focus-visible-outline-color);\n --button-primary-focus-visible-outline-offset: 1px;\n --button-primary-disabled-color: #ffffff80;\n --button-primary-disabled-bd-color: #a0cfff;\n --button-primary-disabled-bg-color: #a0cfff;\n\n /* success按钮 */\n --button-success-color: #ffffff;\n --button-success-bd-color: #4cae4c;\n --button-success-bg-color: #5cb85c;\n --button-success-active-color: #ffffff;\n --button-success-active-bd-color: #529b2e;\n --button-success-active-bg-color: #529b2e;\n --button-success-hover-color: #ffffff;\n --button-success-hover-bd-color: #95d475;\n --button-success-hover-bg-color: #95d475;\n --button-success-focus-visible-outline-color: #b3e19d;\n --button-success-focus-visible-outline: 2px solid var(--button-success-focus-visible-outline-color);\n --button-success-focus-visible-outline-offset: 1px;\n --button-success-disabled-color: #ffffff80;\n --button-success-disabled-bd-color: #b3e19d;\n --button-success-disabled-bg-color: #b3e19d;\n\n /* info按钮 */\n --button-info-color: #ffffff;\n --button-info-bd-color: #909399;\n --button-info-bg-color: #909399;\n --button-info-active-color: #ffffff;\n --button-info-active-bd-color: #73767a;\n --button-info-active-bg-color: #73767a;\n --button-info-hover-color: #ffffff;\n --button-info-hover-bd-color: #b1b3b8;\n --button-info-hover-bg-color: #b1b3b8;\n --button-info-focus-visible-outline-color: #c8c9cc;\n --button-info-focus-visible-outline: 2px solid var(--button-info-focus-visible-outline-color);\n --button-info-focus-visible-outline-offset: 1px;\n --button-info-disabled-color: #ffffff80;\n --button-info-disabled-bd-color: #c8c9cc;\n --button-info-disabled-bg-color: #c8c9cc;\n\n /* warning按钮 */\n --button-warning-color: #ffffff;\n --button-warning-bd-color: #e6a23c;\n --button-warning-bg-color: #e6a23c;\n --button-warning-active-color: #ffffff;\n --button-warning-active-bd-color: #b88230;\n --button-warning-active-bg-color: #b88230;\n --button-warning-hover-color: #ffffff80;\n --button-warning-hover-bd-color: #eebe77;\n --button-warning-hover-bg-color: #eebe77;\n --button-warning-focus-visible-outline-color: #f3d19e;\n --button-warning-focus-visible-outline: 2px solid var(--button-warning-focus-visible-outline-color);\n --button-warning-focus-visible-outline-offset: 1px;\n --button-warning-disabled-color: #ffffff80;\n --button-warning-disabled-bd-color: #f3d19e;\n --button-warning-disabled-bg-color: #f3d19e;\n\n /* danger按钮 */\n --button-danger-color: #ffffff;\n --button-danger-bd-color: #f56c6c;\n --button-danger-bg-color: #f56c6c;\n --button-danger-active-color: #ffffff;\n --button-danger-active-bd-color: #c45656;\n --button-danger-active-bg-color: #c45656;\n --button-danger-hover-color: #ffffff;\n --button-danger-hover-bd-color: #f89898;\n --button-danger-hover-bg-color: #f89898;\n --button-danger-focus-visible-outline-color: #fab6b6;\n --button-danger-focus-visible-outline: 2px solid var(--button-danger-focus-visible-outline-color);\n --button-danger-focus-visible-outline-offset: 1px;\n --button-danger-disabled-color: #ffffff80;\n --button-danger-disabled-bd-color: #fab6b6;\n --button-danger-disabled-bg-color: #fab6b6;\n\n /* xiaomi-primary按钮 */\n --button-xiaomi-primary-color: #ffffff;\n --button-xiaomi-primary-bd-color: #ff5c00;\n --button-xiaomi-primary-bg-color: #ff5c00;\n --button-xiaomi-primary-active-color: #ffffff;\n --button-xiaomi-primary-active-bd-color: #da4f00;\n --button-xiaomi-primary-active-bg-color: #da4f00;\n --button-xiaomi-primary-hover-color: #ffffff;\n --button-xiaomi-primary-hover-bd-color: #ff7e29;\n --button-xiaomi-primary-hover-bg-color: #ff7e29;\n --button-xiaomi-primary-focus-visible-outline-color: #ffa061;\n --button-xiaomi-primary-focus-visible-outline: 2px solid var(--button-xiaomi-primary-focus-visible-outline-color);\n --button-xiaomi-primary-focus-visible-outline-offset: 1px;\n --button-xiaomi-primary-disabled-color: #ffffff80;\n --button-xiaomi-primary-disabled-bd-color: #fad5b6;\n --button-xiaomi-primary-disabled-bg-color: #fad5b6;\n\n /* violet按钮 */\n --button-violet-color: #ffffff;\n --button-violet-bd-color: #626aef;\n --button-violet-bg-color: #626aef;\n --button-violet-active-color: #ffffff;\n --button-violet-active-bd-color: #8188f2;\n --button-violet-active-bg-color: #8188f2;\n --button-violet-hover-color: #ffffff;\n --button-violet-hover-bd-color: #4b50ad;\n --button-violet-hover-bg-color: #4b50ad;\n --button-violet-focus-visible-outline-color: #2a598a;\n --button-violet-focus-visible-outline: 2px solid var(--button-violet-focus-visible-outline-color);\n --button-violet-focus-visible-outline-offset: 1px;\n --button-violet-disabled-color: #ffffff80;\n --button-violet-disabled-bd-color: #3b3f82;\n --button-violet-disabled-bg-color: #3b3f82;\n}\n\n@media (prefers-color-scheme: dark) {\n .pops {\n /* default按钮 */\n --button-default-color: #cfd3dc;\n --button-default-bd-color: #4c4d4f;\n --button-default-bg-color: transparent;\n --button-default-active-color: #409eff;\n --button-default-active-bd-color: #409eff;\n --button-default-active-bg-color: #18222c;\n --button-default-hover-color: #409eff;\n --button-default-hover-bd-color: #213d5b;\n --button-default-hover-bg-color: #18222c;\n --button-default-focus-visible-outline-color: #2a598a;\n --button-default-focus-visible-outline: 2px solid var(--button-default-focus-visible-outline-color);\n --button-default-focus-visible-outline-offset: 1px;\n --button-default-disabled-color: #ffffff80;\n --button-default-disabled-bd-color: #414243;\n --button-default-disabled-bg-color: transparent;\n\n /* primary按钮 */\n --button-primary-color: #ffffff;\n --button-primary-bd-color: #409eff;\n --button-primary-bg-color: #409eff;\n --button-primary-active-color: #ffffff;\n --button-primary-active-bd-color: #66b1ff;\n --button-primary-active-bg-color: #66b1ff;\n --button-primary-hover-color: #ffffff;\n --button-primary-hover-bd-color: #3375b9;\n --button-primary-hover-bg-color: #3375b9;\n --button-primary-focus-visible-outline-color: #2a598a;\n --button-primary-focus-visible-outline: 2px solid var(--button-primary-focus-visible-outline-color);\n --button-primary-focus-visible-outline-offset: 1px;\n --button-primary-disabled-color: #ffffff80;\n --button-primary-disabled-bd-color: #2a598a;\n --button-primary-disabled-bg-color: #2a598a;\n\n /* success按钮 */\n --button-success-color: #ffffff;\n --button-success-bd-color: #67c23a;\n --button-success-bg-color: #67c23a;\n --button-success-active-color: #ffffff;\n --button-success-active-bd-color: #85ce61;\n --button-success-active-bg-color: #85ce61;\n --button-success-hover-color: #ffffff;\n --button-success-hover-bd-color: #4e8e2f;\n --button-success-hover-bg-color: #4e8e2f;\n --button-success-focus-visible-outline-color: #3e6b27;\n --button-success-focus-visible-outline: 2px solid var(--button-success-focus-visible-outline-color);\n --button-success-focus-visible-outline-offset: 1px;\n --button-success-disabled-color: #ffffff80;\n --button-success-disabled-bd-color: #3e6b27;\n --button-success-disabled-bg-color: #3e6b27;\n\n /* info按钮 */\n --button-info-color: #ffffff;\n --button-info-bd-color: #909399;\n --button-info-bg-color: #909399;\n --button-info-active-color: #ffffff;\n --button-info-active-bd-color: #a6a9ad;\n --button-info-active-bg-color: #a6a9ad;\n --button-info-hover-color: #ffffff;\n --button-info-hover-bd-color: #6b6d71;\n --button-info-hover-bg-color: #6b6d71;\n --button-info-focus-visible-outline-color: #525457;\n --button-info-focus-visible-outline: 2px solid var(--button-info-focus-visible-outline-color);\n --button-info-focus-visible-outline-offset: 1px;\n --button-info-disabled-color: #ffffff80;\n --button-info-disabled-bd-color: #525457;\n --button-info-disabled-bg-color: #525457;\n\n /* warning按钮 */\n --button-warning-color: #ffffff;\n --button-warning-bd-color: #e6a23c;\n --button-warning-bg-color: #e6a23c;\n --button-warning-active-color: #ffffff;\n --button-warning-active-bd-color: #ebb563;\n --button-warning-active-bg-color: #ebb563;\n --button-warning-hover-color: #ffffff80;\n --button-warning-hover-bd-color: #a77730;\n --button-warning-hover-bg-color: #a77730;\n --button-warning-focus-visible-outline-color: #7d5b28;\n --button-warning-focus-visible-outline: 2px solid var(--button-warning-focus-visible-outline-color);\n --button-warning-focus-visible-outline-offset: 1px;\n --button-warning-disabled-color: #ffffff80;\n --button-warning-disabled-bd-color: #7d5b28;\n --button-warning-disabled-bg-color: #7d5b28;\n\n /* danger按钮 */\n --button-danger-color: #ffffff;\n --button-danger-bd-color: #f56c6c;\n --button-danger-bg-color: #f56c6c;\n --button-danger-active-color: #ffffff;\n --button-danger-active-bd-color: #f78989;\n --button-danger-active-bg-color: #f78989;\n --button-danger-hover-color: #ffffff;\n --button-danger-hover-bd-color: #b25252;\n --button-danger-hover-bg-color: #b25252;\n --button-danger-focus-visible-outline-color: #854040;\n --button-danger-focus-visible-outline: 2px solid var(--button-danger-focus-visible-outline-color);\n --button-danger-focus-visible-outline-offset: 1px;\n --button-danger-disabled-color: #ffffff80;\n --button-danger-disabled-bd-color: #854040;\n --button-danger-disabled-bg-color: #854040;\n }\n}\n.pops[data-bottom-btn=\"false\"] {\n --container-bottom-btn-height: 0px;\n}\n.pops button {\n white-space: nowrap;\n float: right;\n display: inline-block;\n margin: var(--button-margin-top) var(--button-margin-right) var(--button-margin-bottom) var(--button-margin-left);\n padding: var(--button-padding-top) var(--button-padding-right) var(--button-padding-bottom) var(--button-padding-left);\n outline: 0;\n}\n.pops button[data-has-icon=\"false\"] .pops-bottom-icon {\n display: none;\n}\n.pops button {\n border-radius: var(--button-radius);\n box-shadow: none;\n font-weight: 400;\n font-size: var(--button-font-size);\n cursor: pointer;\n transition: all 0.3s ease-in-out;\n}\n.pops button {\n display: flex;\n align-items: center;\n height: var(--button-height);\n line-height: normal;\n box-sizing: border-box;\n border: 1px solid var(--button-bd-color);\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.pops button {\n color: var(--button-color);\n border-color: var(--button-bd-color);\n background-color: var(--button-bg-color);\n}\n.pops button:active {\n color: var(--button-color);\n border-color: var(--button-bd-color);\n background-color: var(--button-bg-color);\n outline: 0;\n}\n.pops button:hover {\n color: var(--button-color);\n border-color: var(--button-bd-color);\n background-color: var(--button-bg-color);\n}\n.pops button:focus-visible {\n color: var(--button-color);\n border-color: var(--button-bd-color);\n background-color: var(--button-bg-color);\n}\n.pops button:disabled {\n cursor: not-allowed;\n color: var(--button-color);\n border-color: var(--button-bd-color);\n background-color: var(--button-bg-color);\n}\n.pops button.pops-button-large {\n --button-height: 32px;\n --button-padding-top: 12px;\n --button-padding-bottom: 12px;\n --button-padding-left: 19px;\n --button-padding-right: 19px;\n --button-font-size: 14px;\n --button-border-radius: 4px;\n}\n\n.pops button.pops-button-small {\n --button-height: 24px;\n --button-padding-top: 5px;\n --button-padding-bottom: 5px;\n --button-padding-left: 11px;\n --button-padding-right: 11px;\n --button-font-size: 12px;\n --button-border-radius: 4px;\n}\n.pops-panel-button-no-icon .pops-panel-button_inner i {\n display: none;\n}\n.pops-panel-button-right-icon .pops-panel-button_inner {\n flex-direction: row-reverse;\n}\n.pops-panel-button .pops-panel-button_inner i:has(svg),\n.pops-panel-button-right-icon .pops-panel-button-text {\n margin-right: 6px;\n}\n\n.pops button[data-type=\"default\"] {\n --button-color: var(--button-default-color);\n --button-bd-color: var(--button-default-bd-color);\n --button-bg-color: var(--button-default-bg-color);\n}\n.pops button[data-type=\"default\"]:active {\n --button-color: var(--button-default-active-color);\n --button-bd-color: var(--button-default-active-bd-color);\n --button-bg-color: var(--button-default-active-bg-color);\n}\n.pops button[data-type=\"default\"]:hover {\n --button-color: var(--button-default-hover-color);\n --button-bd-color: var(--button-default-hover-bd-color);\n --button-bg-color: var(--button-default-hover-bg-color);\n}\n.pops button[data-type=\"default\"]:focus-visible {\n outline: var(--button-default-focus-visible-outline);\n outline-offset: var(--button-default-focus-visible-outline-offset);\n}\n.pops button[data-type=\"default\"]:disabled {\n --button-color: var(--button-default-disabled-color);\n --button-bd-color: var(--button-default-disabled-bd-color);\n --button-bg-color: var(--button-default-disabled-bg-color);\n}\n\n.pops button[data-type=\"primary\"] {\n --button-color: var(--button-primary-color);\n --button-bd-color: var(--button-primary-bd-color);\n --button-bg-color: var(--button-primary-bg-color);\n}\n.pops button[data-type=\"primary\"]:active {\n --button-color: var(--button-primary-active-color);\n --button-bd-color: var(--button-primary-active-bd-color);\n --button-bg-color: var(--button-primary-active-bg-color);\n}\n.pops button[data-type=\"primary\"]:hover {\n --button-color: var(--button-primary-hover-color);\n --button-bd-color: var(--button-primary-hover-bd-color);\n --button-bg-color: var(--button-primary-hover-bg-color);\n}\n.pops button[data-type=\"primary\"]:focus-visible {\n outline: var(--button-primary-focus-visible-outline);\n outline-offset: var(--button-primary-focus-visible-outline-offset);\n}\n.pops button[data-type=\"primary\"]:disabled {\n --button-color: var(--button-primary-disabled-color);\n --button-bd-color: var(--button-primary-disabled-bd-color);\n --button-bg-color: var(--button-primary-disabled-bg-color);\n}\n\n.pops button[data-type=\"success\"] {\n --button-color: var(--button-success-color);\n --button-bd-color: var(--button-success-bd-color);\n --button-bg-color: var(--button-success-bg-color);\n}\n.pops button[data-type=\"success\"]:active {\n --button-color: var(--button-success-active-color);\n --button-bd-color: var(--button-success-active-bd-color);\n --button-bg-color: var(--button-success-active-bg-color);\n}\n.pops button[data-type=\"success\"]:hover {\n --button-color: var(--button-success-hover-color);\n --button-bd-color: var(--button-success-hover-bd-color);\n --button-bg-color: var(--button-success-hover-bg-color);\n}\n.pops button[data-type=\"success\"]:focus-visible {\n outline: var(--button-success-focus-visible-outline);\n outline-offset: var(--button-success-focus-visible-outline-offset);\n}\n.pops button[data-type=\"success\"]:disabled {\n --button-color: var(--button-success-disabled-color);\n --button-bd-color: var(--button-success-disabled-bd-color);\n --button-bg-color: var(--button-success-disabled-bg-color);\n}\n\n.pops button[data-type=\"info\"] {\n --button-color: var(--button-info-color);\n --button-bd-color: var(--button-info-bd-color);\n --button-bg-color: var(--button-info-bg-color);\n}\n.pops button[data-type=\"info\"]:active {\n --button-color: var(--button-info-active-color);\n --button-bd-color: var(--button-info-active-bd-color);\n --button-bg-color: var(--button-info-active-bg-color);\n}\n.pops button[data-type=\"info\"]:hover {\n --button-color: var(--button-info-hover-color);\n --button-bd-color: var(--button-info-hover-bd-color);\n --button-bg-color: var(--button-info-hover-bg-color);\n}\n.pops button[data-type=\"info\"]:focus-visible {\n outline: var(--button-info-focus-visible-outline);\n outline-offset: var(--button-info-focus-visible-outline-offset);\n}\n.pops button[data-type=\"info\"]:disabled {\n --button-color: var(--button-info-disabled-color);\n --button-bd-color: var(--button-info-disabled-bd-color);\n --button-bg-color: var(--button-info-disabled-bg-color);\n}\n\n.pops button[data-type=\"warning\"] {\n --button-color: var(--button-warning-color);\n --button-bd-color: var(--button-warning-bd-color);\n --button-bg-color: var(--button-warning-bg-color);\n}\n.pops button[data-type=\"warning\"]:active {\n --button-color: var(--button-warning-active-color);\n --button-bd-color: var(--button-warning-active-bd-color);\n --button-bg-color: var(--button-warning-active-bg-color);\n}\n.pops button[data-type=\"warning\"]:hover {\n --button-color: var(--button-warning-hover-color);\n --button-bd-color: var(--button-warning-hover-bd-color);\n --button-bg-color: var(--button-warning-hover-bg-color);\n}\n.pops button[data-type=\"warning\"]:focus-visible {\n outline: var(--button-warning-focus-visible-outline);\n outline-offset: var(--button-warning-focus-visible-outline-offset);\n}\n.pops button[data-type=\"warning\"]:disabled {\n --button-color: var(--button-warning-disabled-color);\n --button-bd-color: var(--button-warning-disabled-bd-color);\n --button-bg-color: var(--button-warning-disabled-bg-color);\n}\n\n.pops button[data-type=\"danger\"] {\n --button-color: var(--button-danger-color);\n --button-bd-color: var(--button-danger-bd-color);\n --button-bg-color: var(--button-danger-bg-color);\n}\n.pops button[data-type=\"danger\"]:active {\n --button-color: var(--button-danger-active-color);\n --button-bd-color: var(--button-danger-active-bd-color);\n --button-bg-color: var(--button-danger-active-bg-color);\n}\n.pops button[data-type=\"danger\"]:hover {\n --button-color: var(--button-danger-hover-color);\n --button-bd-color: var(--button-danger-hover-bd-color);\n --button-bg-color: var(--button-danger-hover-bg-color);\n}\n.pops button[data-type=\"danger\"]:focus-visible {\n outline: var(--button-danger-focus-visible-outline);\n outline-offset: var(--button-danger-focus-visible-outline-offset);\n}\n.pops button[data-type=\"danger\"]:disabled {\n --button-color: var(--button-danger-disabled-color);\n --button-bd-color: var(--button-danger-disabled-bd-color);\n --button-bg-color: var(--button-danger-disabled-bg-color);\n}\n\n.pops button[data-type=\"xiaomi-primary\"] {\n --button-color: var(--button-xiaomi-primary-color);\n --button-bd-color: var(--button-xiaomi-primary-bd-color);\n --button-bg-color: var(--button-xiaomi-primary-bg-color);\n}\n.pops button[data-type=\"xiaomi-primary\"]:active {\n --button-color: var(--button-xiaomi-primary-active-color);\n --button-bd-color: var(--button-xiaomi-primary-active-bd-color);\n --button-bg-color: var(--button-xiaomi-primary-active-bg-color);\n}\n.pops button[data-type=\"xiaomi-primary\"]:hover {\n --button-color: var(--button-xiaomi-primary-hover-color);\n --button-bd-color: var(--button-xiaomi-primary-hover-bd-color);\n --button-bg-color: var(--button-xiaomi-primary-hover-bg-color);\n}\n.pops button[data-type=\"xiaomi-primary\"]:focus-visible {\n outline: var(--button-xiaomi-primary-focus-visible-outline);\n outline-offset: var(--button-xiaomi-primary-focus-visible-outline-offset);\n}\n.pops button[data-type=\"xiaomi-primary\"]:disabled {\n --button-color: var(--button-xiaomi-primary-disabled-color);\n --button-bd-color: var(--button-xiaomi-primary-disabled-bd-color);\n --button-bg-color: var(--button-xiaomi-primary-disabled-bg-color);\n}\n\n.pops button[data-type=\"violet\"] {\n --button-color: var(--button-violet-color);\n --button-bd-color: var(--button-violet-bd-color);\n --button-bg-color: var(--button-violet-bg-color);\n}\n.pops button[data-type=\"violet\"]:active {\n --button-color: var(--button-violet-active-color);\n --button-bd-color: var(--button-violet-active-bd-color);\n --button-bg-color: var(--button-violet-active-bg-color);\n}\n.pops button[data-type=\"violet\"]:hover {\n --button-color: var(--button-violet-hover-color);\n --button-bd-color: var(--button-violet-hover-bd-color);\n --button-bg-color: var(--button-violet-hover-bg-color);\n}\n.pops button[data-type=\"violet\"]:focus-visible {\n outline: var(--button-violet-focus-visible-outline);\n outline-offset: var(--button-violet-focus-visible-outline-offset);\n}\n.pops button[data-type=\"violet\"]:disabled {\n --button-color: var(--button-violet-disabled-color);\n --button-bd-color: var(--button-violet-disabled-bd-color);\n --button-bg-color: var(--button-violet-disabled-bg-color);\n}\n";
|
|
2835
2816
|
|
|
2836
|
-
var commonCSS = ".pops-flex-items-center {\n
|
|
2817
|
+
var commonCSS = ".pops-flex-items-center {\n display: flex;\n align-items: center;\n}\n.pops-flex-y-center {\n display: flex;\n justify-content: space-between;\n}\n.pops-flex-x-center {\n display: flex;\n align-content: center;\n}\n.pops-hide {\n display: none;\n}\n.pops-hide-important {\n display: none !important;\n}\n.pops-no-border {\n border: 0;\n}\n.pops-no-border-important {\n border: 0 !important;\n}\n.pops-user-select-none {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.pops-line-height-center {\n line-height: normal;\n align-content: center;\n}\n.pops-width-fill {\n width: -webkit-fill-available;\n width: -moz-available;\n}\n.pops-text-is-disabled {\n --pops-text-is-disabled-color: #a8abb2;\n color: var(--pops-text-is-disabled-color);\n --pops-panel-forms-container-item-left-desc-text-color: var(--pops-text-is-disabled-color);\n}\n.pops-text-is-disabled-important {\n --pops-text-is-disabled-color: #a8abb2;\n color: var(--pops-text-is-disabled-color) !important;\n --pops-panel-forms-container-item-left-desc-text-color: var(--pops-text-is-disabled-color) !important;\n}\n";
|
|
2837
2818
|
|
|
2838
|
-
var animCSS = "@keyframes rotating {\n\t0% {\n\t\ttransform: rotate(0);\n\t}\n\tto {\n\t\ttransform: rotate(360deg);\n\t}\n}\n@keyframes iframeLoadingChange_85 {\n\t0% {\n\t\tbackground: linear-gradient(to right, #4995dd, #fff, rgb(202 224 246));\n\t}\n\t20% {\n\t\tbackground: linear-gradient(to right, #4995dd, #ead0d0, rgb(123 185 246));\n\t}\n\t40% {\n\t\tbackground: linear-gradient(to right, #4995dd, #f4b7b7, rgb(112 178 244));\n\t}\n\t60% {\n\t\tbackground: linear-gradient(to right, #4995dd, #ec9393, rgb(80 163 246));\n\t}\n\t80% {\n\t\tbackground: linear-gradient(to right, #4995dd, #e87f7f, rgb(25 139 253));\n\t}\n\t100% {\n\t\tbackground: linear-gradient(to right, #4995dd, #ee2c2c, rgb(0 124 247));\n\t}\n\tfrom {\n\t\twidth: 75%;\n\t}\n\tto {\n\t\twidth: 100%;\n\t}\n}\n@keyframes iframeLoadingChange {\n\t0% {\n\t\tbackground: linear-gradient(to right, #4995dd, #fff, rgb(202 224 246));\n\t}\n\t20% {\n\t\tbackground: linear-gradient(to right, #4995dd, #ead0d0, rgb(123 185 246));\n\t}\n\t40% {\n\t\tbackground: linear-gradient(to right, #4995dd, #f4b7b7, rgb(112 178 244));\n\t}\n\t60% {\n\t\tbackground: linear-gradient(to right, #4995dd, #ec9393, rgb(80 163 246));\n\t}\n\t80% {\n\t\tbackground: linear-gradient(to right, #4995dd, #e87f7f, rgb(25 139 253));\n\t}\n\t100% {\n\t\tbackground: linear-gradient(to right, #4995dd, #ee2c2c, rgb(0 124 247));\n\t}\n\tfrom {\n\t\twidth: 0;\n\t}\n\tto {\n\t\twidth: 75%;\n\t}\n}\n\n@keyframes searchSelectFalIn {\n\tfrom {\n\t\topacity: 0;\n\t\tdisplay: none;\n\t}\n\tto {\n\t\tdisplay: block;\n\t\topacity: 1;\n\t}\n}\n@keyframes searchSelectFalOut {\n\tfrom {\n\t\tdisplay: block;\n\t\topacity: 1;\n\t}\n\tto {\n\t\topacity: 0;\n\t\tdisplay: none;\n\t}\n}\n\n@keyframes pops-anim-wait-rotate {\n\tform {\n\t\ttransform: rotate(0);\n\t}\n\tto {\n\t\ttransform: rotate(360deg);\n\t}\n}\n@keyframes pops-anim-spread {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: scaleX(0);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: scaleX(1);\n\t}\n}\n@keyframes pops-anim-shake {\n\t0%,\n\t100% {\n\t\ttransform: translateX(0);\n\t}\n\t10%,\n\t30%,\n\t50%,\n\t70%,\n\t90% {\n\t\ttransform: translateX(-10px);\n\t}\n\t20%,\n\t40%,\n\t60%,\n\t80% {\n\t\ttransform: translateX(10px);\n\t}\n}\n@keyframes pops-anim-rolling-left {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: translateX(-100%) rotate(-120deg);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: translateX(0) rotate(0);\n\t}\n}\n@keyframes pops-anim-rolling-right {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: translateX(100%) rotate(120deg);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: translateX(0) rotate(0);\n\t}\n}\n@keyframes pops-anim-slide-top {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: translateY(-200%);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: translateY(0);\n\t}\n}\n@keyframes pops-anim-slide-bottom {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: translateY(200%);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: translateY(0);\n\t}\n}\n@keyframes pops-anim-slide-left {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: translateX(-200%);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: translateX(0);\n\t}\n}\n@keyframes pops-anim-slide-right {\n\t0% {\n\t\ttransform: translateX(200%);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: translateX(0);\n\t}\n}\n@keyframes pops-anim-fadein {\n\t0% {\n\t\topacity: 0;\n\t}\n\t100% {\n\t\topacity: 1;\n\t}\n}\n@keyframes pops-anim-fadein-zoom {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: scale(0.5);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t}\n}\n@keyframes pops-anim-fadein-alert {\n\t0% {\n\t\ttransform: scale(0.5);\n\t}\n\t45% {\n\t\ttransform: scale(1.05);\n\t}\n\t80% {\n\t\ttransform: scale(0.95);\n\t}\n\t100% {\n\t\ttransform: scale(1);\n\t}\n}\n@keyframes pops-anim-don {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t2.08333% {\n\t\ttransform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t4.16667% {\n\t\ttransform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t6.25% {\n\t\ttransform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t8.33333% {\n\t\ttransform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t10.4167% {\n\t\ttransform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t12.5% {\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t14.5833% {\n\t\ttransform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t16.6667% {\n\t\ttransform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t18.75% {\n\t\ttransform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t20.8333% {\n\t\ttransform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t22.9167% {\n\t\ttransform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t25% {\n\t\ttransform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t27.0833% {\n\t\ttransform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t29.1667% {\n\t\ttransform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t31.25% {\n\t\ttransform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t33.3333% {\n\t\ttransform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t35.4167% {\n\t\ttransform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t37.5% {\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t39.5833% {\n\t\ttransform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t41.6667% {\n\t\ttransform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t43.75% {\n\t\ttransform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t45.8333% {\n\t\ttransform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t47.9167% {\n\t\ttransform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t50% {\n\t\topacity: 1;\n\t\ttransform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t52.0833% {\n\t\ttransform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t54.1667% {\n\t\ttransform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t56.25% {\n\t\ttransform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t58.3333% {\n\t\ttransform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t60.4167% {\n\t\ttransform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t62.5% {\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t64.5833% {\n\t\ttransform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t66.6667% {\n\t\ttransform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t68.75% {\n\t\ttransform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t70.8333% {\n\t\ttransform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t72.9167% {\n\t\ttransform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t75% {\n\t\ttransform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t77.0833% {\n\t\ttransform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t79.1667% {\n\t\ttransform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t81.25% {\n\t\ttransform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t83.3333% {\n\t\ttransform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t85.4167% {\n\t\ttransform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t87.5% {\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t89.5833% {\n\t\ttransform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t91.6667% {\n\t\ttransform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t93.75% {\n\t\ttransform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t95.8333% {\n\t\ttransform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t97.9167% {\n\t\ttransform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n}\n@keyframes pops-anim-roll {\n\t0% {\n\t\ttransform: perspective(1000px) rotate3d(1, 0, 0, 90deg);\n\t}\n\t100% {\n\t\ttransform: perspective(1000px) rotate3d(1, 0, 0, 0deg);\n\t}\n}\n@keyframes pops-anim-sandra {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: scale3d(1.1, 1.1, 1);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: scale3d(1, 1, 1);\n\t}\n}\n@keyframes pops-anim-gather {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: scale(5, 0);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: scale(1, 1);\n\t}\n}\n@keyframes pops-anim-spread-reverse {\n\t0% {\n\t\topacity: 1;\n\t\ttransform: scaleX(1);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\ttransform: scaleX(0);\n\t}\n}\n@keyframes pops-anim-shake-reverse {\n\t0%,\n\t100% {\n\t\ttransform: translateX(10px);\n\t}\n\t10%,\n\t30%,\n\t50%,\n\t70%,\n\t90% {\n\t\ttransform: translateX(-10px);\n\t}\n\t20%,\n\t40%,\n\t60%,\n\t80% {\n\t\ttransform: translateX(0);\n\t}\n}\n@keyframes pops-anim-rolling-left-reverse {\n\t0% {\n\t\topacity: 1;\n\t\ttransform: translateX(0) rotate(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\ttransform: translateX(-100%) rotate(-120deg);\n\t}\n}\n@keyframes pops-anim-rolling-right-reverse {\n\t0% {\n\t\topacity: 1;\n\t\ttransform: translateX(0) rotate(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\ttransform: translateX(100%) rotate(120deg);\n\t}\n}\n@keyframes pops-anim-slide-top-reverse {\n\t0% {\n\t\topacity: 1;\n\t\ttransform: translateY(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\ttransform: translateY(-200%);\n\t}\n}\n@keyframes pops-anim-slide-bottom-reverse {\n\t0% {\n\t\topacity: 1;\n\t\ttransform: translateY(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\ttransform: translateY(200%);\n\t}\n}\n@keyframes pops-anim-slide-left-reverse {\n\t0% {\n\t\topacity: 1;\n\t\ttransform: translateX(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\ttransform: translateX(-200%);\n\t}\n}\n@keyframes pops-anim-slide-right-reverse {\n\t0% {\n\t\topacity: 1;\n\t\ttransform: translateX(0);\n\t}\n\t100% {\n\t\ttransform: translateX(200%);\n\t}\n}\n@keyframes pops-anim-fadein-reverse {\n\t0% {\n\t\topacity: 1;\n\t}\n\t100% {\n\t\topacity: 0;\n\t}\n}\n@keyframes pops-anim-fadein-zoom-reverse {\n\t0% {\n\t\topacity: 1;\n\t\ttransform: scale(1);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\ttransform: scale(0.5);\n\t}\n}\n@keyframes pops-anim-fadein-alert-reverse {\n\t0% {\n\t\ttransform: scale(1);\n\t}\n\t45% {\n\t\ttransform: scale(0.95);\n\t}\n\t80% {\n\t\ttransform: scale(1.05);\n\t}\n\t100% {\n\t\ttransform: scale(0.5);\n\t}\n}\n@keyframes pops-anim-don-reverse {\n\t100% {\n\t\topacity: 0;\n\t\ttransform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t97.9167% {\n\t\ttransform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t95.8333% {\n\t\ttransform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t93.75% {\n\t\ttransform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t91.6667% {\n\t\ttransform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t89.5833% {\n\t\ttransform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t87.5% {\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t85.4167% {\n\t\ttransform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t83.3333% {\n\t\ttransform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t81.25% {\n\t\ttransform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t79.1667% {\n\t\ttransform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t77.0833% {\n\t\ttransform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t75% {\n\t\ttransform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t72.9167% {\n\t\ttransform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t70.8333% {\n\t\ttransform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t68.75% {\n\t\ttransform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t66.6667% {\n\t\ttransform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t64.5833% {\n\t\ttransform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t62.5% {\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t60.4167% {\n\t\ttransform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t58.3333% {\n\t\ttransform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t56.25% {\n\t\ttransform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t54.1667% {\n\t\ttransform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t52.0833% {\n\t\ttransform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t50% {\n\t\topacity: 1;\n\t\ttransform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t47.9167% {\n\t\ttransform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t45.8333% {\n\t\ttransform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t43.75% {\n\t\ttransform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t41.6667% {\n\t\ttransform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t39.5833% {\n\t\ttransform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t37.5% {\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t35.4167% {\n\t\ttransform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t33.3333% {\n\t\ttransform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t31.25% {\n\t\ttransform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t29.1667% {\n\t\ttransform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t27.0833% {\n\t\ttransform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t25% {\n\t\ttransform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t22.9167% {\n\t\ttransform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t20.8333% {\n\t\ttransform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t18.75% {\n\t\ttransform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t16.6667% {\n\t\ttransform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t14.5833% {\n\t\ttransform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t12.5% {\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t10.4167% {\n\t\ttransform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t8.33333% {\n\t\ttransform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t6.25% {\n\t\ttransform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t4.16667% {\n\t\ttransform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t2.08333% {\n\t\ttransform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n\t0% {\n\t\topacity: 1;\n\t\ttransform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n\t}\n}\n@keyframes pops-anim-roll-reverse {\n\t0% {\n\t\ttransform: perspective(1000px) rotate3d(1, 0, 0, 0deg);\n\t}\n\t100% {\n\t\ttransform: perspective(1000px) rotate3d(1, 0, 0, 90deg);\n\t}\n}\n@keyframes pops-anim-sandra-reverse {\n\t0% {\n\t\topacity: 1;\n\t\ttransform: scale3d(1, 1, 1);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\ttransform: scale3d(1.1, 1.1, 1);\n\t}\n}\n@keyframes pops-anim-gather-reverse {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: scale(5, 0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\ttransform: scale(5, 0);\n\t}\n}\n\n@-webkit-keyframes pops-motion-fadeInTop {\n\t0% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateY(-30px);\n\t\ttransform: translateY(-30px);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateX(0);\n\t\ttransform: translateX(0);\n\t}\n}\n@keyframes pops-motion-fadeInTop {\n\t0% {\n\t\topacity: 0;\n\t\ttransform: translateY(-30px);\n\t\t-ms-transform: translateY(-30px);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\ttransform: translateX(0);\n\t\t-ms-transform: translateX(0);\n\t}\n}\n@-webkit-keyframes pops-motion-fadeOutTop {\n\t0% {\n\t\topacity: 10;\n\t\t-webkit-transform: translateY(0);\n\t\ttransform: translateY(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateY(-30px);\n\t\ttransform: translateY(-30px);\n\t}\n}\n@keyframes pops-motion-fadeOutTop {\n\t0% {\n\t\topacity: 1;\n\t\ttransform: translateY(0);\n\t\t-ms-transform: translateY(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\ttransform: translateY(-30px);\n\t\t-ms-transform: translateY(-30px);\n\t}\n}\n@-webkit-keyframes pops-motion-fadeInBottom {\n\t0% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateY(20px);\n\t\ttransform: translateY(20px);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateY(0);\n\t\ttransform: translateY(0);\n\t}\n}\n@keyframes pops-motion-fadeInBottom {\n\t0% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateY(20px);\n\t\ttransform: translateY(20px);\n\t\t-ms-transform: translateY(20px);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateY(0);\n\t\ttransform: translateY(0);\n\t\t-ms-transform: translateY(0);\n\t}\n}\n@-webkit-keyframes pops-motion-fadeOutBottom {\n\t0% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateY(0);\n\t\ttransform: translateY(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateY(20px);\n\t\ttransform: translateY(20px);\n\t}\n}\n@keyframes pops-motion-fadeOutBottom {\n\t0% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateY(0);\n\t\ttransform: translateY(0);\n\t\t-ms-transform: translateY(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateY(20px);\n\t\ttransform: translateY(20px);\n\t\t-ms-transform: translateY(20px);\n\t}\n}\n@-webkit-keyframes pops-motion-fadeInLeft {\n\t0% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateX(-20px);\n\t\ttransform: translateX(-20px);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateX(0);\n\t\ttransform: translateX(0);\n\t}\n}\n@keyframes pops-motion-fadeInLeft {\n\t0% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateX(-30px);\n\t\ttransform: translateX(-30px);\n\t\t-ms-transform: translateX(-30px);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateX(0);\n\t\ttransform: translateX(0);\n\t\t-ms-transform: translateX(0);\n\t}\n}\n@-webkit-keyframes pops-motion-fadeOutLeft {\n\t0% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateX(0);\n\t\ttransform: translateX(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateX(-30px);\n\t\ttransform: translateX(-30px);\n\t}\n}\n@keyframes pops-motion-fadeOutLeft {\n\t0% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateX(0);\n\t\ttransform: translateX(0);\n\t\t-ms-transform: translateX(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateX(-20px);\n\t\ttransform: translateX(-20px);\n\t\t-ms-transform: translateX(-20px);\n\t}\n}\n@-webkit-keyframes pops-motion-fadeInRight {\n\t0% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateX(20px);\n\t\ttransform: translateX(20px);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateX(0);\n\t\ttransform: translateX(0);\n\t}\n}\n@keyframes pops-motion-fadeInRight {\n\t0% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateX(20px);\n\t\ttransform: translateX(20px);\n\t\t-ms-transform: translateX(20px);\n\t}\n\t100% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateX(0);\n\t\ttransform: translateX(0);\n\t\t-ms-transform: translateX(0);\n\t}\n}\n@-webkit-keyframes pops-motion-fadeOutRight {\n\t0% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateX(0);\n\t\ttransform: translateX(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateX(20px);\n\t\ttransform: translateX(20px);\n\t}\n}\n@keyframes pops-motion-fadeOutRight {\n\t0% {\n\t\topacity: 1;\n\t\t-webkit-transform: translateX(0);\n\t\ttransform: translateX(0);\n\t\t-ms-transform: translateX(0);\n\t}\n\t100% {\n\t\topacity: 0;\n\t\t-webkit-transform: translateX(20px);\n\t\ttransform: translateX(20px);\n\t\t-ms-transform: translateX(20px);\n\t}\n}\n\n/* 动画 */\n.pops-anim[anim=\"pops-anim-spread\"] {\n\tanimation: pops-anim-spread 0.3s;\n}\n.pops-anim[anim=\"pops-anim-shake\"] {\n\tanimation: pops-anim-shake 0.3s;\n}\n.pops-anim[anim=\"pops-anim-rolling-left\"] {\n\tanimation: pops-anim-rolling-left 0.3s;\n}\n.pops-anim[anim=\"pops-anim-rolling-right\"] {\n\tanimation: pops-anim-rolling-right 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-top\"] {\n\tanimation: pops-anim-slide-top 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-bottom\"] {\n\tanimation: pops-anim-slide-bottom 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-left\"] {\n\tanimation: pops-anim-slide-left 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-right\"] {\n\tanimation: pops-anim-slide-right 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein\"] {\n\tanimation: pops-anim-fadein 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein-zoom\"] {\n\tanimation: pops-anim-fadein-zoom 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein-alert\"] {\n\tanimation: pops-anim-fadein-alert 0.3s;\n}\n.pops-anim[anim=\"pops-anim-don\"] {\n\tanimation: pops-anim-don 0.3s;\n}\n.pops-anim[anim=\"pops-anim-roll\"] {\n\tanimation: pops-anim-roll 0.3s;\n}\n.pops-anim[anim=\"pops-anim-sandra\"] {\n\tanimation: pops-anim-sandra 0.3s;\n}\n.pops-anim[anim=\"pops-anim-gather\"] {\n\tanimation: pops-anim-gather 0.3s;\n}\n.pops-anim[anim=\"pops-anim-spread-reverse\"] {\n\tanimation: pops-anim-spread-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-shake-reverse\"] {\n\tanimation: pops-anim-shake-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-rolling-left-reverse\"] {\n\tanimation: pops-anim-rolling-left-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-rolling-right-reverse\"] {\n\tanimation: pops-anim-rolling-right-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-top-reverse\"] {\n\tanimation: pops-anim-slide-top-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-bottom-reverse\"] {\n\tanimation: pops-anim-slide-bottom-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-left-reverse\"] {\n\tanimation: pops-anim-slide-left-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-right-reverse\"] {\n\tanimation: pops-anim-slide-right-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein-reverse\"] {\n\tanimation: pops-anim-fadein-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein-zoom-reverse\"] {\n\tanimation: pops-anim-fadein-zoom-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein-alert-reverse\"] {\n\tanimation: pops-anim-fadein-alert-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-don-reverse\"] {\n\tanimation: pops-anim-don-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-roll-reverse\"] {\n\tanimation: pops-anim-roll-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-sandra-reverse\"] {\n\tanimation: pops-anim-sandra-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-gather-reverse\"] {\n\tanimation: pops-anim-gather-reverse 0.3s;\n}\n";
|
|
2819
|
+
var animCSS = "@keyframes rotating {\n 0% {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes iframeLoadingChange_85 {\n 0% {\n background: linear-gradient(to right, #4995dd, #fff, rgb(202 224 246));\n }\n 20% {\n background: linear-gradient(to right, #4995dd, #ead0d0, rgb(123 185 246));\n }\n 40% {\n background: linear-gradient(to right, #4995dd, #f4b7b7, rgb(112 178 244));\n }\n 60% {\n background: linear-gradient(to right, #4995dd, #ec9393, rgb(80 163 246));\n }\n 80% {\n background: linear-gradient(to right, #4995dd, #e87f7f, rgb(25 139 253));\n }\n 100% {\n background: linear-gradient(to right, #4995dd, #ee2c2c, rgb(0 124 247));\n }\n from {\n width: 75%;\n }\n to {\n width: 100%;\n }\n}\n@keyframes iframeLoadingChange {\n 0% {\n background: linear-gradient(to right, #4995dd, #fff, rgb(202 224 246));\n }\n 20% {\n background: linear-gradient(to right, #4995dd, #ead0d0, rgb(123 185 246));\n }\n 40% {\n background: linear-gradient(to right, #4995dd, #f4b7b7, rgb(112 178 244));\n }\n 60% {\n background: linear-gradient(to right, #4995dd, #ec9393, rgb(80 163 246));\n }\n 80% {\n background: linear-gradient(to right, #4995dd, #e87f7f, rgb(25 139 253));\n }\n 100% {\n background: linear-gradient(to right, #4995dd, #ee2c2c, rgb(0 124 247));\n }\n from {\n width: 0;\n }\n to {\n width: 75%;\n }\n}\n\n@keyframes searchSelectFalIn {\n from {\n opacity: 0;\n display: none;\n }\n to {\n display: block;\n opacity: 1;\n }\n}\n@keyframes searchSelectFalOut {\n from {\n display: block;\n opacity: 1;\n }\n to {\n opacity: 0;\n display: none;\n }\n}\n\n@keyframes pops-anim-wait-rotate {\n form {\n transform: rotate(0);\n }\n to {\n transform: rotate(360deg);\n }\n}\n@keyframes pops-anim-spread {\n 0% {\n opacity: 0;\n transform: scaleX(0);\n }\n 100% {\n opacity: 1;\n transform: scaleX(1);\n }\n}\n@keyframes pops-anim-shake {\n 0%,\n 100% {\n transform: translateX(0);\n }\n 10%,\n 30%,\n 50%,\n 70%,\n 90% {\n transform: translateX(-10px);\n }\n 20%,\n 40%,\n 60%,\n 80% {\n transform: translateX(10px);\n }\n}\n@keyframes pops-anim-rolling-left {\n 0% {\n opacity: 0;\n transform: translateX(-100%) rotate(-120deg);\n }\n 100% {\n opacity: 1;\n transform: translateX(0) rotate(0);\n }\n}\n@keyframes pops-anim-rolling-right {\n 0% {\n opacity: 0;\n transform: translateX(100%) rotate(120deg);\n }\n 100% {\n opacity: 1;\n transform: translateX(0) rotate(0);\n }\n}\n@keyframes pops-anim-slide-top {\n 0% {\n opacity: 0;\n transform: translateY(-200%);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@keyframes pops-anim-slide-bottom {\n 0% {\n opacity: 0;\n transform: translateY(200%);\n }\n 100% {\n opacity: 1;\n transform: translateY(0);\n }\n}\n@keyframes pops-anim-slide-left {\n 0% {\n opacity: 0;\n transform: translateX(-200%);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes pops-anim-slide-right {\n 0% {\n transform: translateX(200%);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n }\n}\n@keyframes pops-anim-fadein {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes pops-anim-fadein-zoom {\n 0% {\n opacity: 0;\n transform: scale(0.5);\n }\n 100% {\n opacity: 1;\n transform: scale(1);\n }\n}\n@keyframes pops-anim-fadein-alert {\n 0% {\n transform: scale(0.5);\n }\n 45% {\n transform: scale(1.05);\n }\n 80% {\n transform: scale(0.95);\n }\n 100% {\n transform: scale(1);\n }\n}\n@keyframes pops-anim-don {\n 0% {\n opacity: 0;\n transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 2.08333% {\n transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 4.16667% {\n transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 6.25% {\n transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 8.33333% {\n transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 10.4167% {\n transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 12.5% {\n transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 14.5833% {\n transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 16.6667% {\n transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 18.75% {\n transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 20.8333% {\n transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 22.9167% {\n transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 25% {\n transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 27.0833% {\n transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 29.1667% {\n transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 31.25% {\n transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 33.3333% {\n transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 35.4167% {\n transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 37.5% {\n transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 39.5833% {\n transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 41.6667% {\n transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 43.75% {\n transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 45.8333% {\n transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 47.9167% {\n transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 50% {\n opacity: 1;\n transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 52.0833% {\n transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 54.1667% {\n transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 56.25% {\n transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 58.3333% {\n transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 60.4167% {\n transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 62.5% {\n transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 64.5833% {\n transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 66.6667% {\n transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 68.75% {\n transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 70.8333% {\n transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 72.9167% {\n transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 75% {\n transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 77.0833% {\n transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 79.1667% {\n transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 81.25% {\n transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 83.3333% {\n transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 85.4167% {\n transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 87.5% {\n transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 89.5833% {\n transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 91.6667% {\n transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 93.75% {\n transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 95.8333% {\n transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 97.9167% {\n transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 100% {\n opacity: 1;\n transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n}\n@keyframes pops-anim-roll {\n 0% {\n transform: perspective(1000px) rotate3d(1, 0, 0, 90deg);\n }\n 100% {\n transform: perspective(1000px) rotate3d(1, 0, 0, 0deg);\n }\n}\n@keyframes pops-anim-sandra {\n 0% {\n opacity: 0;\n transform: scale3d(1.1, 1.1, 1);\n }\n 100% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n}\n@keyframes pops-anim-gather {\n 0% {\n opacity: 0;\n transform: scale(5, 0);\n }\n 100% {\n opacity: 1;\n transform: scale(1, 1);\n }\n}\n@keyframes pops-anim-spread-reverse {\n 0% {\n opacity: 1;\n transform: scaleX(1);\n }\n 100% {\n opacity: 0;\n transform: scaleX(0);\n }\n}\n@keyframes pops-anim-shake-reverse {\n 0%,\n 100% {\n transform: translateX(10px);\n }\n 10%,\n 30%,\n 50%,\n 70%,\n 90% {\n transform: translateX(-10px);\n }\n 20%,\n 40%,\n 60%,\n 80% {\n transform: translateX(0);\n }\n}\n@keyframes pops-anim-rolling-left-reverse {\n 0% {\n opacity: 1;\n transform: translateX(0) rotate(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-100%) rotate(-120deg);\n }\n}\n@keyframes pops-anim-rolling-right-reverse {\n 0% {\n opacity: 1;\n transform: translateX(0) rotate(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(100%) rotate(120deg);\n }\n}\n@keyframes pops-anim-slide-top-reverse {\n 0% {\n opacity: 1;\n transform: translateY(0);\n }\n 100% {\n opacity: 0;\n transform: translateY(-200%);\n }\n}\n@keyframes pops-anim-slide-bottom-reverse {\n 0% {\n opacity: 1;\n transform: translateY(0);\n }\n 100% {\n opacity: 0;\n transform: translateY(200%);\n }\n}\n@keyframes pops-anim-slide-left-reverse {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n transform: translateX(-200%);\n }\n}\n@keyframes pops-anim-slide-right-reverse {\n 0% {\n opacity: 1;\n transform: translateX(0);\n }\n 100% {\n transform: translateX(200%);\n }\n}\n@keyframes pops-anim-fadein-reverse {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n@keyframes pops-anim-fadein-zoom-reverse {\n 0% {\n opacity: 1;\n transform: scale(1);\n }\n 100% {\n opacity: 0;\n transform: scale(0.5);\n }\n}\n@keyframes pops-anim-fadein-alert-reverse {\n 0% {\n transform: scale(1);\n }\n 45% {\n transform: scale(0.95);\n }\n 80% {\n transform: scale(1.05);\n }\n 100% {\n transform: scale(0.5);\n }\n}\n@keyframes pops-anim-don-reverse {\n 100% {\n opacity: 0;\n transform: matrix3d(0.7, 0, 0, 0, 0, 0.7, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 97.9167% {\n transform: matrix3d(0.75266, 0, 0, 0, 0, 0.76342, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 95.8333% {\n transform: matrix3d(0.81071, 0, 0, 0, 0, 0.84545, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 93.75% {\n transform: matrix3d(0.86808, 0, 0, 0, 0, 0.9286, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 91.6667% {\n transform: matrix3d(0.92038, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 89.5833% {\n transform: matrix3d(0.96482, 0, 0, 0, 0, 1.05202, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 87.5% {\n transform: matrix3d(1, 0, 0, 0, 0, 1.08204, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 85.4167% {\n transform: matrix3d(1.02563, 0, 0, 0, 0, 1.09149, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 83.3333% {\n transform: matrix3d(1.04227, 0, 0, 0, 0, 1.08453, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 81.25% {\n transform: matrix3d(1.05102, 0, 0, 0, 0, 1.06666, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 79.1667% {\n transform: matrix3d(1.05334, 0, 0, 0, 0, 1.04355, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 77.0833% {\n transform: matrix3d(1.05078, 0, 0, 0, 0, 1.02012, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 75% {\n transform: matrix3d(1.04487, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 72.9167% {\n transform: matrix3d(1.03699, 0, 0, 0, 0, 0.98534, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 70.8333% {\n transform: matrix3d(1.02831, 0, 0, 0, 0, 0.97688, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 68.75% {\n transform: matrix3d(1.01973, 0, 0, 0, 0, 0.97422, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 66.6667% {\n transform: matrix3d(1.01191, 0, 0, 0, 0, 0.97618, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 64.5833% {\n transform: matrix3d(1.00526, 0, 0, 0, 0, 0.98122, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 62.5% {\n transform: matrix3d(1, 0, 0, 0, 0, 0.98773, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 60.4167% {\n transform: matrix3d(0.99617, 0, 0, 0, 0, 0.99433, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 58.3333% {\n transform: matrix3d(0.99368, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 56.25% {\n transform: matrix3d(0.99237, 0, 0, 0, 0, 1.00413, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 54.1667% {\n transform: matrix3d(0.99202, 0, 0, 0, 0, 1.00651, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 52.0833% {\n transform: matrix3d(0.99241, 0, 0, 0, 0, 1.00726, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 50% {\n opacity: 1;\n transform: matrix3d(0.99329, 0, 0, 0, 0, 1.00671, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 47.9167% {\n transform: matrix3d(0.99447, 0, 0, 0, 0, 1.00529, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 45.8333% {\n transform: matrix3d(0.99577, 0, 0, 0, 0, 1.00346, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 43.75% {\n transform: matrix3d(0.99705, 0, 0, 0, 0, 1.0016, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 41.6667% {\n transform: matrix3d(0.99822, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 39.5833% {\n transform: matrix3d(0.99921, 0, 0, 0, 0, 0.99884, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 37.5% {\n transform: matrix3d(1, 0, 0, 0, 0, 0.99816, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 35.4167% {\n transform: matrix3d(1.00057, 0, 0, 0, 0, 0.99795, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 33.3333% {\n transform: matrix3d(1.00095, 0, 0, 0, 0, 0.99811, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 31.25% {\n transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99851, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 29.1667% {\n transform: matrix3d(1.00119, 0, 0, 0, 0, 0.99903, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 27.0833% {\n transform: matrix3d(1.00114, 0, 0, 0, 0, 0.99955, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 25% {\n transform: matrix3d(1.001, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 22.9167% {\n transform: matrix3d(1.00083, 0, 0, 0, 0, 1.00033, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 20.8333% {\n transform: matrix3d(1.00063, 0, 0, 0, 0, 1.00052, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 18.75% {\n transform: matrix3d(1.00044, 0, 0, 0, 0, 1.00058, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 16.6667% {\n transform: matrix3d(1.00027, 0, 0, 0, 0, 1.00053, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 14.5833% {\n transform: matrix3d(1.00012, 0, 0, 0, 0, 1.00042, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 12.5% {\n transform: matrix3d(1, 0, 0, 0, 0, 1.00027, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 10.4167% {\n transform: matrix3d(0.99991, 0, 0, 0, 0, 1.00013, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 8.33333% {\n transform: matrix3d(0.99986, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 6.25% {\n transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99991, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 4.16667% {\n transform: matrix3d(0.99982, 0, 0, 0, 0, 0.99985, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 2.08333% {\n transform: matrix3d(0.99983, 0, 0, 0, 0, 0.99984, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n 0% {\n opacity: 1;\n transform: matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1);\n }\n}\n@keyframes pops-anim-roll-reverse {\n 0% {\n transform: perspective(1000px) rotate3d(1, 0, 0, 0deg);\n }\n 100% {\n transform: perspective(1000px) rotate3d(1, 0, 0, 90deg);\n }\n}\n@keyframes pops-anim-sandra-reverse {\n 0% {\n opacity: 1;\n transform: scale3d(1, 1, 1);\n }\n 100% {\n opacity: 0;\n transform: scale3d(1.1, 1.1, 1);\n }\n}\n@keyframes pops-anim-gather-reverse {\n 0% {\n opacity: 0;\n transform: scale(5, 0);\n }\n 100% {\n opacity: 0;\n transform: scale(5, 0);\n }\n}\n\n@-webkit-keyframes pops-motion-fadeInTop {\n 0% {\n opacity: 0;\n -webkit-transform: translateY(-30px);\n transform: translateY(-30px);\n }\n 100% {\n opacity: 1;\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@keyframes pops-motion-fadeInTop {\n 0% {\n opacity: 0;\n transform: translateY(-30px);\n -ms-transform: translateY(-30px);\n }\n 100% {\n opacity: 1;\n transform: translateX(0);\n -ms-transform: translateX(0);\n }\n}\n@-webkit-keyframes pops-motion-fadeOutTop {\n 0% {\n opacity: 10;\n -webkit-transform: translateY(0);\n transform: translateY(0);\n }\n 100% {\n opacity: 0;\n -webkit-transform: translateY(-30px);\n transform: translateY(-30px);\n }\n}\n@keyframes pops-motion-fadeOutTop {\n 0% {\n opacity: 1;\n transform: translateY(0);\n -ms-transform: translateY(0);\n }\n 100% {\n opacity: 0;\n transform: translateY(-30px);\n -ms-transform: translateY(-30px);\n }\n}\n@-webkit-keyframes pops-motion-fadeInBottom {\n 0% {\n opacity: 0;\n -webkit-transform: translateY(20px);\n transform: translateY(20px);\n }\n 100% {\n opacity: 1;\n -webkit-transform: translateY(0);\n transform: translateY(0);\n }\n}\n@keyframes pops-motion-fadeInBottom {\n 0% {\n opacity: 0;\n -webkit-transform: translateY(20px);\n transform: translateY(20px);\n -ms-transform: translateY(20px);\n }\n 100% {\n opacity: 1;\n -webkit-transform: translateY(0);\n transform: translateY(0);\n -ms-transform: translateY(0);\n }\n}\n@-webkit-keyframes pops-motion-fadeOutBottom {\n 0% {\n opacity: 1;\n -webkit-transform: translateY(0);\n transform: translateY(0);\n }\n 100% {\n opacity: 0;\n -webkit-transform: translateY(20px);\n transform: translateY(20px);\n }\n}\n@keyframes pops-motion-fadeOutBottom {\n 0% {\n opacity: 1;\n -webkit-transform: translateY(0);\n transform: translateY(0);\n -ms-transform: translateY(0);\n }\n 100% {\n opacity: 0;\n -webkit-transform: translateY(20px);\n transform: translateY(20px);\n -ms-transform: translateY(20px);\n }\n}\n@-webkit-keyframes pops-motion-fadeInLeft {\n 0% {\n opacity: 0;\n -webkit-transform: translateX(-20px);\n transform: translateX(-20px);\n }\n 100% {\n opacity: 1;\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@keyframes pops-motion-fadeInLeft {\n 0% {\n opacity: 0;\n -webkit-transform: translateX(-30px);\n transform: translateX(-30px);\n -ms-transform: translateX(-30px);\n }\n 100% {\n opacity: 1;\n -webkit-transform: translateX(0);\n transform: translateX(0);\n -ms-transform: translateX(0);\n }\n}\n@-webkit-keyframes pops-motion-fadeOutLeft {\n 0% {\n opacity: 1;\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n -webkit-transform: translateX(-30px);\n transform: translateX(-30px);\n }\n}\n@keyframes pops-motion-fadeOutLeft {\n 0% {\n opacity: 1;\n -webkit-transform: translateX(0);\n transform: translateX(0);\n -ms-transform: translateX(0);\n }\n 100% {\n opacity: 0;\n -webkit-transform: translateX(-20px);\n transform: translateX(-20px);\n -ms-transform: translateX(-20px);\n }\n}\n@-webkit-keyframes pops-motion-fadeInRight {\n 0% {\n opacity: 0;\n -webkit-transform: translateX(20px);\n transform: translateX(20px);\n }\n 100% {\n opacity: 1;\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n}\n@keyframes pops-motion-fadeInRight {\n 0% {\n opacity: 0;\n -webkit-transform: translateX(20px);\n transform: translateX(20px);\n -ms-transform: translateX(20px);\n }\n 100% {\n opacity: 1;\n -webkit-transform: translateX(0);\n transform: translateX(0);\n -ms-transform: translateX(0);\n }\n}\n@-webkit-keyframes pops-motion-fadeOutRight {\n 0% {\n opacity: 1;\n -webkit-transform: translateX(0);\n transform: translateX(0);\n }\n 100% {\n opacity: 0;\n -webkit-transform: translateX(20px);\n transform: translateX(20px);\n }\n}\n@keyframes pops-motion-fadeOutRight {\n 0% {\n opacity: 1;\n -webkit-transform: translateX(0);\n transform: translateX(0);\n -ms-transform: translateX(0);\n }\n 100% {\n opacity: 0;\n -webkit-transform: translateX(20px);\n transform: translateX(20px);\n -ms-transform: translateX(20px);\n }\n}\n\n/* 动画 */\n.pops-anim[anim=\"pops-anim-spread\"] {\n animation: pops-anim-spread 0.3s;\n}\n.pops-anim[anim=\"pops-anim-shake\"] {\n animation: pops-anim-shake 0.3s;\n}\n.pops-anim[anim=\"pops-anim-rolling-left\"] {\n animation: pops-anim-rolling-left 0.3s;\n}\n.pops-anim[anim=\"pops-anim-rolling-right\"] {\n animation: pops-anim-rolling-right 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-top\"] {\n animation: pops-anim-slide-top 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-bottom\"] {\n animation: pops-anim-slide-bottom 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-left\"] {\n animation: pops-anim-slide-left 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-right\"] {\n animation: pops-anim-slide-right 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein\"] {\n animation: pops-anim-fadein 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein-zoom\"] {\n animation: pops-anim-fadein-zoom 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein-alert\"] {\n animation: pops-anim-fadein-alert 0.3s;\n}\n.pops-anim[anim=\"pops-anim-don\"] {\n animation: pops-anim-don 0.3s;\n}\n.pops-anim[anim=\"pops-anim-roll\"] {\n animation: pops-anim-roll 0.3s;\n}\n.pops-anim[anim=\"pops-anim-sandra\"] {\n animation: pops-anim-sandra 0.3s;\n}\n.pops-anim[anim=\"pops-anim-gather\"] {\n animation: pops-anim-gather 0.3s;\n}\n.pops-anim[anim=\"pops-anim-spread-reverse\"] {\n animation: pops-anim-spread-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-shake-reverse\"] {\n animation: pops-anim-shake-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-rolling-left-reverse\"] {\n animation: pops-anim-rolling-left-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-rolling-right-reverse\"] {\n animation: pops-anim-rolling-right-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-top-reverse\"] {\n animation: pops-anim-slide-top-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-bottom-reverse\"] {\n animation: pops-anim-slide-bottom-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-left-reverse\"] {\n animation: pops-anim-slide-left-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-slide-right-reverse\"] {\n animation: pops-anim-slide-right-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein-reverse\"] {\n animation: pops-anim-fadein-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein-zoom-reverse\"] {\n animation: pops-anim-fadein-zoom-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-fadein-alert-reverse\"] {\n animation: pops-anim-fadein-alert-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-don-reverse\"] {\n animation: pops-anim-don-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-roll-reverse\"] {\n animation: pops-anim-roll-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-sandra-reverse\"] {\n animation: pops-anim-sandra-reverse 0.3s;\n}\n.pops-anim[anim=\"pops-anim-gather-reverse\"] {\n animation: pops-anim-gather-reverse 0.3s;\n}\n";
|
|
2839
2820
|
|
|
2840
2821
|
var alertCSS = "";
|
|
2841
2822
|
|
|
2842
2823
|
var confirmCSS = "";
|
|
2843
2824
|
|
|
2844
|
-
var promptCSS = ".pops[type-value=\"prompt\"] {\n
|
|
2825
|
+
var promptCSS = ".pops[type-value=\"prompt\"] {\n --input-color: #000000;\n --input-bg-color: none;\n --input-placeholder-color: #a1a4ac;\n}\n.pops[type-value=\"prompt\"] input[pops],\n.pops[type-value=\"prompt\"] textarea[pops] {\n width: 100%;\n height: 100%;\n outline: 0;\n border: 0;\n color: var(--input-color);\n background-color: var(--input-bg-color);\n}\n\n.pops[type-value=\"prompt\"] input[pops] {\n padding: 5px 10px;\n}\n.pops[type-value=\"prompt\"] textarea[pops] {\n padding: 5px 10px;\n resize: none;\n}\n\n.pops[type-value=\"prompt\"] input[pops]::placeholder,\n.pops[type-value=\"prompt\"] textarea[pops]::placeholder {\n color: var(--input-placeholder-color);\n}\n@media (prefers-color-scheme: dark) {\n .pops[type-value=\"prompt\"] {\n --input-color: #ffffff;\n --input-bg-color: #333333;\n --input-placeholder-color: #8d9095;\n }\n}\n";
|
|
2845
2826
|
|
|
2846
|
-
var loadingCSS = ".pops[type-value=\"loading\"] {\n
|
|
2827
|
+
var loadingCSS = ".pops[type-value=\"loading\"] {\n --loading-bd-color: rgba(0, 0, 0, 0.2);\n --loading-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n --loading-box-shadow-color: rgb(0 0 0 / 50%);\n --loading-icon-color: rgba(100, 149, 237, 0.1);\n --loading-icon-bd-top-color: rgb(100, 149, 237, var(--pops-bd-opacity));\n}\n.pops[type-value=\"loading\"] {\n position: absolute;\n top: 272.5px;\n top: 50%;\n left: 26px;\n left: 50%;\n display: flex;\n overflow: hidden;\n padding: 10px 15px;\n max-width: 100%;\n max-height: 100%;\n min-width: 0;\n min-height: 0;\n border: 1px solid var(--loading-bd-color);\n border-radius: 5px;\n background-color: var(--loading-bg-color);\n box-shadow: 0 0 5px var(--loading-box-shadow-color);\n vertical-align: middle;\n transition: all 0.35s;\n transform: translate(-50%, -50%);\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n flex-direction: column;\n align-items: center;\n justify-content: center;\n align-content: center;\n}\n.pops[type-value=\"loading\"]:before {\n float: left;\n display: inline-block;\n width: 2em;\n height: 2em;\n border: 0.3em solid var(--loading-icon-color);\n border-top: 0.3em solid var(--loading-icon-bd-top-color);\n border-radius: 50%;\n content: \" \";\n vertical-align: middle;\n font-size: inherit;\n animation: pops-anim-wait-rotate 1.2s linear infinite;\n}\n.pops[type-value=\"loading\"] .pops-loading-content {\n position: static;\n top: 0;\n bottom: 0;\n float: left;\n overflow: hidden;\n width: auto;\n font-size: inherit;\n line-height: normal;\n align-content: center;\n}\n\n@media (prefers-color-scheme: dark) {\n .pops[type-value=\"loading\"] {\n --loading-bg-color: #222222;\n }\n}\n";
|
|
2847
2828
|
|
|
2848
|
-
var iframeCSS = ".pops[type-value=\"iframe\"] {\n
|
|
2829
|
+
var iframeCSS = ".pops[type-value=\"iframe\"] {\n --container-title-height: 55px;\n transition:\n width 0.35s ease,\n height 0.35s ease;\n}\n.pops[type-value=\"iframe\"] .pops-content {\n overflow: hidden;\n}\n.pops-loading {\n position: absolute;\n top: 40px;\n right: 0;\n bottom: 0;\n left: 0;\n z-index: 5;\n background-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n}\n.pops-loading:before {\n position: absolute;\n top: 50%;\n left: 50%;\n z-index: 3;\n display: block;\n margin: -20px 0 0 -20px;\n padding: 20px;\n border: 4px solid rgb(221, 221, 221, var(--pops-bd-opacity));\n border-radius: 50%;\n content: \"\";\n border-top-color: transparent;\n animation: pops-anim-wait-rotate 1.2s linear infinite;\n}\n.pops[type-value=\"iframe\"].pops[type-module=\"min\"] {\n bottom: 0;\n max-width: 200px;\n max-height: 53px;\n position: unset;\n}\n.pops[type-value=\"iframe\"].pops[type-module=\"min\"] .pops-header-control[data-type=\"min\"] {\n display: none;\n}\n.pops[type-value=\"iframe\"].pops-iframe-unset-top {\n top: unset !important;\n}\n.pops[type-value=\"iframe\"].pops-iframe-unset-left {\n left: unset !important;\n}\n.pops[type-value=\"iframe\"].pops-iframe-unset-transform {\n transform: none !important;\n}\n.pops[type-value=\"iframe\"].pops-iframe-unset-transition {\n transition: none !important;\n}\n.pops[type-value=\"iframe\"].pops[type-module=\"max\"] {\n width: 100% !important;\n height: 100% !important;\n}\n.pops[type-value=\"iframe\"] iframe[pops] {\n width: 100%;\n height: 100%;\n border: 0;\n}\n.pops-iframe-content-global-loading {\n position: absolute;\n top: 0;\n left: 0;\n z-index: 999999;\n width: 0;\n height: 4px;\n background: linear-gradient(to right, #4995dd, #fff, rgb(202 224 246));\n animation: iframeLoadingChange 2s forwards;\n}\n\n.pops-anim:has(.pops[type-value=\"iframe\"].pops[type-module=\"min\"]) {\n position: unset;\n}\n";
|
|
2849
2830
|
|
|
2850
|
-
var tooltipCSS = ".pops-tip {\n
|
|
2831
|
+
var tooltipCSS = ".pops-tip {\n --pops-bg-opacity: 1;\n --tooltip-color: #4e4e4e;\n --tooltip-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n --tooltip-bd-radius: 2px;\n --tooltip-box-shadow-left-color: rgba(0, 0, 0, 0.24);\n --tooltip-box-shadow-right-color: rgba(0, 0, 0, 0.12);\n --tooltip-font-size: 14px;\n --tooltip-padding-top: 13px;\n --tooltip-padding-right: 13px;\n --tooltip-padding-bottom: 13px;\n --tooltip-padding-left: 13px;\n\n --tooltip-arrow-box-shadow-left-color: rgba(0, 0, 0, 0.24);\n --tooltip-arrow-box-shadow-right-color: rgba(0, 0, 0, 0.12);\n --tooltip-arrow--after-color: rgb(78, 78, 78);\n --tooltip-arrow--after-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n --tooltip-arrow--after-width: 12px;\n --tooltip-arrow--after-height: 12px;\n}\n.pops-tip {\n padding: var(--tooltip-padding-top) var(--tooltip-padding-right) var(--tooltip-padding-bottom)\n var(--tooltip-padding-left);\n max-width: 400px;\n max-height: 300px;\n border-radius: var(--tooltip-bd-radius);\n background-color: var(--tooltip-bg-color);\n box-shadow:\n 0 1.5px 4px var(--tooltip-box-shadow-left-color),\n 0 1.5px 6px var(--tooltip-box-shadow-right-color);\n color: var(--tooltip-color);\n font-size: var(--tooltip-font-size);\n}\n.pops-tip[data-position=\"absolute\"] {\n position: absolute;\n}\n.pops-tip[data-position=\"fixed\"] {\n position: fixed;\n}\n\n.pops-tip .pops-tip-arrow {\n position: absolute;\n top: 100%;\n left: 50%;\n overflow: hidden;\n width: 100%;\n height: 12.5px;\n transform: translateX(-50%);\n}\n\n.pops-tip .pops-tip-arrow::after {\n position: absolute;\n top: 0;\n left: 50%;\n width: var(--tooltip-arrow--after-width);\n height: var(--tooltip-arrow--after-height);\n background: var(--tooltip-arrow--after-bg-color);\n color: var(--tooltip-arrow--after-color);\n box-shadow:\n 0 1px 7px var(--tooltip-arrow-box-shadow-left-color),\n 0 1px 7px var(--tooltip-arrow-box-shadow-right-color);\n content: \"\";\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n}\n\n.pops-tip .pops-tip-arrow[data-position=\"bottom\"] {\n position: absolute;\n top: 100%;\n left: 50%;\n overflow: hidden;\n width: 100%;\n height: 12.5px;\n transform: translateX(-50%);\n}\n\n.pops-tip .pops-tip-arrow[data-position=\"bottom\"]:after {\n position: absolute;\n top: 0;\n left: 50%;\n width: var(--tooltip-arrow--after-width);\n height: var(--tooltip-arrow--after-height);\n background: var(--tooltip-arrow--after-bg-color);\n box-shadow:\n 0 1px 7px var(--tooltip-arrow-box-shadow-left-color),\n 0 1px 7px var(--tooltip-arrow-box-shadow-right-color);\n content: \"\";\n transform: translateX(-50%) translateY(-50%) rotate(45deg);\n}\n\n.pops-tip .pops-tip-arrow[data-position=\"left\"] {\n top: 50%;\n left: -12.5px;\n width: 12.5px;\n height: 50px;\n transform: translateY(-50%);\n}\n\n.pops-tip .pops-tip-arrow[data-position=\"left\"]:after {\n position: absolute;\n top: 50%;\n left: 100%;\n content: \"\";\n}\n\n.pops-tip .pops-tip-arrow[data-position=\"right\"] {\n top: 50%;\n right: -12.5px;\n left: auto;\n width: 12.5px;\n height: 50px;\n transform: translateY(-50%);\n}\n\n.pops-tip .pops-tip-arrow[data-position=\"right\"]:after {\n position: absolute;\n top: 50%;\n left: 0;\n content: \"\";\n}\n\n.pops-tip .pops-tip-arrow[data-position=\"top\"] {\n top: -12.5px;\n left: 50%;\n transform: translateX(-50%);\n}\n\n.pops-tip .pops-tip-arrow[data-position=\"top\"]:after {\n position: absolute;\n top: 100%;\n left: 50%;\n content: \"\";\n}\n\n.pops-tip[data-motion] {\n -webkit-animation-duration: 0.25s;\n animation-duration: 0.25s;\n -webkit-animation-fill-mode: forwards;\n animation-fill-mode: forwards;\n}\n.pops-tip[data-motion=\"fadeOutRight\"] {\n -webkit-animation-name: pops-motion-fadeOutRight;\n animation-name: pops-motion-fadeOutRight;\n}\n.pops-tip[data-motion=\"fadeInTop\"] {\n -webkit-animation-name: pops-motion-fadeInTop;\n animation-name: pops-motion-fadeInTop;\n animation-timing-function: cubic-bezier(0.49, 0.49, 0.13, 1.3);\n}\n.pops-tip[data-motion=\"fadeOutTop\"] {\n -webkit-animation-name: pops-motion-fadeOutTop;\n animation-name: pops-motion-fadeOutTop;\n animation-timing-function: cubic-bezier(0.32, 0.37, 0.06, 0.87);\n}\n.pops-tip[data-motion=\"fadeInBottom\"] {\n -webkit-animation-name: pops-motion-fadeInBottom;\n animation-name: pops-motion-fadeInBottom;\n}\n.pops-tip[data-motion=\"fadeOutBottom\"] {\n -webkit-animation-name: pops-motion-fadeOutBottom;\n animation-name: pops-motion-fadeOutBottom;\n}\n.pops-tip[data-motion=\"fadeInLeft\"] {\n -webkit-animation-name: pops-motion-fadeInLeft;\n animation-name: pops-motion-fadeInLeft;\n}\n.pops-tip[data-motion=\"fadeOutLeft\"] {\n -webkit-animation-name: pops-motion-fadeOutLeft;\n animation-name: pops-motion-fadeOutLeft;\n}\n.pops-tip[data-motion=\"fadeInRight\"] {\n -webkit-animation-name: pops-motion-fadeInRight;\n animation-name: pops-motion-fadeInRight;\n}\n\n/* github的样式 */\n.pops-tip.github-tooltip {\n --tooltip-bg-opacity: 1;\n --tooltip-color: #ffffff;\n --tooltip-bg-color: rgb(36, 41, 47, var(--tooltip-bg-opacity));\n --tooltip-bd-radius: 6px;\n --tooltip-padding-top: 6px;\n --tooltip-padding-right: 8px;\n --tooltip-padding-bottom: 6px;\n --tooltip-padding-left: 8px;\n\n --tooltip-arrow--after-color: rgb(255, 255, 255);\n --tooltip-arrow--after-bg-color: rgb(36, 41, 47, var(--tooltip-bg-opacity));\n --tooltip-arrow--after-width: 8px;\n --tooltip-arrow--after-height: 8px;\n}\n\n@media (prefers-color-scheme: dark) {\n .pops-tip {\n --tooltip-color: #ffffff;\n --tooltip-bg-color: #fafafa;\n --tooltip-arrow--after-color: #fafafa;\n --tooltip-arrow--after-bg-color: rgb(250, 250, 250, var(--pops-bg-opacity));\n }\n}\n";
|
|
2851
2832
|
|
|
2852
|
-
var drawerCSS = ".pops[type-value=\"drawer\"] {\n
|
|
2833
|
+
var drawerCSS = ".pops[type-value=\"drawer\"] {\n position: fixed;\n box-sizing: border-box;\n display: flex;\n flex-direction: column;\n box-shadow:\n 0px 16px 48px 16px rgba(0, 0, 0, 0.08),\n 0px 12px 32px rgba(0, 0, 0, 0.12),\n 0px 8px 16px -8px rgba(0, 0, 0, 0.16);\n overflow: hidden;\n transition: all 0.3s;\n}\n\n.pops[type-value=\"drawer\"][direction=\"top\"] {\n width: 100%;\n left: 0;\n right: 0;\n top: 0;\n}\n.pops[type-value=\"drawer\"][direction=\"bottom\"] {\n width: 100%;\n left: 0;\n right: 0;\n bottom: 0;\n}\n.pops[type-value=\"drawer\"][direction=\"left\"] {\n height: 100%;\n top: 0;\n bottom: 0;\n left: 0;\n}\n.pops[type-value=\"drawer\"][direction=\"right\"] {\n height: 100%;\n top: 0;\n bottom: 0;\n right: 0;\n}\n";
|
|
2853
2834
|
|
|
2854
|
-
var folderCSS = ".pops-folder-list {\n
|
|
2835
|
+
var folderCSS = ".pops-folder-list {\n --folder-arrow-fill-color: #d4d7de;\n --folder-arrow-active-fill-color: #06a7ff;\n --header-breadcrumb-text-color: #06a7ff;\n --header-breadcrumb-all-files-text-color: var(--header-breadcrumb-text-color);\n --header-breadcrumb-all-files-first-text-color: var(--header-breadcrumb-text-color);\n --header-breadcrumb-all-files-last-text-color: #999999;\n --table-header-row-text-color: #818999;\n --table-body-td-text-color: rgb(247, 248, 250, var(--pops-bg-opacity));\n --table-body-th-text-color: rgb(247, 248, 250, var(--pops-bg-opacity));\n --table-body-row-text-color: #05082c;\n --table-body-row-file-name-text-color: #05082c;\n --table-body-row-hover-bd-color: rgb(245, 246, 247, var(--pops-bg-opacity));\n --table-body-row-hover-bg-color: rgb(245, 246, 247, var(--pops-bg-opacity));\n --table-body-row-file-name-hover-text-color: #06a7ff;\n --table-body-row-content-text-color: #818999;\n}\n.pops-folder-list .cursor-p {\n cursor: pointer;\n}\n.pops-folder-list a {\n background: 0 0;\n text-decoration: none;\n -webkit-tap-highlight-color: transparent;\n color: var(--header-breadcrumb-text-color);\n}\ntable.pops-folder-list-table__body,\ntable.pops-folder-list-table__header {\n width: 100%;\n table-layout: fixed;\n border-collapse: collapse;\n border-spacing: 0;\n padding: 0 20px;\n}\ntable.pops-folder-list-table__body,\ntable.pops-folder-list-table__header {\n height: 100%;\n background: 0 0;\n overflow: hidden;\n display: -webkit-box;\n display: -ms-flexbox;\n -ms-flex-direction: column;\n -webkit-box-orient: vertical;\n -webkit-box-direction: normal;\n}\ntable.pops-folder-list-table__body {\n height: 100%;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.pops-folder-list table tr {\n line-height: normal;\n align-content: center;\n}\n.pops-folder-list-table__header-row {\n height: 50px;\n line-height: normal;\n align-content: center;\n color: var(--table-header-row-text-color);\n text-align: left;\n font-size: 12px;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.pops-folder-list-table__body-row {\n height: 50px;\n line-height: normal;\n align-content: center;\n color: var(--table-body-row-text-color);\n font-size: 12px;\n}\n.pops-folder-list-table__body-row:hover {\n background-color: var(--table-body-row-hover-bg-color);\n border-color: var(--table-body-row-hover-bd-color);\n border: 0;\n outline: none;\n}\n.pops-folder-list table th {\n border: 0;\n border-bottom: 1px solid var(--table-body-th-text-color);\n}\n.pops-folder-list table td {\n border: 0;\n border-bottom: 1px solid var(--table-body-td-text-color);\n position: relative;\n}\n.pops-folder-list .list-name-text {\n display: inline-block;\n padding-left: 12px;\n line-height: normal;\n align-content: center;\n max-width: 176px;\n}\n.pops-folder-list-file-name > div {\n display: flex;\n align-items: center;\n}\n\n.pops-mobile-folder-list-file-name {\n display: flex;\n align-items: center;\n}\n.pops-mobile-folder-list-file-name > div {\n display: flex;\n flex-wrap: wrap;\n justify-content: flex-start;\n align-items: flex-start;\n padding: 6px 0px;\n flex-direction: column;\n}\n.pops-mobile-folder-list-file-name img.pops-folder-list-file-icon {\n width: 45px;\n height: 45px;\n}\n.pops-mobile-folder-list-file-name a.pops-folder-list-file-name-title-text {\n padding-left: unset;\n max-width: 250px;\n overflow-x: hidden;\n font-weight: 400;\n line-height: unset;\n margin-bottom: 4px;\n white-space: normal;\n text-overflow: unset;\n}\n\n/* 修改滚动 */\n.pops-folder-content {\n overflow: hidden !important;\n}\n.pops-folder-content .pops-folder-list {\n height: 100%;\n display: flex;\n flex-direction: column;\n}\n.pops-folder-content .pops-folder-list-table__body-div {\n height: 100%;\n flex: 1 auto;\n overflow: auto;\n padding-bottom: 0;\n}\n.pops-mobile-folder-content .pops-folder-list-table__body-div {\n height: 100%;\n flex: 1 auto;\n overflow: auto;\n padding-bottom: 0;\n}\n.pops-folder-content table.pops-folder-list-table__body {\n overflow: auto;\n}\n.pops-folder-content .pops-folder-list-table__header-div {\n flex: 0;\n}\n.pops-mobile-folder-content .pops-folder-list-table__header-div {\n display: none;\n}\n\n.pops-folder-list .pops-folder-list-file-name-title-text {\n color: var(--table-body-row-file-name-text-color);\n}\n.pops-folder-list .pops-folder-list-file-name-title-text:hover {\n text-decoration: none;\n color: var(--table-body-row-file-name-hover-text-color);\n}\n.pops-folder-list .text-ellip {\n overflow: hidden;\n white-space: nowrap;\n text-overflow: ellipsis;\n}\n.pops-folder-list .content {\n color: var(--table-body-row-content-text-color);\n position: relative;\n width: 100%;\n text-align: left;\n}\n.pops-folder-list .inline-block-v-middle {\n display: inline-block;\n vertical-align: middle;\n}\n.pops-folder-list .flex-a-i-center {\n display: flex;\n align-items: center;\n}\n.pops-folder-list .u-file-icon {\n display: inline-block;\n vertical-align: middle;\n}\n.pops-folder-list .u-file-icon--list {\n width: 32px;\n height: 32px;\n}\n.pops-folder-list .pops-folder-list-file-icon {\n line-height: normal;\n align-content: center;\n position: relative;\n vertical-align: middle;\n}\n.pops-folder-list .pops-folder-file-list-breadcrumb-primary {\n flex: 1;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n min-height: 17px;\n flex-wrap: wrap;\n}\n.pops-folder-list .pops-folder-list-table__sort {\n display: inline-flex;\n margin-left: 4px;\n flex-direction: column;\n}\n\n.pops-folder-list .pops-folder-icon-arrow {\n width: 10px;\n height: 10px;\n fill: var(--folder-arrow-fill-color);\n}\n.pops-folder-list .pops-folder-icon-active {\n fill: var(--folder-arrow-active-fill-color);\n}\n.pops-folder-list .pops-folder-file-list-breadcrumb {\n padding: 4px 20px;\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n display: -webkit-box;\n display: -webkit-flex;\n display: -ms-flexbox;\n display: flex;\n -webkit-box-align: center;\n -webkit-align-items: center;\n -ms-flex-align: center;\n align-items: center;\n -webkit-box-orient: horizontal;\n -webkit-box-direction: normal;\n -webkit-flex-direction: row;\n -ms-flex-direction: row;\n flex-direction: row;\n -webkit-box-pack: start;\n -webkit-justify-content: start;\n -ms-flex-pack: start;\n justify-content: flex-start;\n min-height: 35px;\n}\n.pops-folder-list .pops-folder-file-list-breadcrumb-allFiles {\n font-size: 12px;\n color: var(--header-breadcrumb-all-files-text-color);\n line-height: normal;\n align-content: center;\n font-weight: 700;\n display: inline-block;\n max-width: 140px;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n word-wrap: normal;\n}\n.pops-folder-list .pops-folder-file-list-breadcrumb-allFiles:last-child a {\n color: var(--header-breadcrumb-all-files-last-text-color);\n}\n.pops-folder-list .pops-folder-file-list-breadcrumb-allFiles:first-child a {\n font-size: 14px;\n color: var(--header-breadcrumb-all-files-first-text-color);\n}\n.pops-folder-list .pops-folder-file-list-breadcrumb .iconArrow {\n width: 16px;\n height: 16px;\n}\n.pops-folder-list .iconArrow {\n background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAASCAMAAABYd88+AAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAABFUExURUdwTOLi4uLi4t7e3uPj49/f397e3t3d3f///97e3vDw8N3d3d7e3t3d3d3d3ejo6N/f397e3t7e3t3d3d/f393d3d3d3RK+NoEAAAAWdFJOUwAnM4YPU/iQA+UIeMDaHhY41i7zX7UebpjFAAAAUElEQVQI15XOORaAIAwE0LATXHCd+x9VfCiksXCq+UUWou8oZ1vXHrt7YVBiYkW4gdMKYFIC4CSATWCNHWPuM6HuHkr1x3N0ZrBu/9gl0b9c3+kF7C7hS1YAAAAASUVORK5CYII=)\n 55% 50%/6px 9px no-repeat;\n}\n\n@media (prefers-color-scheme: dark) {\n .pops[type-value=\"folder\"] {\n --pops-title-border-color: rgb(73, 83, 102, var(--pops-bg-opacity));\n --pops-bottom-btn-controls-border-color: rgb(73, 83, 102, var(--pops-bg-opacity));\n }\n .pops-folder-list {\n --header-breadcrumb-text-color: #06a7ff;\n --header-breadcrumb-all-files-text-color: var(--header-breadcrumb-text-color);\n --header-breadcrumb-all-files-first-text-color: var(--header-breadcrumb-text-color);\n --header-breadcrumb-all-files-last-text-color: #818999;\n --table-body-row-text-color: #f7f8fa;\n --table-body-td-text-color: rgb(73, 83, 102, var(--pops-bg-opacity));\n --table-body-th-text-color: rgb(73, 83, 102, var(--pops-bg-opacity));\n --table-body-td-text-color: #495366;\n --table-body-row-hover-bd-color: #1f2022;\n --table-body-row-hover-bg-color: #1f2022;\n --table-body-row-file-name-text-color: #f7f8fa;\n }\n}\n";
|
|
2855
2836
|
|
|
2856
|
-
var panelCSS = ".pops[type-value=\"panel\"] {\n\t--pops-bg-color: #f2f2f2;\n\t--pops-color: #333333;\n\t--panel-title-bg-color: #ffffff;\n\n\t--panel-aside-bg-color: #ffffff;\n\t--panel-aside-hover-color: rgb(64, 158, 255);\n\t--panel-aside-hover-bg-color: rgba(64, 158, 255, 0.1);\n\n\t--pops-panel-forms-margin-top-bottom: 10px;\n\t--pops-panel-forms-margin-left-right: 20px;\n\t--pops-panel-forms-header-icon-size: calc(var(--pops-panel-forms-container-li-padding-left-right) + 1px);\n\t--pops-panel-forms-header-padding-top-bottom: 15px;\n\t--pops-panel-forms-header-padding-left-right: 10px;\n\t--pops-panel-forms-container-item-left-text-gap: 6px;\n\t--pops-panel-forms-container-item-left-desc-text-size: 0.8em;\n\t--pops-panel-forms-container-item-left-desc-text-color: #6c6c6c;\n\t--pops-panel-forms-container-item-bg-color: #ffffff;\n\t--pops-panel-forms-container-item-title-color: #333;\n\t--pops-panel-forms-container-item-border-radius: 6px;\n\t--pops-panel-forms-container-item-margin-top-bottom: 10px;\n\t--pops-panel-forms-container-item-margin-left-right: var(--pops-panel-forms-margin-left-right);\n\t--pops-panel-forms-container-li-border-color: var(--pops-bd-color);\n\t--pops-panel-forms-container-li-padding-top-bottom: 12px;\n\t--pops-panel-forms-container-li-padding-left-right: 16px;\n\n\t--pops-panel-forms-container-deepMenu-item-active-bg: #e9e9e9;\n}\n.pops[type-value=\"panel\"] {\n\tcolor: var(--pops-color);\n\tbackground: var(--pops-bg-color);\n}\n.pops[type-value] .pops-panel-title {\n\tbackground: var(--panel-title-bg-color);\n}\n\n/* ↓panel的CSS↓ */\n/* 左侧的列表 */\naside.pops-panel-aside {\n\tbox-sizing: border-box;\n\tflex-shrink: 0;\n\tmax-width: 200px;\n\tmin-width: 100px;\n\theight: 100%;\n\tbackground: var(--panel-aside-bg-color);\n\tborder-right: 1px solid var(--panel-aside-bg-color);\n\tfont-size: 0.9em;\n\tdisplay: flex;\n\tflex-direction: column;\n\tjustify-content: space-between;\n}\naside.pops-panel-aside {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n}\naside.pops-panel-aside .pops-panel-aside-top-container {\n\toverflow: auto;\n}\naside.pops-panel-aside ul li {\n\tmargin: 6px 8px;\n\tborder-radius: 4px;\n\tpadding: 6px 10px;\n\tcursor: default;\n\tdisplay: flex;\n\talign-items: center;\n\tjustify-content: flex-start;\n}\naside.pops-panel-aside .pops-is-visited,\naside.pops-panel-aside ul li:not(.pops-panel-disabled-aside-hover-css):hover {\n\tcolor: var(--panel-aside-hover-color);\n\tbackground: var(--panel-aside-hover-bg-color);\n}\n/* 左侧的列表 */\n\n.pops-panel-content {\n\tdisplay: flex;\n\tflex-direction: row;\n\tflex: 1;\n\toverflow: auto;\n\tflex-basis: auto;\n\tbox-sizing: border-box;\n\tmin-width: 0;\n\tbottom: 0 !important;\n}\n\n.pops-panel-section-wrapper {\n\twidth: 100%;\n\toverflow: hidden;\n\tdisplay: flex;\n\tflex-direction: column;\n}\n\nsection.pops-panel-container {\n\twidth: 100%;\n\toverflow: hidden;\n\tdisplay: flex;\n\tflex-direction: column;\n}\nsection.pops-panel-container .pops-panel-container-header-ul,\nsection.pops-panel-container .pops-panel-deepMenu-container-header-ul {\n\tborder-bottom: 1px solid rgba(223, 223, 223, var(--pops-bg-opacity));\n\tflex: 0 auto;\n}\nsection.pops-panel-container .pops-panel-container-header-ul li,\nsection.pops-panel-container .pops-panel-container-header-ul li.pops-panel-container-header-title-text {\n\tdisplay: flex;\n\tjustify-content: flex-start !important;\n\tmargin: 0px !important;\n\tpadding: var(--pops-panel-forms-header-padding-top-bottom)\n\t\tcalc(var(--pops-panel-forms-margin-left-right) + var(--pops-panel-forms-container-li-padding-left-right));\n\ttext-align: left;\n}\nsection.pops-panel-container ul.pops-panel-container-main-ul {\n\toverflow: auto;\n\t/*flex: 1;*/\n}\nsection.pops-panel-container > ul li:not(.pops-panel-forms-container-item) {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tmargin: var(--pops-panel-forms-margin-top-bottom)\n\t\tcalc(var(--pops-panel-forms-margin-left-right) + var(--pops-panel-forms-margin-left-right));\n\tgap: 10px;\n}\nsection.pops-panel-container .pops-panel-forms-container-item-header-text {\n\tmargin: 10px;\n\tmargin-left: calc(\n\t\tvar(--pops-panel-forms-margin-left-right) + var(--pops-panel-forms-container-li-padding-left-right)\n\t);\n\tfont-size: 0.9em;\n\ttext-align: left;\n\tcolor: var(--pops-panel-forms-container-item-title-color);\n}\nsection.pops-panel-container li.pops-panel-forms-container-item {\n\t/* 去除<li>左侧的圆点 */\n\tdisplay: block;\n}\nsection.pops-panel-container .pops-panel-forms-container-item ul.pops-panel-forms-container-item-formlist {\n\tborder-radius: var(--pops-panel-forms-container-item-border-radius);\n\tbackground: var(--pops-panel-forms-container-item-bg-color);\n\tmargin: var(--pops-panel-forms-container-item-margin-top-bottom) var(--pops-panel-forms-margin-left-right);\n}\nsection.pops-panel-container .pops-panel-forms-container-item ul.pops-panel-forms-container-item-formlist li {\n\tdisplay: flex;\n\tjustify-content: space-between;\n\talign-items: center;\n\tpadding: var(--pops-panel-forms-container-li-padding-top-bottom)\n\t\tvar(--pops-panel-forms-container-li-padding-left-right);\n\tmargin: 0px 0px;\n\tborder-bottom: 1px solid var(--pops-panel-forms-container-li-border-color);\n\ttext-align: left;\n}\n/*section.pops-panel-container\n\t.pops-panel-forms-container-item\n\tul\n\tli.pops-panel-deepMenu-nav-item {\n\tpadding: var(--pops-panel-forms-container-li-padding-top-bottom) 0px;\n\tmargin: 0px var(--pops-panel-forms-container-li-padding-left-right);\n\tborder-bottom: 1px solid var(--pops-panel-forms-container-li-border-color);\n}*/\nsection.pops-panel-container\n\t.pops-panel-forms-container-item\n\tul.pops-panel-forms-container-item-formlist\n\tli:last-child {\n\tborder: 0px;\n}\n/* 左侧的文字 */\nsection.pops-panel-container .pops-panel-item-left-text {\n\tdisplay: flex;\n\tflex-direction: column;\n\tgap: var(--pops-panel-forms-container-item-left-text-gap);\n}\n\n/* 左侧的主文字 */\n/*section.pops-panel-container .pops-panel-item-left-main-text {\n\t\n}*/\n/* 左侧的描述文字 */\nsection.pops-panel-container .pops-panel-item-left-desc-text {\n\tfont-size: var(--pops-panel-forms-container-item-left-desc-text-size);\n\tcolor: var(--pops-panel-forms-container-item-left-desc-text-color);\n}\n\n/* 折叠面板 */\nsection.pops-panel-container .pops-panel-forms-fold {\n\tborder-radius: var(--pops-panel-forms-container-item-border-radius);\n\tbackground: var(--pops-panel-forms-container-item-bg-color);\n\tmargin: var(--pops-panel-forms-margin-top-bottom) var(--pops-panel-forms-margin-left-right);\n}\nsection.pops-panel-container .pops-panel-forms-fold .pops-panel-forms-fold-container {\n\tdisplay: flex;\n\talign-items: center;\n\tfill: #6c6c6c;\n\tjustify-content: space-between;\n\tmargin: 0px var(--pops-panel-forms-container-li-padding-left-right) !important;\n\tpadding: var(--pops-panel-forms-container-li-padding-top-bottom) 0px !important;\n}\nsection.pops-panel-container .pops-panel-forms-fold[data-fold-enable] .pops-panel-forms-fold-container-icon {\n\ttransform: rotate(90deg);\n}\nsection.pops-panel-container .pops-panel-forms-fold .pops-panel-forms-fold-container-icon {\n\twidth: 15px;\n\theight: 15px;\n\tdisplay: flex;\n\talign-items: center;\n\ttransform: rotate(-90deg);\n\ttransition: transform 0.3s;\n}\n/* 折叠状态 */\nsection.pops-panel-container\n\t.pops-panel-forms-fold[data-fold-enable]\n\t.pops-panel-forms-container-item-formlist {\n\theight: 0;\n}\n/* 非折叠状态 */\nsection.pops-panel-container .pops-panel-forms-fold ul.pops-panel-forms-container-item-formlist {\n\tmargin: 0;\n}\nsection.pops-panel-container .pops-panel-forms-fold .pops-panel-forms-container-item-formlist {\n\ttransition: height 0.3s;\n\toverflow: hidden;\n\tborder-radius: unset;\n\tbackground: unset;\n\tmargin: 0;\n\theight: calc-size(auto, size);\n}\n/* 折叠面板 */\n\n/* 姑且认为小于600px的屏幕为移动端 */\n@media (max-width: 600px) {\n\t/* 兼容移动端CSS */\n\t.pops[type-value=\"panel\"] {\n\t\t--pops-panel-forms-margin-left-right: 10px;\n\t}\n\t.pops[type-value=\"panel\"] {\n\t\twidth: 92%;\n\t\twidth: 92vw;\n\t\twidth: 92dvw;\n\t}\n\t.pops[type-value=\"panel\"] .pops-panel-content aside.pops-panel-aside {\n\t\tmax-width: 20%;\n\t\tmin-width: auto;\n\t}\n\t.pops[type-value=\"panel\"] section.pops-panel-container .pops-panel-forms-container-item > div {\n\t\ttext-align: left;\n\t\t--pops-panel-forms-margin-left-right: 0px;\n\t}\n\t.pops[type-value=\"panel\"] section.pops-panel-container .pops-panel-forms-container-item ul {\n\t\tmargin: 0px !important;\n\t}\n\t.pops[type-value=\"panel\"] section.pops-panel-container > ul > li {\n\t\tmargin: 10px 10px;\n\t}\n\t.pops[type-value=\"panel\"] section.pops-panel-container > ul > li div:nth-child(2) {\n\t\tmax-width: 55%;\n\t}\n\t.pops[type-value=\"panel\"] section.pops-panel-container .pops-panel-select select {\n\t\tmin-width: 88px !important;\n\t\twidth: -webkit-fill-available;\n\t\twidth: -moz-available;\n\t}\n\t.pops[type-value=\"panel\"] section.pops-panel-container .pops-panel-container-header-ul li {\n\t\tfont-size: 16px;\n\t}\n\t.pops[type-value=\"panel\"] .pops-panel-title p[pops],\n\t.pops[type-value=\"panel\"] section.pops-panel-container > ul li,\n\t.pops[type-value=\"panel\"] aside.pops-panel-aside ul li {\n\t\tfont-size: 14px;\n\t}\n}\n/* switch的CSS */\n.pops-panel-switch {\n\t--panel-switch-core-bd-color: rgb(220, 223, 230, var(--pops-bd-opacity));\n\t--panel-switch-core-bg-color: rgb(220, 223, 230, var(--pops-bg-opacity));\n\t--panel-switch-circle-color: #dcdfe6;\n\t--panel-switch-circle-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n\t--panel-switch-checked-circle-color: #409eff;\n\t--panel-switch-checked-core-bd-color: rgb(64, 158, 255, var(--pops-bd-opacity));\n\t--panel-switch-checked-core-bg-color: rgb(64, 158, 255, var(--pops-bg-opacity));\n}\n.pops-panel-switch {\n\tdisplay: inline-flex;\n\tflex-direction: row-reverse;\n\talign-items: center;\n\tposition: relative;\n\tfont-size: 14px;\n\tline-height: normal;\n\talign-content: center;\n\theight: 32px;\n\tvertical-align: middle;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\t-moz-user-select: none;\n}\n.pops-panel-switch input.pops-panel-switch__input {\n\tposition: absolute;\n\twidth: 0;\n\theight: 0;\n\topacity: 0;\n\tmargin: 0;\n}\n.pops-panel-switch:has(input.pops-panel-switch__input:disabled),\n.pops-panel-switch[data-disabled],\n.pops-panel-switch[data-disabled] .pops-panel-switch__core,\n.pops-panel-switch input.pops-panel-switch__input:disabled + .pops-panel-switch__core {\n\tcursor: not-allowed;\n\topacity: 0.6;\n}\n.pops-panel-switch span.pops-panel-switch__core {\n\tdisplay: inline-flex;\n\tposition: relative;\n\talign-items: center;\n\tmin-width: 40px;\n\theight: 20px;\n\tborder: 1px solid var(--panel-switch-core-bd-color);\n\toutline: 0;\n\tborder-radius: 10px;\n\tbox-sizing: border-box;\n\tbackground: var(--panel-switch-core-bg-color);\n\tcursor: pointer;\n\ttransition:\n\t\tborder-color 0.3s,\n\t\tbackground-color 0.3s;\n}\n.pops-panel-switch .pops-panel-switch__action {\n\tposition: absolute;\n\tleft: 1px;\n\tborder-radius: 100%;\n\ttransition: all 0.3s;\n\twidth: 16px;\n\theight: 16px;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\tbackground-color: var(--panel-switch-circle-bg-color);\n\tcolor: var(--panel-switch-circle-color);\n}\n.pops-panel-switch.pops-panel-switch-is-checked span.pops-panel-switch__core {\n\tborder-color: var(--panel-switch-checked-core-bd-color);\n\tbackground-color: var(--panel-switch-checked-core-bg-color);\n}\n.pops-panel-switch.pops-panel-switch-is-checked .pops-panel-switch__action {\n\tleft: calc(100% - 17px);\n\tcolor: var(--panel-switch-checked-circle-color);\n}\n/* switch的CSS */\n\n/* slider旧的CSS */\nsection.pops-panel-container .pops-panel-slider:has(> input[type=\"range\"]) {\n\toverflow: hidden;\n\theight: 25px;\n\tline-height: normal;\n\talign-content: center;\n\tdisplay: flex;\n\talign-items: center;\n}\nsection.pops-panel-container .pops-panel-slider input[type=\"range\"] {\n\theight: 6px;\n\tbackground: rgb(228, 231, 237, var(--pops-bg-opacity));\n\toutline: 0;\n\t-webkit-appearance: none;\n\tappearance: none;\n\twidth: 100%;\n}\nsection.pops-panel-container .pops-panel-slider input[type=\"range\"]::-webkit-slider-thumb {\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 50%;\n\tborder: 1px solid rgb(64, 158, 255, var(--pops-bd-opacity));\n\tbackground-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n\tbox-shadow:\n\t\t0 0 2px rgba(0, 0, 0, 0.3),\n\t\t0 3px 5px rgba(0, 0, 0, 0.2);\n\tcursor: pointer;\n\t-webkit-appearance: none;\n\tappearance: none;\n\tborder-image: linear-gradient(#409eff, #409eff) 0 fill/9 25 9 0/0 0 0 100vw;\n}\nsection.pops-panel-container .pops-panel-slider input[type=\"range\"]::-moz-range-thumb {\n\twidth: 20px;\n\theight: 20px;\n\tborder-radius: 50%;\n\tborder: 1px solid rgb(64, 159, 255, var(--pops-bd-opacity));\n\tbackground-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n\tbox-shadow:\n\t\t0 0 2px rgba(0, 0, 0, 0.3),\n\t\t0 3px 5px rgba(0, 0, 0, 0.2);\n\tcursor: pointer;\n\t-webkit-appearance: none;\n\tappearance: none;\n}\nsection.pops-panel-container .pops-panel-slider input[type=\"range\"]::-moz-range-progress {\n\theight: 6px;\n\tborder-image: linear-gradient(#409eff, #409eff) 0 fill/9 25 9 0/0 0 0 100vw;\n}\n/* slider旧的CSS */\n\n/* slider的CSS */\n.pops-slider {\n\t--pops-slider-color-white: #ffffff;\n\t--pops-slider-color-primary: #409eff;\n\t--pops-slider-color-info: #909399;\n\t--pops-slider-text-color-placeholder: #a8abb2;\n\t--pops-slider-border-color-light: #e4e7ed;\n\t--pops-slider-border-radius-circle: 100%;\n\t--pops-slider-transition-duration-fast: 0.2s;\n\n\t--pops-slider-main-bg-color: var(--pops-slider-color-primary);\n\t--pops-slider-runway-bg-color: var(--pops-slider-border-color-light);\n\t--pops-slider-stop-bg-color: var(--pops-slider-color-white);\n\t--pops-slider-disabled-color: var(--pops-slider-text-color-placeholder);\n\t--pops-slider-border-radius: 3px;\n\t--pops-slider-height: 6px;\n\t--pops-slider-button-size: 20px;\n\t--pops-slider-button-wrapper-size: 36px;\n\t--pops-slider-button-wrapper-offset: -15px;\n}\n\n.pops-slider {\n\twidth: 100%;\n\theight: 32px;\n\tdisplay: flex;\n\talign-items: center;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-ms-user-select: none;\n\t-moz-user-select: none;\n}\n\n.pops-slider-width {\n\tflex: 0 0 52%;\n\tmargin-left: 10px;\n}\n\n.pops-slider__runway {\n\tflex: 1;\n\theight: var(--pops-slider-height);\n\tbackground-color: var(--pops-slider-runway-bg-color);\n\tborder-radius: var(--pops-slider-border-radius);\n\tposition: relative;\n\tcursor: pointer;\n}\n\n.pops-slider__runway.show-input {\n\tmargin-right: 30px;\n\twidth: auto;\n}\n\n.pops-slider__runway.pops-slider-is-disabled {\n\tcursor: default;\n}\n\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__bar {\n\tbackground-color: var(--pops-slider-disabled-color);\n}\n\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button {\n\tborder-color: var(--pops-slider-disabled-color);\n}\n\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button:hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.dragging {\n\tcursor: not-allowed;\n}\n\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button:hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.dragging {\n\ttransform: scale(1);\n}\n\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button:hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.dragging {\n\tcursor: not-allowed;\n}\n\n.pops-slider__input {\n\tflex-shrink: 0;\n\twidth: 130px;\n}\n\n.pops-slider__bar {\n\theight: var(--pops-slider-height);\n\tbackground-color: var(--pops-slider-main-bg-color);\n\tborder-top-left-radius: var(--pops-slider-border-radius);\n\tborder-bottom-left-radius: var(--pops-slider-border-radius);\n\tposition: absolute;\n}\n\n.pops-slider__button-wrapper {\n\theight: var(--pops-slider-button-wrapper-size);\n\twidth: var(--pops-slider-button-wrapper-size);\n\tposition: absolute;\n\tz-index: 1;\n\ttop: var(--pops-slider-button-wrapper-offset);\n\ttransform: translate(-50%);\n\tbackground-color: transparent;\n\ttext-align: center;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tline-height: normal;\n\toutline: none;\n}\n\n.pops-slider__button-wrapper:after {\n\tdisplay: inline-block;\n\tcontent: \"\";\n\theight: 100%;\n\tvertical-align: middle;\n}\n\n.pops-slider__button:hover,\n.pops-slider__button.hover {\n\tcursor: grab;\n}\n\n.pops-slider__button {\n\tdisplay: inline-block;\n\twidth: var(--pops-slider-button-size);\n\theight: var(--pops-slider-button-size);\n\tvertical-align: middle;\n\tborder: solid 2px var(--pops-slider-main-bg-color);\n\tbackground-color: var(--pops-slider-color-white);\n\tborder-radius: 50%;\n\tbox-sizing: border-box;\n\ttransition: var(--pops-slider-transition-duration-fast);\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n}\n\n.pops-slider__button:hover,\n.pops-slider__button.hover,\n.pops-slider__button.dragging {\n\ttransform: scale(1.2);\n}\n\n.pops-slider__button:hover,\n.pops-slider__button.hover {\n\tcursor: grab;\n}\n\n.pops-slider__button.dragging {\n\tcursor: grabbing;\n}\n\n.pops-slider__stop {\n\tposition: absolute;\n\theight: var(--pops-slider-height);\n\twidth: var(--pops-slider-height);\n\tborder-radius: var(--pops-slider-border-radius-circle);\n\tbackground-color: var(--pops-slider-stop-bg-color);\n\ttransform: translate(-50%);\n}\n\n.pops-slider__marks {\n\ttop: 0;\n\tleft: 12px;\n\twidth: 18px;\n\theight: 100%;\n}\n\n.pops-slider__marks-text {\n\tposition: absolute;\n\ttransform: translate(-50%);\n\tfont-size: 14px;\n\tcolor: var(--pops-slider-color-info);\n\tmargin-top: 15px;\n\twhite-space: pre;\n}\n\n.pops-slider.is-vertical {\n\tposition: relative;\n\tdisplay: inline-flex;\n\twidth: auto;\n\theight: 100%;\n\tflex: 0;\n}\n\n.pops-slider.is-vertical .pops-slider__runway {\n\twidth: var(--pops-slider-height);\n\theight: 100%;\n\tmargin: 0 16px;\n}\n\n.pops-slider.is-vertical .pops-slider__bar {\n\twidth: var(--pops-slider-height);\n\theight: auto;\n\tborder-radius: 0 0 3px 3px;\n}\n\n.pops-slider.is-vertical .pops-slider__button-wrapper {\n\ttop: auto;\n\tleft: var(--pops-slider-button-wrapper-offset);\n\ttransform: translateY(50%);\n}\n\n.pops-slider.is-vertical .pops-slider__stop {\n\ttransform: translateY(50%);\n}\n\n.pops-slider.is-vertical .pops-slider__marks-text {\n\tmargin-top: 0;\n\tleft: 15px;\n\ttransform: translateY(50%);\n}\n\n.pops-slider--large {\n\theight: 40px;\n}\n\n.pops-slider--small {\n\theight: 24px;\n}\n/* slider的CSS */\n\n/* input的CSS */\n.pops-panel-input {\n\t--el-disabled-text-color: #a8abb2;\n\t--el-disabled-bg-color: #f5f7fa;\n\t--el-disabled-border-color: #e4e7ed;\n\n\t--pops-panel-components-input-text-color: #000000;\n\t--pops-panel-components-input-text-bg-color: transparent;\n\t--pops-panel-components-input-text-default-padding: 8px;\n\t--pops-panel-components-input-bd-color: #dcdfe6;\n\t--pops-panel-components-input-bg-color: #ffffff;\n\t--pops-panel-components-input-hover-bd-color: #c0c4cc;\n\t--pops-panel-components-input-focus-bd-color: #409eff;\n\t--pops-panel-components-input-suffix-color: #a8abb2;\n\t--pops-panel-components-input-suffix-bg-color: #ffffff;\n}\n.pops-panel-input {\n\tdisplay: flex;\n\talign-items: center;\n\tborder: 1px solid var(--pops-panel-components-input-bd-color);\n\tborder-radius: 4px;\n\tbackground-color: var(--pops-panel-components-input-bg-color);\n\tposition: relative;\n\tbox-shadow: none;\n}\n.pops-panel-input:hover {\n\tborder: 1px solid var(--pops-panel-components-input-hover-bd-color);\n}\n.pops-panel-input:has(input:disabled):hover {\n\t--pops-panel-components-input-hover-bd-color: var(--pops-panel-components-input-bd-color);\n}\n.pops-panel-input:has(input:focus) {\n\toutline: 0;\n\tborder: 1px solid var(--pops-panel-components-input-focus-bd-color);\n\tborder-radius: 4px;\n\tbox-shadow: none;\n}\n.pops-panel-input input {\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\ttext-align: start;\n\talign-items: center;\n\talign-content: center;\n\twhite-space: nowrap;\n\tcursor: text;\n\tbox-sizing: border-box;\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tvertical-align: middle;\n\t-webkit-appearance: none;\n\tappearance: none;\n\tcolor: var(--pops-panel-components-input-text-color);\n\tbackground-color: var(--pops-panel-components-input-text-bg-color);\n\toutline: 0;\n\ttransition: 0.1s;\n\tborder: 0;\n\tfont-size: 14px;\n\tfont-weight: 500;\n\tline-height: normal;\n\theight: 32px;\n\twidth: 100%;\n\tflex: 1;\n\t/*margin-right: calc(1em + 8px);*/\n\tmargin: 0px;\n\tpadding: var(--pops-panel-components-input-text-default-padding);\n}\n.pops-panel-input span.pops-panel-input__suffix {\n\tdisplay: inline-flex;\n\twhite-space: nowrap;\n\tflex-shrink: 0;\n\tflex-wrap: nowrap;\n\theight: 100%;\n\ttext-align: center;\n\tcolor: var(--pops-panel-components-input-suffix-color);\n\tbackground: var(--pops-panel-components-input-suffix-bg-color);\n\ttransition: all 0.3s;\n\tpointer-events: none;\n\tpadding: 0 8px;\n\tposition: absolute;\n\tright: 0px;\n\tborder-top-right-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tborder: 1px solid transparent;\n}\n.pops-panel-input span.pops-panel-input__suffix-inner {\n\tpointer-events: all;\n\tdisplay: inline-flex;\n\talign-items: center;\n\tjustify-content: center;\n}\n/* 如果包含清空图标的按钮,则默认隐藏清空图标,当:hover、:focus、:focus-within、:active时显示清空图标 */\n.pops-panel-input span.pops-panel-input__suffix:has(svg[data-type=\"circleClose\"]) {\n\tdisplay: none;\n}\n.pops-panel-input:hover span.pops-panel-input__suffix:has(svg[data-type=\"circleClose\"]),\n.pops-panel-input:focus span.pops-panel-input__suffix:has(svg[data-type=\"circleClose\"]),\n.pops-panel-input:focus-within span.pops-panel-input__suffix:has(svg[data-type=\"circleClose\"]),\n.pops-panel-input:active span.pops-panel-input__suffix:has(svg[data-type=\"circleClose\"]) {\n\tdisplay: inline-flex;\n}\n.pops-panel-input .pops-panel-icon {\n\tcursor: pointer;\n}\n.pops-panel-input .pops-panel-icon {\n\theight: inherit;\n\tline-height: normal;\n\talign-content: center;\n\tdisplay: flex;\n\tjustify-content: center;\n\talign-items: center;\n\ttransition: all 0.3s;\n}\n.pops-panel-input .pops-panel-icon svg {\n\theight: 1em;\n\twidth: 1em;\n}\n\n.pops-input-disabled {\n\tbackground-color: var(--pops-components-is-disabled-bg-color);\n}\n.pops-panel-input.pops-input-disabled:hover {\n\t--pops-panel-components-input-hover-bd-color: var(--pops-panel-components-input-bd-color);\n}\n.pops-panel-input input:disabled,\n.pops-panel-input input:disabled + .pops-panel-input__suffix {\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tcolor: var(--el-disabled-text-color);\n\t-webkit-text-fill-color: var(--el-disabled-text-color);\n\tcursor: not-allowed;\n}\n.pops-panel-input input:disabled + .pops-panel-input__suffix {\n\tdisplay: none;\n}\n/* input的CSS */\n\n/* textarea的CSS */\n.pops-panel-textarea {\n\t--pops-panel-components-textarea-text-color: #000000;\n\t--pops-panel-components-textarea-text-bg-color: #ffffff;\n\t--pops-panel-components-textarea-bd-color: #dcdfe6;\n\t--pops-panel-components-textarea-hover-bd-color: #c0c4cc;\n\t--pops-panel-components-textarea-focus-bd-color: #409eff;\n}\n.pops-panel-textarea textarea {\n\twidth: 100%;\n\t/*vertical-align: bottom;*/\n\tposition: relative;\n\tdisplay: block;\n\tresize: none;\n\tpadding: 5px 11px;\n\t/*line-height: 1;*/\n\tbox-sizing: border-box;\n\tfont-size: inherit;\n\tfont-family: inherit;\n\tcolor: var(--pops-panel-components-textarea-text-color);\n\tbackground-color: var(--pops-panel-components-textarea-text-bg-color);\n\tbackground-image: none;\n\t-webkit-appearance: none;\n\tappearance: none;\n\tbox-shadow: none;\n\tborder-radius: 0;\n\ttransition: box-shadow 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n\tborder: 1px solid var(--pops-panel-components-textarea-bd-color);\n}\n.pops-panel-textarea textarea:hover {\n\tborder-color: var(--pops-panel-components-textarea-hover-bd-color);\n}\n.pops-panel-textarea:has(textarea:disabled):hover {\n\t--pops-panel-components-textarea-hover-bd-color: var(--pops-panel-components-textarea-bd-color);\n}\n.pops-panel-textarea-disable {\n\t--pops-panel-components-textarea-text-bg-color: var(--pops-components-is-disabled-bg-color) !important;\n\t--pops-panel-components-textarea-text-color: var(--pops-components-is-disabled-text-color);\n}\n.pops-panel-textarea-disable textarea {\n\tcursor: not-allowed;\n}\n.pops-panel-textarea textarea:focus {\n\toutline: 0;\n\tborder-color: var(--pops-panel-components-textarea-focus-bd-color);\n}\n/* textarea的CSS */\n\n/* select的CSS */\n.pops-panel-select {\n\t--pops-panel-components-select-text-color: #000000;\n\t--pops-panel-components-select-bd-color: rgb(184, 184, 184, var(--pops-bd-opacity));\n\t--pops-panel-components-select-hover-bd-color: rgb(184, 184, 184, var(--pops-bd-opacity));\n\t--pops-panel-components-select-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n}\n.pops-panel-select {\n\tborder: 0;\n}\n.pops-panel-select select {\n\theight: 32px;\n\tline-height: normal;\n\talign-content: center;\n\tmin-width: 200px;\n\tborder: 1px solid var(--pops-panel-components-select-bd-color);\n\tborder-radius: 5px;\n\ttext-align: center;\n\toutline: 0;\n\tcolor: var(--pops-panel-components-select-text-color);\n\tbackground-color: var(--pops-panel-components-select-bg-color);\n\tbox-shadow: none;\n}\n.pops-panel-select select:hover {\n\tborder: 1px solid var(--pops-panel-components-select-hover-bd-color);\n}\n.pops-panel-select-disable {\n\t--pops-panel-components-select-text-color: var(--pops-components-is-disabled-text-color);\n\t--pops-panel-components-select-bg-color: var(--pops-components-is-disabled-bg-color);\n}\n.pops-panel-select-disable select {\n\tcursor: not-allowed;\n}\n.pops-panel-select-disable select:hover {\n\tbox-shadow: none;\n\t--pops-panel-components-select-hover-bd-color: var(--pops-panel-components-select-bd-color);\n}\n.pops-panel-select select:focus {\n\tborder: 1px solid rgb(64, 158, 255, var(--pops-bd-opacity));\n\tbox-shadow: none;\n}\n/* select的CSS */\n\n/* select-multiple的CSS*/\n.pops-panel-select-multiple {\n\t--el-border-radius-base: 4px;\n\t--el-fill-color-blank: #ffffff;\n\t--el-transition-duration: 0.3s;\n\t--el-border-color: #cbcbcb;\n\t--el-text-color-placeholder: #a8abb2;\n\t--color: inherit;\n\t--el-select-input-color: #a8abb2;\n\t--el-select-input-font-size: 14px;\n\t--el-text-color-regular: #606266;\n\t--el-color-info: #909399;\n\t--el-color-info-light-9: #f4f4f5;\n\t--el-color-info-light-8: #e9e9eb;\n\t--el-color-primary-light-9: #ecf5ff;\n\t--el-color-primary-light-8: #d9ecff;\n\t--el-color-primary: #409eff;\n\t--el-color-white: #ffffff;\n\twidth: 200px;\n}\n.pops-panel-select-multiple .el-select__wrapper {\n\tdisplay: flex;\n\talign-items: center;\n\tposition: relative;\n\tbox-sizing: border-box;\n\tcursor: pointer;\n\ttext-align: left;\n\tfont-size: 14px;\n\tpadding: 4px 12px;\n\tgap: 6px;\n\tmin-height: 32px;\n\tline-height: normal;\n\talign-content: center;\n\tborder-radius: var(--el-border-radius-base);\n\tbackground-color: var(--el-fill-color-blank);\n\ttransition: var(--el-transition-duration);\n\ttransform: translateZ(0);\n\tborder: 1px solid var(--el-border-color);\n}\n.pops-panel-select-multiple .el-select__wrapper.is-focused {\n\t--el-border-color: var(--el-color-primary);\n}\n.pops-panel-select-multiple .el-select__selection {\n\tposition: relative;\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\talign-items: center;\n\tflex: 1;\n\tmin-width: 0;\n\tgap: 6px;\n}\n.pops-panel-select-multiple .el-select__selected-item {\n\tdisplay: flex;\n\tflex-wrap: wrap;\n\t-webkit-user-select: none;\n\tuser-select: none;\n}\n.pops-panel-select-multiple .el-select__selected-item.el-select__choose_tag .el-tag {\n\tmax-width: 200px;\n}\n.pops-panel-select-multiple .el-select__input-wrapper {\n\tmax-width: 100%;\n}\n.pops-panel-select-multiple .el-select__selection.is-near {\n\tmargin-left: -8px;\n}\n.pops-panel-select-multiple .el-select__placeholder {\n\tposition: absolute;\n\tdisplay: block;\n\ttop: 50%;\n\ttransform: translateY(-50%);\n\twidth: 100%;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n\tcolor: var(--el-input-text-color, var(--el-text-color-regular));\n}\n.pops-panel-select-multiple .el-select__placeholder.is-transparent {\n\t-webkit-user-select: none;\n\tuser-select: none;\n\tcolor: var(--el-text-color-placeholder);\n}\n.pops-panel-select-multiple .el-select__prefix,\n.pops-panel-select-multiple .el-select__suffix {\n\tdisplay: flex;\n\talign-items: center;\n\tflex-shrink: 0;\n\tgap: 6px;\n\tcolor: var(--el-input-icon-color, var(--el-text-color-placeholder));\n}\n.pops-panel-select-multiple .el-icon {\n\t--color: inherit;\n\theight: 1em;\n\twidth: 1em;\n\tline-height: normal;\n\talign-content: center;\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\talign-items: center;\n\tposition: relative;\n\tfill: currentColor;\n\tcolor: var(--color);\n\tfont-size: inherit;\n}\n.pops-panel-select-multiple .el-icon svg {\n\theight: 1em;\n\twidth: 1em;\n}\n.pops-panel-select-multiple .el-select__caret {\n\tcolor: var(--el-select-input-color);\n\tfont-size: var(--el-select-input-font-size);\n\ttransition: var(--el-transition-duration);\n\ttransform: rotate(0);\n\tcursor: pointer;\n}\n.pops-panel-select-multiple .el-tag {\n\t--el-tag-font-size: 12px;\n\t--el-tag-border-radius: 4px;\n\t--el-tag-border-radius-rounded: 9999px;\n}\n.pops-panel-select-multiple .el-tag {\n\tbackground-color: var(--el-tag-bg-color);\n\tborder-color: var(--el-tag-border-color);\n\tcolor: var(--el-tag-text-color);\n\tdisplay: inline-flex;\n\tjustify-content: center;\n\talign-items: center;\n\tvertical-align: middle;\n\theight: 24px;\n\tpadding: 0 9px;\n\tfont-size: var(--el-tag-font-size);\n\tline-height: normal;\n\talign-content: center;\n\tborder-width: 1px;\n\tborder-style: solid;\n\tborder-radius: var(--el-tag-border-radius);\n\tbox-sizing: border-box;\n\twhite-space: nowrap;\n\t--el-icon-size: 14px;\n\t--el-tag-bg-color: var(--el-color-primary-light-9);\n\t--el-tag-border-color: var(--el-color-primary-light-8);\n\t--el-tag-hover-color: var(--el-color-primary);\n}\n.pops-panel-select-multiple .el-select__selection .el-tag {\n\tcursor: pointer;\n\tborder-color: transparent;\n}\n.pops-panel-select-multiple .el-tag.el-tag--info {\n\t--el-tag-bg-color: var(--el-color-info-light-9);\n\t--el-tag-border-color: var(--el-color-info-light-8);\n\t--el-tag-hover-color: var(--el-color-info);\n}\n.pops-panel-select-multiple .el-tag.el-tag--info {\n\t--el-tag-text-color: var(--el-color-info);\n}\n.pops-panel-select-multiple .el-tag.is-closable {\n\tpadding-right: 5px;\n}\n.pops-panel-select-multiple .el-select__selection .el-tag .el-tag__content {\n\tmin-width: 0;\n}\n.pops-panel-select-multiple .el-tag .el-tag__close {\n\tflex-shrink: 0;\n\tcolor: var(--el-tag-text-color);\n}\n.pops-panel-select-multiple .el-tag .el-tag__close:hover {\n\tcolor: var(--el-color-white);\n\tbackground-color: var(--el-tag-hover-color);\n}\n.pops-panel-select-multiple .el-tag .el-icon {\n\tborder-radius: 50%;\n\tcursor: pointer;\n\tfont-size: calc(var(--el-icon-size) - 2px);\n\theight: var(--el-icon-size);\n\twidth: var(--el-icon-size);\n}\n.pops-panel-select-multiple .el-tag .el-tag__close {\n\tmargin-left: 6px;\n}\n.pops-panel-select-multiple .el-select__tags-text {\n\tdisplay: block;\n\tline-height: normal;\n\talign-content: center;\n\toverflow: hidden;\n\ttext-overflow: ellipsis;\n\twhite-space: nowrap;\n}\n.pops-panel-select-multiple-disable {\n\t--el-fill-color-blank: #f5f7fa;\n\t--color: #a8abb2;\n\t--el-border-color: #cbcbcb;\n}\n.pops-panel-select-multiple-disable .el-tag.el-tag--info {\n\t--el-tag-bg-color: #e7e7e7;\n\t--el-tag-text-color: var(--pops-components-is-disabled-text-color);\n}\n.pops-panel-select-multiple-disable .el-select__selection .el-tag,\n.pops-panel-select-multiple-disable .el-tag .el-tag__close:hover,\n.pops-panel-select-multiple-disable .el-select__wrapper,\n.pops-panel-select-multiple-disable .el-select__caret {\n\tcursor: not-allowed;\n}\n/* select-multiple的CSS*/\n\n/* deepMenu的css */\n.pops-panel-deepMenu-nav-item {\n\tcursor: pointer;\n}\n.pops-panel-deepMenu-nav-item:active {\n\tbackground: var(--pops-panel-forms-container-deepMenu-item-active-bg);\n\tuser-select: none;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n}\nsection.pops-panel-container .pops-panel-forms-container-item ul li.pops-panel-deepMenu-nav-item:active {\n\tpadding: var(--pops-panel-forms-container-li-padding-top-bottom)\n\t\tvar(--pops-panel-forms-container-li-padding-left-right);\n\tmargin: 0px;\n}\n/* 去除上个兄弟item的底部边框颜色 */\nsection.pops-panel-container\n\t.pops-panel-forms-container-item\n\tul\n\tli:has(+ .pops-panel-deepMenu-nav-item:active) {\n\tborder-bottom: 1px solid transparent;\n}\n/* 第一个和最后一个跟随圆角 */\nsection.pops-panel-container\n\t.pops-panel-forms-container-item\n\tul\n\tli.pops-panel-deepMenu-nav-item:first-child:active {\n\tborder-top-left-radius: var(--pops-panel-forms-container-item-border-radius);\n\tborder-top-right-radius: var(--pops-panel-forms-container-item-border-radius);\n}\nsection.pops-panel-container\n\t.pops-panel-forms-container-item\n\tul\n\tli.pops-panel-deepMenu-nav-item:last-child:active {\n\tborder-bottom-left-radius: var(--pops-panel-forms-container-item-border-radius);\n\tborder-bottom-right-radius: var(--pops-panel-forms-container-item-border-radius);\n}\n.pops-panel-deepMenu-nav-item .pops-panel-deepMenu {\n\tdisplay: flex;\n\talign-items: center;\n\tcolor: #6c6c6c;\n\tfill: #6c6c6c;\n}\n.pops-panel-deepMenu-nav-item .pops-panel-deepMenu-arrowRight-icon {\n\twidth: 15px;\n\theight: 15px;\n\tdisplay: flex;\n\talign-items: center;\n}\nsection.pops-panel-deepMenu-container\n\t.pops-panel-container-header-ul\n\tli.pops-panel-deepMenu-container-header {\n\tdisplay: flex;\n\talign-items: center;\n\twidth: -webkit-fill-available;\n\twidth: -moz-available;\n\tpadding: var(--pops-panel-forms-header-padding-top-bottom)\n\t\tcalc(\n\t\t\tvar(--pops-panel-forms-margin-left-right) + var(--pops-panel-forms-container-li-padding-left-right) -\n\t\t\t\tvar(--pops-panel-forms-header-icon-size)\n\t\t);\n\tgap: 0px;\n}\n.pops-panel-deepMenu-container .pops-panel-deepMenu-container-left-arrow-icon {\n\twidth: var(--pops-panel-forms-header-icon-size);\n\theight: var(--pops-panel-forms-header-icon-size);\n\tdisplay: flex;\n\talign-items: center;\n\tcursor: pointer;\n}\n/* 修复safari上图标大小未正常显示 */\n.pops-panel-deepMenu-container .pops-panel-deepMenu-container-left-arrow-icon > svg {\n\twidth: inherit;\n\theight: inherit;\n}\n/* deepMenu的css */\n\n/* 文字对齐 */\n.pops-panel-item-left-desc-text:has(code) {\n\tdisplay: flex;\n\talign-items: baseline;\n\tflex-wrap: wrap;\n}\n\n@media (prefers-color-scheme: dark) {\n\t.pops[type-value=\"panel\"] {\n\t\t--pops-bg-color: #000000;\n\t\t--pops-color: #f2f2f2;\n\t\t--panel-title-bg-color: #000000;\n\t\t--panel-aside-bg-color: #262626;\n\t\t--pops-panel-forms-container-item-left-desc-text-color: #6c6c6c;\n\t\t--pops-panel-forms-container-item-bg-color: #262626;\n\t\t--pops-panel-forms-container-item-title-color: #c1c1c1;\n\n\t\t--pops-panel-forms-container-li-border-color: rgb(51, 51, 51, var(--pops-bd-opacity));\n\t\t--pops-panel-forms-container-deepMenu-item-active-bg: #333333;\n\t}\n\t.pops[type-value=\"panel\"] .pops-panel-deepMenu-container .pops-panel-deepMenu-container-left-arrow-icon {\n\t\tfill: #f2f2f2;\n\t}\n\n\t/* switch的CSS */\n\t.pops-panel-switch {\n\t\t--panel-switch-core-bd-color: rgb(220, 223, 230, var(--pops-bd-opacity));\n\t\t--panel-switch-core-bg-color: rgb(220, 223, 230, var(--pops-bg-opacity));\n\t\t--panel-switch-circle-color: #dcdfe6;\n\t\t--panel-switch-circle-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n\t\t--panel-switch-checked-circle-color: #409eff;\n\t\t--panel-switch-checked-core-bd-color: rgb(64, 158, 255, var(--pops-bd-opacity));\n\t\t--panel-switch-checked-core-bg-color: rgb(64, 158, 255, var(--pops-bg-opacity));\n\t}\n\t/* select的CSS */\n\t.pops-panel-select {\n\t\t--pops-panel-components-select-text-color: #f2f2f2;\n\t\t--pops-panel-components-select-bd-color: rgb(51, 51, 51, var(--pops-bd-opacity));\n\t\t--pops-panel-components-select-bg-color: #141414;\n\t}\n\t/* select-multiple的CSS*/\n\t.pops-panel-select-multiple {\n\t\t--el-fill-color-blank: #141414;\n\t\t--el-border-color: #4c4d4f;\n\t\t--el-text-color-placeholder: #a8abb2;\n\t\t--el-select-input-color: #a8abb2;\n\t\t--el-text-color-regular: #606266;\n\t\t--el-color-info: #909399;\n\t\t--el-color-info-light-8: #e9e9eb;\n\t\t--el-color-primary-light-9: #ecf5ff;\n\t\t--el-color-primary-light-8: #d9ecff;\n\t\t--el-color-primary: #409eff;\n\t\t--el-color-white: #ffffff;\n\t}\n\t.pops-panel-select-multiple .el-tag {\n\t\t--el-color-info-light-9: #202121;\n\t}\n\t.pops-panel-select-multiple-disable {\n\t\t--el-border-color: rgb(51, 51, 51, var(--pops-bd-opacity));\n\t}\n\t.pops-panel-select-multiple-disable .el-tag.el-tag--info {\n\t\t--el-tag-bg-color: #2f2f2f;\n\t}\n\t/* select-multiple的CSS*/\n\t/* slider的CSS */\n\t.pops-slider {\n\t\t--pops-slider-border-color-light: #414243;\n\t}\n\t/* input的CSS */\n\t.pops-panel-input {\n\t\t--pops-panel-components-input-text-color: #f2f2f2;\n\t\t--pops-panel-components-input-bd-color: #4f5052;\n\t\t--pops-panel-components-input-bg-color: #141414;\n\t\t--pops-panel-components-input-hover-bd-color: #6f7175;\n\t\t--pops-panel-components-input-focus-bd-color: #409eff;\n\t\t--pops-panel-components-input-suffix-color: #a8abb2;\n\t}\n\t/* textarea的CSS */\n\t.pops-panel-textarea {\n\t\t--pops-panel-components-textarea-text-color: #f2f2f2;\n\t\t--pops-panel-components-textarea-text-bg-color: #141414;\n\t\t--pops-panel-components-textarea-bd-color: #4f5052;\n\t\t--pops-panel-components-textarea-hover-bd-color: #6f7175;\n\t\t--pops-panel-components-textarea-focus-bd-color: #409eff;\n\t}\n\t.pops-panel-textarea-disable {\n\t\t--pops-panel-components-textarea-text-color: var(--pops-components-is-disabled-text-color);\n\t\t--pops-panel-components-textarea-text-bg-color: var(--pops-components-is-disabled-bg-color);\n\t}\n\t/* slider */\n\t.pops-slider {\n\t\t--pops-slider-text-color-placeholder: #8d9095;\n\t}\n}\n";
|
|
2837
|
+
var panelCSS = ".pops[type-value=\"panel\"] {\n --pops-bg-color: #f2f2f2;\n --pops-color: #333333;\n --panel-title-bg-color: #ffffff;\n\n --panel-aside-bg-color: #ffffff;\n --panel-aside-hover-color: rgb(64, 158, 255);\n --panel-aside-hover-bg-color: rgba(64, 158, 255, 0.1);\n\n --pops-panel-forms-margin-top-bottom: 10px;\n --pops-panel-forms-margin-left-right: 20px;\n --pops-panel-forms-header-icon-size: calc(var(--pops-panel-forms-container-li-padding-left-right) + 1px);\n --pops-panel-forms-header-padding-top-bottom: 15px;\n --pops-panel-forms-header-padding-left-right: 10px;\n --pops-panel-forms-container-item-left-text-gap: 6px;\n --pops-panel-forms-container-item-left-desc-text-size: 0.8em;\n --pops-panel-forms-container-item-left-desc-text-color: #6c6c6c;\n --pops-panel-forms-container-item-bg-color: #ffffff;\n --pops-panel-forms-container-item-title-color: #333;\n --pops-panel-forms-container-item-border-radius: 6px;\n --pops-panel-forms-container-item-margin-top-bottom: 10px;\n --pops-panel-forms-container-item-margin-left-right: var(--pops-panel-forms-margin-left-right);\n --pops-panel-forms-container-li-border-color: var(--pops-bd-color);\n --pops-panel-forms-container-li-padding-top-bottom: 12px;\n --pops-panel-forms-container-li-padding-left-right: 16px;\n\n --pops-panel-forms-container-deepMenu-item-active-bg: #e9e9e9;\n}\n.pops[type-value=\"panel\"] {\n color: var(--pops-color);\n background: var(--pops-bg-color);\n}\n.pops[type-value] .pops-panel-title {\n background: var(--panel-title-bg-color);\n}\n\n/* ↓panel的CSS↓ */\n/* 左侧的列表 */\naside.pops-panel-aside {\n box-sizing: border-box;\n flex-shrink: 0;\n max-width: 200px;\n min-width: 100px;\n height: 100%;\n background: var(--panel-aside-bg-color);\n border-right: 1px solid var(--panel-aside-bg-color);\n font-size: 0.9em;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\naside.pops-panel-aside {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\naside.pops-panel-aside .pops-panel-aside-top-container {\n overflow: auto;\n}\naside.pops-panel-aside ul li {\n margin: 6px 8px;\n border-radius: 4px;\n padding: 6px 10px;\n cursor: default;\n display: flex;\n align-items: center;\n justify-content: flex-start;\n}\naside.pops-panel-aside .pops-is-visited,\naside.pops-panel-aside ul li:not(.pops-panel-disabled-aside-hover-css):hover {\n color: var(--panel-aside-hover-color);\n background: var(--panel-aside-hover-bg-color);\n}\n/* 左侧的列表 */\n\n.pops-panel-content {\n display: flex;\n flex-direction: row;\n flex: 1;\n overflow: auto;\n flex-basis: auto;\n box-sizing: border-box;\n min-width: 0;\n bottom: 0 !important;\n}\n\n.pops-panel-section-wrapper {\n width: 100%;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\n\nsection.pops-panel-container {\n width: 100%;\n overflow: hidden;\n display: flex;\n flex-direction: column;\n}\nsection.pops-panel-container .pops-panel-container-header-ul,\nsection.pops-panel-container .pops-panel-deepMenu-container-header-ul {\n border-bottom: 1px solid rgba(223, 223, 223, var(--pops-bg-opacity));\n flex: 0 auto;\n}\nsection.pops-panel-container .pops-panel-container-header-ul li,\nsection.pops-panel-container .pops-panel-container-header-ul li.pops-panel-container-header-title-text {\n display: flex;\n justify-content: flex-start !important;\n margin: 0px !important;\n padding: var(--pops-panel-forms-header-padding-top-bottom)\n calc(var(--pops-panel-forms-margin-left-right) + var(--pops-panel-forms-container-li-padding-left-right));\n text-align: left;\n}\nsection.pops-panel-container ul.pops-panel-container-main-ul {\n overflow: auto;\n /*flex: 1;*/\n}\nsection.pops-panel-container > ul li:not(.pops-panel-forms-container-item) {\n display: flex;\n justify-content: space-between;\n align-items: center;\n margin: var(--pops-panel-forms-margin-top-bottom)\n calc(var(--pops-panel-forms-margin-left-right) + var(--pops-panel-forms-margin-left-right));\n gap: 10px;\n}\nsection.pops-panel-container .pops-panel-forms-container-item-header-text {\n margin: 10px;\n margin-left: calc(\n var(--pops-panel-forms-margin-left-right) + var(--pops-panel-forms-container-li-padding-left-right)\n );\n font-size: 0.9em;\n text-align: left;\n color: var(--pops-panel-forms-container-item-title-color);\n}\nsection.pops-panel-container li.pops-panel-forms-container-item {\n /* 去除<li>左侧的圆点 */\n display: block;\n}\nsection.pops-panel-container .pops-panel-forms-container-item ul.pops-panel-forms-container-item-formlist {\n border-radius: var(--pops-panel-forms-container-item-border-radius);\n background: var(--pops-panel-forms-container-item-bg-color);\n margin: var(--pops-panel-forms-container-item-margin-top-bottom) var(--pops-panel-forms-margin-left-right);\n}\nsection.pops-panel-container .pops-panel-forms-container-item ul.pops-panel-forms-container-item-formlist li {\n display: flex;\n justify-content: space-between;\n align-items: center;\n padding: var(--pops-panel-forms-container-li-padding-top-bottom)\n var(--pops-panel-forms-container-li-padding-left-right);\n margin: 0px 0px;\n border-bottom: 1px solid var(--pops-panel-forms-container-li-border-color);\n text-align: left;\n}\n/*section.pops-panel-container\n\t.pops-panel-forms-container-item\n\tul\n\tli.pops-panel-deepMenu-nav-item {\n\tpadding: var(--pops-panel-forms-container-li-padding-top-bottom) 0px;\n\tmargin: 0px var(--pops-panel-forms-container-li-padding-left-right);\n\tborder-bottom: 1px solid var(--pops-panel-forms-container-li-border-color);\n}*/\nsection.pops-panel-container\n .pops-panel-forms-container-item\n ul.pops-panel-forms-container-item-formlist\n li:last-child {\n border: 0px;\n}\n/* 左侧的文字 */\nsection.pops-panel-container .pops-panel-item-left-text {\n display: flex;\n flex-direction: column;\n gap: var(--pops-panel-forms-container-item-left-text-gap);\n}\n\n/* 左侧的主文字 */\n/*section.pops-panel-container .pops-panel-item-left-main-text {\n\t\n}*/\n/* 左侧的描述文字 */\nsection.pops-panel-container .pops-panel-item-left-desc-text {\n font-size: var(--pops-panel-forms-container-item-left-desc-text-size);\n color: var(--pops-panel-forms-container-item-left-desc-text-color);\n}\n\n/* 折叠面板 */\nsection.pops-panel-container .pops-panel-forms-fold {\n border-radius: var(--pops-panel-forms-container-item-border-radius);\n background: var(--pops-panel-forms-container-item-bg-color);\n margin: var(--pops-panel-forms-margin-top-bottom) var(--pops-panel-forms-margin-left-right);\n}\nsection.pops-panel-container .pops-panel-forms-fold .pops-panel-forms-fold-container {\n display: flex;\n align-items: center;\n fill: #6c6c6c;\n justify-content: space-between;\n margin: 0px var(--pops-panel-forms-container-li-padding-left-right) !important;\n padding: var(--pops-panel-forms-container-li-padding-top-bottom) 0px !important;\n}\nsection.pops-panel-container .pops-panel-forms-fold[data-fold-enable] .pops-panel-forms-fold-container-icon {\n transform: rotate(90deg);\n}\nsection.pops-panel-container .pops-panel-forms-fold .pops-panel-forms-fold-container-icon {\n width: 15px;\n height: 15px;\n display: flex;\n align-items: center;\n transform: rotate(-90deg);\n transition: transform 0.3s;\n}\n/* 折叠状态 */\nsection.pops-panel-container .pops-panel-forms-fold[data-fold-enable] .pops-panel-forms-container-item-formlist {\n height: 0;\n}\n/* 非折叠状态 */\nsection.pops-panel-container .pops-panel-forms-fold ul.pops-panel-forms-container-item-formlist {\n margin: 0;\n}\nsection.pops-panel-container .pops-panel-forms-fold .pops-panel-forms-container-item-formlist {\n transition: height 0.3s;\n overflow: hidden;\n border-radius: unset;\n background: unset;\n margin: 0;\n height: calc-size(auto, size);\n}\n/* 折叠面板 */\n\n/* 姑且认为小于600px的屏幕为移动端 */\n@media (max-width: 600px) {\n /* 兼容移动端CSS */\n .pops[type-value=\"panel\"] {\n --pops-panel-forms-margin-left-right: 10px;\n }\n .pops[type-value=\"panel\"] {\n width: 92%;\n width: 92vw;\n width: 92dvw;\n }\n .pops[type-value=\"panel\"] .pops-panel-content aside.pops-panel-aside {\n max-width: 20%;\n min-width: auto;\n }\n .pops[type-value=\"panel\"] section.pops-panel-container .pops-panel-forms-container-item > div {\n text-align: left;\n --pops-panel-forms-margin-left-right: 0px;\n }\n .pops[type-value=\"panel\"] section.pops-panel-container .pops-panel-forms-container-item ul {\n margin: 0px !important;\n }\n .pops[type-value=\"panel\"] section.pops-panel-container > ul > li {\n margin: 10px 10px;\n }\n .pops[type-value=\"panel\"] section.pops-panel-container > ul > li div:nth-child(2) {\n max-width: 55%;\n }\n .pops[type-value=\"panel\"] section.pops-panel-container .pops-panel-select select {\n min-width: 88px !important;\n width: -webkit-fill-available;\n width: -moz-available;\n }\n .pops[type-value=\"panel\"] section.pops-panel-container .pops-panel-container-header-ul li {\n font-size: 16px;\n }\n .pops[type-value=\"panel\"] .pops-panel-title p[pops],\n .pops[type-value=\"panel\"] section.pops-panel-container > ul li,\n .pops[type-value=\"panel\"] aside.pops-panel-aside ul li {\n font-size: 14px;\n }\n}\n/* switch的CSS */\n.pops-panel-switch {\n --panel-switch-core-bd-color: rgb(220, 223, 230, var(--pops-bd-opacity));\n --panel-switch-core-bg-color: rgb(220, 223, 230, var(--pops-bg-opacity));\n --panel-switch-circle-color: #dcdfe6;\n --panel-switch-circle-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n --panel-switch-checked-circle-color: #409eff;\n --panel-switch-checked-core-bd-color: rgb(64, 158, 255, var(--pops-bd-opacity));\n --panel-switch-checked-core-bg-color: rgb(64, 158, 255, var(--pops-bg-opacity));\n}\n.pops-panel-switch {\n display: inline-flex;\n flex-direction: row-reverse;\n align-items: center;\n position: relative;\n font-size: 14px;\n line-height: normal;\n align-content: center;\n height: 32px;\n vertical-align: middle;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.pops-panel-switch input.pops-panel-switch__input {\n position: absolute;\n width: 0;\n height: 0;\n opacity: 0;\n margin: 0;\n}\n.pops-panel-switch:has(input.pops-panel-switch__input:disabled),\n.pops-panel-switch[data-disabled],\n.pops-panel-switch[data-disabled] .pops-panel-switch__core,\n.pops-panel-switch input.pops-panel-switch__input:disabled + .pops-panel-switch__core {\n cursor: not-allowed;\n opacity: 0.6;\n}\n.pops-panel-switch span.pops-panel-switch__core {\n display: inline-flex;\n position: relative;\n align-items: center;\n min-width: 40px;\n height: 20px;\n border: 1px solid var(--panel-switch-core-bd-color);\n outline: 0;\n border-radius: 10px;\n box-sizing: border-box;\n background: var(--panel-switch-core-bg-color);\n cursor: pointer;\n transition:\n border-color 0.3s,\n background-color 0.3s;\n}\n.pops-panel-switch .pops-panel-switch__action {\n position: absolute;\n left: 1px;\n border-radius: 100%;\n transition: all 0.3s;\n width: 16px;\n height: 16px;\n display: flex;\n justify-content: center;\n align-items: center;\n background-color: var(--panel-switch-circle-bg-color);\n color: var(--panel-switch-circle-color);\n}\n.pops-panel-switch.pops-panel-switch-is-checked span.pops-panel-switch__core {\n border-color: var(--panel-switch-checked-core-bd-color);\n background-color: var(--panel-switch-checked-core-bg-color);\n}\n.pops-panel-switch.pops-panel-switch-is-checked .pops-panel-switch__action {\n left: calc(100% - 17px);\n color: var(--panel-switch-checked-circle-color);\n}\n/* switch的CSS */\n\n/* slider旧的CSS */\nsection.pops-panel-container .pops-panel-slider:has(> input[type=\"range\"]) {\n overflow: hidden;\n height: 25px;\n line-height: normal;\n align-content: center;\n display: flex;\n align-items: center;\n}\nsection.pops-panel-container .pops-panel-slider input[type=\"range\"] {\n height: 6px;\n background: rgb(228, 231, 237, var(--pops-bg-opacity));\n outline: 0;\n -webkit-appearance: none;\n appearance: none;\n width: 100%;\n}\nsection.pops-panel-container .pops-panel-slider input[type=\"range\"]::-webkit-slider-thumb {\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 1px solid rgb(64, 158, 255, var(--pops-bd-opacity));\n background-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n box-shadow:\n 0 0 2px rgba(0, 0, 0, 0.3),\n 0 3px 5px rgba(0, 0, 0, 0.2);\n cursor: pointer;\n -webkit-appearance: none;\n appearance: none;\n border-image: linear-gradient(#409eff, #409eff) 0 fill/9 25 9 0/0 0 0 100vw;\n}\nsection.pops-panel-container .pops-panel-slider input[type=\"range\"]::-moz-range-thumb {\n width: 20px;\n height: 20px;\n border-radius: 50%;\n border: 1px solid rgb(64, 159, 255, var(--pops-bd-opacity));\n background-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n box-shadow:\n 0 0 2px rgba(0, 0, 0, 0.3),\n 0 3px 5px rgba(0, 0, 0, 0.2);\n cursor: pointer;\n -webkit-appearance: none;\n appearance: none;\n}\nsection.pops-panel-container .pops-panel-slider input[type=\"range\"]::-moz-range-progress {\n height: 6px;\n border-image: linear-gradient(#409eff, #409eff) 0 fill/9 25 9 0/0 0 0 100vw;\n}\n/* slider旧的CSS */\n\n/* slider的CSS */\n.pops-slider {\n --pops-slider-color-white: #ffffff;\n --pops-slider-color-primary: #409eff;\n --pops-slider-color-info: #909399;\n --pops-slider-text-color-placeholder: #a8abb2;\n --pops-slider-border-color-light: #e4e7ed;\n --pops-slider-border-radius-circle: 100%;\n --pops-slider-transition-duration-fast: 0.2s;\n\n --pops-slider-main-bg-color: var(--pops-slider-color-primary);\n --pops-slider-runway-bg-color: var(--pops-slider-border-color-light);\n --pops-slider-stop-bg-color: var(--pops-slider-color-white);\n --pops-slider-disabled-color: var(--pops-slider-text-color-placeholder);\n --pops-slider-border-radius: 3px;\n --pops-slider-height: 6px;\n --pops-slider-button-size: 20px;\n --pops-slider-button-wrapper-size: 36px;\n --pops-slider-button-wrapper-offset: -15px;\n}\n\n.pops-slider {\n width: 100%;\n height: 32px;\n display: flex;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.pops-slider-width {\n flex: 0 0 52%;\n margin-left: 10px;\n}\n\n.pops-slider__runway {\n flex: 1;\n height: var(--pops-slider-height);\n background-color: var(--pops-slider-runway-bg-color);\n border-radius: var(--pops-slider-border-radius);\n position: relative;\n cursor: pointer;\n}\n\n.pops-slider__runway.show-input {\n margin-right: 30px;\n width: auto;\n}\n\n.pops-slider__runway.pops-slider-is-disabled {\n cursor: default;\n}\n\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__bar {\n background-color: var(--pops-slider-disabled-color);\n}\n\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button {\n border-color: var(--pops-slider-disabled-color);\n}\n\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button:hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.dragging {\n cursor: not-allowed;\n}\n\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button:hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.dragging {\n transform: scale(1);\n}\n\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button:hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.hover,\n.pops-slider__runway.pops-slider-is-disabled .pops-slider__button.dragging {\n cursor: not-allowed;\n}\n\n.pops-slider__input {\n flex-shrink: 0;\n width: 130px;\n}\n\n.pops-slider__bar {\n height: var(--pops-slider-height);\n background-color: var(--pops-slider-main-bg-color);\n border-top-left-radius: var(--pops-slider-border-radius);\n border-bottom-left-radius: var(--pops-slider-border-radius);\n position: absolute;\n}\n\n.pops-slider__button-wrapper {\n height: var(--pops-slider-button-wrapper-size);\n width: var(--pops-slider-button-wrapper-size);\n position: absolute;\n z-index: 1;\n top: var(--pops-slider-button-wrapper-offset);\n transform: translate(-50%);\n background-color: transparent;\n text-align: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n line-height: normal;\n outline: none;\n}\n\n.pops-slider__button-wrapper:after {\n display: inline-block;\n content: \"\";\n height: 100%;\n vertical-align: middle;\n}\n\n.pops-slider__button:hover,\n.pops-slider__button.hover {\n cursor: grab;\n}\n\n.pops-slider__button {\n display: inline-block;\n width: var(--pops-slider-button-size);\n height: var(--pops-slider-button-size);\n vertical-align: middle;\n border: solid 2px var(--pops-slider-main-bg-color);\n background-color: var(--pops-slider-color-white);\n border-radius: 50%;\n box-sizing: border-box;\n transition: var(--pops-slider-transition-duration-fast);\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n.pops-slider__button:hover,\n.pops-slider__button.hover,\n.pops-slider__button.dragging {\n transform: scale(1.2);\n}\n\n.pops-slider__button:hover,\n.pops-slider__button.hover {\n cursor: grab;\n}\n\n.pops-slider__button.dragging {\n cursor: grabbing;\n}\n\n.pops-slider__stop {\n position: absolute;\n height: var(--pops-slider-height);\n width: var(--pops-slider-height);\n border-radius: var(--pops-slider-border-radius-circle);\n background-color: var(--pops-slider-stop-bg-color);\n transform: translate(-50%);\n}\n\n.pops-slider__marks {\n top: 0;\n left: 12px;\n width: 18px;\n height: 100%;\n}\n\n.pops-slider__marks-text {\n position: absolute;\n transform: translate(-50%);\n font-size: 14px;\n color: var(--pops-slider-color-info);\n margin-top: 15px;\n white-space: pre;\n}\n\n.pops-slider.is-vertical {\n position: relative;\n display: inline-flex;\n width: auto;\n height: 100%;\n flex: 0;\n}\n\n.pops-slider.is-vertical .pops-slider__runway {\n width: var(--pops-slider-height);\n height: 100%;\n margin: 0 16px;\n}\n\n.pops-slider.is-vertical .pops-slider__bar {\n width: var(--pops-slider-height);\n height: auto;\n border-radius: 0 0 3px 3px;\n}\n\n.pops-slider.is-vertical .pops-slider__button-wrapper {\n top: auto;\n left: var(--pops-slider-button-wrapper-offset);\n transform: translateY(50%);\n}\n\n.pops-slider.is-vertical .pops-slider__stop {\n transform: translateY(50%);\n}\n\n.pops-slider.is-vertical .pops-slider__marks-text {\n margin-top: 0;\n left: 15px;\n transform: translateY(50%);\n}\n\n.pops-slider--large {\n height: 40px;\n}\n\n.pops-slider--small {\n height: 24px;\n}\n/* slider的CSS */\n\n/* input的CSS */\n.pops-panel-input {\n --el-disabled-text-color: #a8abb2;\n --el-disabled-bg-color: #f5f7fa;\n --el-disabled-border-color: #e4e7ed;\n\n --pops-panel-components-input-text-color: #000000;\n --pops-panel-components-input-text-bg-color: transparent;\n --pops-panel-components-input-text-default-padding: 8px;\n --pops-panel-components-input-bd-color: #dcdfe6;\n --pops-panel-components-input-bg-color: #ffffff;\n --pops-panel-components-input-hover-bd-color: #c0c4cc;\n --pops-panel-components-input-focus-bd-color: #409eff;\n --pops-panel-components-input-suffix-color: #a8abb2;\n --pops-panel-components-input-suffix-bg-color: #ffffff;\n}\n.pops-panel-input {\n display: flex;\n align-items: center;\n border: 1px solid var(--pops-panel-components-input-bd-color);\n border-radius: 4px;\n background-color: var(--pops-panel-components-input-bg-color);\n position: relative;\n box-shadow: none;\n}\n.pops-panel-input:hover {\n border: 1px solid var(--pops-panel-components-input-hover-bd-color);\n}\n.pops-panel-input:has(input:disabled):hover {\n --pops-panel-components-input-hover-bd-color: var(--pops-panel-components-input-bd-color);\n}\n.pops-panel-input:has(input:focus) {\n outline: 0;\n border: 1px solid var(--pops-panel-components-input-focus-bd-color);\n border-radius: 4px;\n box-shadow: none;\n}\n.pops-panel-input input {\n display: inline-flex;\n justify-content: center;\n text-align: start;\n align-items: center;\n align-content: center;\n white-space: nowrap;\n cursor: text;\n box-sizing: border-box;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n vertical-align: middle;\n -webkit-appearance: none;\n appearance: none;\n color: var(--pops-panel-components-input-text-color);\n background-color: var(--pops-panel-components-input-text-bg-color);\n outline: 0;\n transition: 0.1s;\n border: 0;\n font-size: 14px;\n font-weight: 500;\n line-height: normal;\n height: 32px;\n width: 100%;\n flex: 1;\n /*margin-right: calc(1em + 8px);*/\n margin: 0px;\n padding: var(--pops-panel-components-input-text-default-padding);\n}\n.pops-panel-input span.pops-panel-input__suffix {\n display: inline-flex;\n white-space: nowrap;\n flex-shrink: 0;\n flex-wrap: nowrap;\n height: 100%;\n text-align: center;\n color: var(--pops-panel-components-input-suffix-color);\n background: var(--pops-panel-components-input-suffix-bg-color);\n transition: all 0.3s;\n pointer-events: none;\n padding: 0 8px;\n position: absolute;\n right: 0px;\n border-top-right-radius: 4px;\n border-bottom-right-radius: 4px;\n border: 1px solid transparent;\n}\n.pops-panel-input span.pops-panel-input__suffix-inner {\n pointer-events: all;\n display: inline-flex;\n align-items: center;\n justify-content: center;\n}\n/* 如果包含清空图标的按钮,则默认隐藏清空图标,当:hover、:focus、:focus-within、:active时显示清空图标 */\n.pops-panel-input span.pops-panel-input__suffix:has(svg[data-type=\"circleClose\"]) {\n display: none;\n}\n.pops-panel-input:hover span.pops-panel-input__suffix:has(svg[data-type=\"circleClose\"]),\n.pops-panel-input:focus span.pops-panel-input__suffix:has(svg[data-type=\"circleClose\"]),\n.pops-panel-input:focus-within span.pops-panel-input__suffix:has(svg[data-type=\"circleClose\"]),\n.pops-panel-input:active span.pops-panel-input__suffix:has(svg[data-type=\"circleClose\"]) {\n display: inline-flex;\n}\n.pops-panel-input .pops-panel-icon {\n cursor: pointer;\n}\n.pops-panel-input .pops-panel-icon {\n height: inherit;\n line-height: normal;\n align-content: center;\n display: flex;\n justify-content: center;\n align-items: center;\n transition: all 0.3s;\n}\n.pops-panel-input .pops-panel-icon svg {\n height: 1em;\n width: 1em;\n}\n\n.pops-input-disabled {\n background-color: var(--pops-components-is-disabled-bg-color);\n}\n.pops-panel-input.pops-input-disabled:hover {\n --pops-panel-components-input-hover-bd-color: var(--pops-panel-components-input-bd-color);\n}\n.pops-panel-input input:disabled,\n.pops-panel-input input:disabled + .pops-panel-input__suffix {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n color: var(--el-disabled-text-color);\n -webkit-text-fill-color: var(--el-disabled-text-color);\n cursor: not-allowed;\n}\n.pops-panel-input input:disabled + .pops-panel-input__suffix {\n display: none;\n}\n/* input的CSS */\n\n/* textarea的CSS */\n.pops-panel-textarea {\n --pops-panel-components-textarea-text-color: #000000;\n --pops-panel-components-textarea-text-bg-color: #ffffff;\n --pops-panel-components-textarea-bd-color: #dcdfe6;\n --pops-panel-components-textarea-hover-bd-color: #c0c4cc;\n --pops-panel-components-textarea-focus-bd-color: #409eff;\n}\n.pops-panel-textarea textarea {\n width: 100%;\n /*vertical-align: bottom;*/\n position: relative;\n display: block;\n resize: none;\n padding: 5px 11px;\n /*line-height: 1;*/\n box-sizing: border-box;\n font-size: inherit;\n font-family: inherit;\n color: var(--pops-panel-components-textarea-text-color);\n background-color: var(--pops-panel-components-textarea-text-bg-color);\n background-image: none;\n -webkit-appearance: none;\n appearance: none;\n box-shadow: none;\n border-radius: 0;\n transition: box-shadow 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);\n border: 1px solid var(--pops-panel-components-textarea-bd-color);\n}\n.pops-panel-textarea textarea:hover {\n border-color: var(--pops-panel-components-textarea-hover-bd-color);\n}\n.pops-panel-textarea:has(textarea:disabled):hover {\n --pops-panel-components-textarea-hover-bd-color: var(--pops-panel-components-textarea-bd-color);\n}\n.pops-panel-textarea-disable {\n --pops-panel-components-textarea-text-bg-color: var(--pops-components-is-disabled-bg-color) !important;\n --pops-panel-components-textarea-text-color: var(--pops-components-is-disabled-text-color);\n}\n.pops-panel-textarea-disable textarea {\n cursor: not-allowed;\n}\n.pops-panel-textarea textarea:focus {\n outline: 0;\n border-color: var(--pops-panel-components-textarea-focus-bd-color);\n}\n/* textarea的CSS */\n\n/* select的CSS */\n.pops-panel-select {\n --pops-panel-components-select-text-color: #000000;\n --pops-panel-components-select-bd-color: rgb(184, 184, 184, var(--pops-bd-opacity));\n --pops-panel-components-select-hover-bd-color: rgb(184, 184, 184, var(--pops-bd-opacity));\n --pops-panel-components-select-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n}\n.pops-panel-select {\n border: 0;\n}\n.pops-panel-select select {\n height: 32px;\n line-height: normal;\n align-content: center;\n min-width: 200px;\n border: 1px solid var(--pops-panel-components-select-bd-color);\n border-radius: 5px;\n text-align: center;\n outline: 0;\n color: var(--pops-panel-components-select-text-color);\n background-color: var(--pops-panel-components-select-bg-color);\n box-shadow: none;\n}\n.pops-panel-select select:hover {\n border: 1px solid var(--pops-panel-components-select-hover-bd-color);\n}\n.pops-panel-select-disable {\n --pops-panel-components-select-text-color: var(--pops-components-is-disabled-text-color);\n --pops-panel-components-select-bg-color: var(--pops-components-is-disabled-bg-color);\n}\n.pops-panel-select-disable select {\n cursor: not-allowed;\n}\n.pops-panel-select-disable select:hover {\n box-shadow: none;\n --pops-panel-components-select-hover-bd-color: var(--pops-panel-components-select-bd-color);\n}\n.pops-panel-select select:focus {\n border: 1px solid rgb(64, 158, 255, var(--pops-bd-opacity));\n box-shadow: none;\n}\n/* select的CSS */\n\n/* select-multiple的CSS*/\n.pops-panel-select-multiple {\n --el-border-radius-base: 4px;\n --el-fill-color-blank: #ffffff;\n --el-transition-duration: 0.3s;\n --el-border-color: #cbcbcb;\n --el-text-color-placeholder: #a8abb2;\n --color: inherit;\n --el-select-input-color: #a8abb2;\n --el-select-input-font-size: 14px;\n --el-text-color-regular: #606266;\n --el-color-info: #909399;\n --el-color-info-light-9: #f4f4f5;\n --el-color-info-light-8: #e9e9eb;\n --el-color-primary-light-9: #ecf5ff;\n --el-color-primary-light-8: #d9ecff;\n --el-color-primary: #409eff;\n --el-color-white: #ffffff;\n width: 200px;\n}\n.pops-panel-select-multiple .el-select__wrapper {\n display: flex;\n align-items: center;\n position: relative;\n box-sizing: border-box;\n cursor: pointer;\n text-align: left;\n font-size: 14px;\n padding: 4px 12px;\n gap: 6px;\n min-height: 32px;\n line-height: normal;\n align-content: center;\n border-radius: var(--el-border-radius-base);\n background-color: var(--el-fill-color-blank);\n transition: var(--el-transition-duration);\n transform: translateZ(0);\n border: 1px solid var(--el-border-color);\n}\n.pops-panel-select-multiple .el-select__wrapper.is-focused {\n --el-border-color: var(--el-color-primary);\n}\n.pops-panel-select-multiple .el-select__selection {\n position: relative;\n display: flex;\n flex-wrap: wrap;\n align-items: center;\n flex: 1;\n min-width: 0;\n gap: 6px;\n}\n.pops-panel-select-multiple .el-select__selected-item {\n display: flex;\n flex-wrap: wrap;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n.pops-panel-select-multiple .el-select__selected-item.el-select__choose_tag .el-tag {\n max-width: 200px;\n}\n.pops-panel-select-multiple .el-select__input-wrapper {\n max-width: 100%;\n}\n.pops-panel-select-multiple .el-select__selection.is-near {\n margin-left: -8px;\n}\n.pops-panel-select-multiple .el-select__placeholder {\n position: absolute;\n display: block;\n top: 50%;\n transform: translateY(-50%);\n width: 100%;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n color: var(--el-input-text-color, var(--el-text-color-regular));\n}\n.pops-panel-select-multiple .el-select__placeholder.is-transparent {\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n color: var(--el-text-color-placeholder);\n}\n.pops-panel-select-multiple .el-select__prefix,\n.pops-panel-select-multiple .el-select__suffix {\n display: flex;\n align-items: center;\n flex-shrink: 0;\n gap: 6px;\n color: var(--el-input-icon-color, var(--el-text-color-placeholder));\n}\n.pops-panel-select-multiple .el-icon {\n --color: inherit;\n height: 1em;\n width: 1em;\n line-height: normal;\n align-content: center;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: relative;\n fill: currentColor;\n color: var(--color);\n font-size: inherit;\n}\n.pops-panel-select-multiple .el-icon svg {\n height: 1em;\n width: 1em;\n}\n.pops-panel-select-multiple .el-select__caret {\n color: var(--el-select-input-color);\n font-size: var(--el-select-input-font-size);\n transition: var(--el-transition-duration);\n transform: rotate(0);\n cursor: pointer;\n}\n.pops-panel-select-multiple .el-tag {\n --el-tag-font-size: 12px;\n --el-tag-border-radius: 4px;\n --el-tag-border-radius-rounded: 9999px;\n}\n.pops-panel-select-multiple .el-tag {\n background-color: var(--el-tag-bg-color);\n border-color: var(--el-tag-border-color);\n color: var(--el-tag-text-color);\n display: inline-flex;\n justify-content: center;\n align-items: center;\n vertical-align: middle;\n height: 24px;\n padding: 0 9px;\n font-size: var(--el-tag-font-size);\n line-height: normal;\n align-content: center;\n border-width: 1px;\n border-style: solid;\n border-radius: var(--el-tag-border-radius);\n box-sizing: border-box;\n white-space: nowrap;\n --el-icon-size: 14px;\n --el-tag-bg-color: var(--el-color-primary-light-9);\n --el-tag-border-color: var(--el-color-primary-light-8);\n --el-tag-hover-color: var(--el-color-primary);\n}\n.pops-panel-select-multiple .el-select__selection .el-tag {\n cursor: pointer;\n border-color: transparent;\n}\n.pops-panel-select-multiple .el-tag.el-tag--info {\n --el-tag-bg-color: var(--el-color-info-light-9);\n --el-tag-border-color: var(--el-color-info-light-8);\n --el-tag-hover-color: var(--el-color-info);\n}\n.pops-panel-select-multiple .el-tag.el-tag--info {\n --el-tag-text-color: var(--el-color-info);\n}\n.pops-panel-select-multiple .el-tag.is-closable {\n padding-right: 5px;\n}\n.pops-panel-select-multiple .el-select__selection .el-tag .el-tag__content {\n min-width: 0;\n}\n.pops-panel-select-multiple .el-tag .el-tag__close {\n flex-shrink: 0;\n color: var(--el-tag-text-color);\n}\n.pops-panel-select-multiple .el-tag .el-tag__close:hover {\n color: var(--el-color-white);\n background-color: var(--el-tag-hover-color);\n}\n.pops-panel-select-multiple .el-tag .el-icon {\n border-radius: 50%;\n cursor: pointer;\n font-size: calc(var(--el-icon-size) - 2px);\n height: var(--el-icon-size);\n width: var(--el-icon-size);\n}\n.pops-panel-select-multiple .el-tag .el-tag__close {\n margin-left: 6px;\n}\n.pops-panel-select-multiple .el-select__tags-text {\n display: block;\n line-height: normal;\n align-content: center;\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n}\n.pops-panel-select-multiple-disable {\n --el-fill-color-blank: #f5f7fa;\n --color: #a8abb2;\n --el-border-color: #cbcbcb;\n}\n.pops-panel-select-multiple-disable .el-tag.el-tag--info {\n --el-tag-bg-color: #e7e7e7;\n --el-tag-text-color: var(--pops-components-is-disabled-text-color);\n}\n.pops-panel-select-multiple-disable .el-select__selection .el-tag,\n.pops-panel-select-multiple-disable .el-tag .el-tag__close:hover,\n.pops-panel-select-multiple-disable .el-select__wrapper,\n.pops-panel-select-multiple-disable .el-select__caret {\n cursor: not-allowed;\n}\n/* select-multiple的CSS*/\n\n/* deepMenu的css */\n.pops-panel-deepMenu-nav-item {\n cursor: pointer;\n}\n.pops-panel-deepMenu-nav-item:active {\n background: var(--pops-panel-forms-container-deepMenu-item-active-bg);\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\nsection.pops-panel-container .pops-panel-forms-container-item ul li.pops-panel-deepMenu-nav-item:active {\n padding: var(--pops-panel-forms-container-li-padding-top-bottom)\n var(--pops-panel-forms-container-li-padding-left-right);\n margin: 0px;\n}\n/* 去除上个兄弟item的底部边框颜色 */\nsection.pops-panel-container .pops-panel-forms-container-item ul li:has(+ .pops-panel-deepMenu-nav-item:active) {\n border-bottom: 1px solid transparent;\n}\n/* 第一个和最后一个跟随圆角 */\nsection.pops-panel-container .pops-panel-forms-container-item ul li.pops-panel-deepMenu-nav-item:first-child:active {\n border-top-left-radius: var(--pops-panel-forms-container-item-border-radius);\n border-top-right-radius: var(--pops-panel-forms-container-item-border-radius);\n}\nsection.pops-panel-container .pops-panel-forms-container-item ul li.pops-panel-deepMenu-nav-item:last-child:active {\n border-bottom-left-radius: var(--pops-panel-forms-container-item-border-radius);\n border-bottom-right-radius: var(--pops-panel-forms-container-item-border-radius);\n}\n.pops-panel-deepMenu-nav-item .pops-panel-deepMenu {\n display: flex;\n align-items: center;\n color: #6c6c6c;\n fill: #6c6c6c;\n}\n.pops-panel-deepMenu-nav-item .pops-panel-deepMenu-arrowRight-icon {\n width: 15px;\n height: 15px;\n display: flex;\n align-items: center;\n}\nsection.pops-panel-deepMenu-container .pops-panel-container-header-ul li.pops-panel-deepMenu-container-header {\n display: flex;\n align-items: center;\n width: -webkit-fill-available;\n width: -moz-available;\n padding: var(--pops-panel-forms-header-padding-top-bottom)\n calc(\n var(--pops-panel-forms-margin-left-right) + var(--pops-panel-forms-container-li-padding-left-right) -\n var(--pops-panel-forms-header-icon-size)\n );\n gap: 0px;\n}\n.pops-panel-deepMenu-container .pops-panel-deepMenu-container-left-arrow-icon {\n width: var(--pops-panel-forms-header-icon-size);\n height: var(--pops-panel-forms-header-icon-size);\n display: flex;\n align-items: center;\n cursor: pointer;\n}\n/* 修复safari上图标大小未正常显示 */\n.pops-panel-deepMenu-container .pops-panel-deepMenu-container-left-arrow-icon > svg {\n width: inherit;\n height: inherit;\n}\n/* deepMenu的css */\n\n/* 文字对齐 */\n.pops-panel-item-left-desc-text:has(code) {\n display: flex;\n align-items: baseline;\n flex-wrap: wrap;\n}\n\n@media (prefers-color-scheme: dark) {\n .pops[type-value=\"panel\"] {\n --pops-bg-color: #000000;\n --pops-color: #f2f2f2;\n --panel-title-bg-color: #000000;\n --panel-aside-bg-color: #262626;\n --pops-panel-forms-container-item-left-desc-text-color: #6c6c6c;\n --pops-panel-forms-container-item-bg-color: #262626;\n --pops-panel-forms-container-item-title-color: #c1c1c1;\n\n --pops-panel-forms-container-li-border-color: rgb(51, 51, 51, var(--pops-bd-opacity));\n --pops-panel-forms-container-deepMenu-item-active-bg: #333333;\n }\n .pops[type-value=\"panel\"] .pops-panel-deepMenu-container .pops-panel-deepMenu-container-left-arrow-icon {\n fill: #f2f2f2;\n }\n\n /* switch的CSS */\n .pops-panel-switch {\n --panel-switch-core-bd-color: rgb(220, 223, 230, var(--pops-bd-opacity));\n --panel-switch-core-bg-color: rgb(220, 223, 230, var(--pops-bg-opacity));\n --panel-switch-circle-color: #dcdfe6;\n --panel-switch-circle-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));\n --panel-switch-checked-circle-color: #409eff;\n --panel-switch-checked-core-bd-color: rgb(64, 158, 255, var(--pops-bd-opacity));\n --panel-switch-checked-core-bg-color: rgb(64, 158, 255, var(--pops-bg-opacity));\n }\n /* select的CSS */\n .pops-panel-select {\n --pops-panel-components-select-text-color: #f2f2f2;\n --pops-panel-components-select-bd-color: rgb(51, 51, 51, var(--pops-bd-opacity));\n --pops-panel-components-select-bg-color: #141414;\n }\n /* select-multiple的CSS*/\n .pops-panel-select-multiple {\n --el-fill-color-blank: #141414;\n --el-border-color: #4c4d4f;\n --el-text-color-placeholder: #a8abb2;\n --el-select-input-color: #a8abb2;\n --el-text-color-regular: #606266;\n --el-color-info: #909399;\n --el-color-info-light-8: #e9e9eb;\n --el-color-primary-light-9: #ecf5ff;\n --el-color-primary-light-8: #d9ecff;\n --el-color-primary: #409eff;\n --el-color-white: #ffffff;\n }\n .pops-panel-select-multiple .el-tag {\n --el-color-info-light-9: #202121;\n }\n .pops-panel-select-multiple-disable {\n --el-border-color: rgb(51, 51, 51, var(--pops-bd-opacity));\n }\n .pops-panel-select-multiple-disable .el-tag.el-tag--info {\n --el-tag-bg-color: #2f2f2f;\n }\n /* select-multiple的CSS*/\n /* slider的CSS */\n .pops-slider {\n --pops-slider-border-color-light: #414243;\n }\n /* input的CSS */\n .pops-panel-input {\n --pops-panel-components-input-text-color: #f2f2f2;\n --pops-panel-components-input-bd-color: #4f5052;\n --pops-panel-components-input-bg-color: #141414;\n --pops-panel-components-input-hover-bd-color: #6f7175;\n --pops-panel-components-input-focus-bd-color: #409eff;\n --pops-panel-components-input-suffix-color: #a8abb2;\n }\n /* textarea的CSS */\n .pops-panel-textarea {\n --pops-panel-components-textarea-text-color: #f2f2f2;\n --pops-panel-components-textarea-text-bg-color: #141414;\n --pops-panel-components-textarea-bd-color: #4f5052;\n --pops-panel-components-textarea-hover-bd-color: #6f7175;\n --pops-panel-components-textarea-focus-bd-color: #409eff;\n }\n .pops-panel-textarea-disable {\n --pops-panel-components-textarea-text-color: var(--pops-components-is-disabled-text-color);\n --pops-panel-components-textarea-text-bg-color: var(--pops-components-is-disabled-bg-color);\n }\n /* slider */\n .pops-slider {\n --pops-slider-text-color-placeholder: #8d9095;\n }\n}\n";
|
|
2857
2838
|
|
|
2858
|
-
var rightClickMenuCSS = ".pops-rightClickMenu {\n
|
|
2839
|
+
var rightClickMenuCSS = ".pops-rightClickMenu {\n --pops-right-context-color: #000000;\n --pops-right-context-bg-color: rgb(255, 255, 255, 0.733);\n --pops-right-context-backdrop-filter: blur(10px);\n --pops-right-context-z-index: 10000;\n --pops-right-context-bd-radius: 6px;\n --pops-right-context-menu-shadow-color: rgb(114, 114, 114, 0.251);\n --pops-right-context-menu-row-bd-radius: 6px;\n --pops-right-context-menu-row-visited-color: rgb(0, 0, 0, 0.067);\n --pops-right-context-menu-row-hover-color: rgb(0, 0, 0, 0.067);\n}\n.pops-rightClickMenu * {\n -webkit-box-sizing: border-box;\n box-sizing: border-box;\n margin: 0;\n padding: 0;\n -webkit-tap-highlight-color: transparent;\n scrollbar-width: thin;\n}\n.pops-rightClickMenu {\n position: fixed;\n z-index: var(--pops-right-context-z-index);\n text-align: center;\n border-radius: var(--pops-right-context-bd-radius);\n font-size: 16px;\n font-weight: 500;\n color: var(--pops-right-context-color);\n background: var(--pops-right-context-bg-color);\n box-shadow: 0 0.25rem 0.5rem 0.125rem var(--pops-right-context-menu-shadow-color);\n -webkit-backdrop-filter: var(--pops-right-context-backdrop-filter);\n backdrop-filter: var(--pops-right-context-backdrop-filter);\n}\n/* scale动画 */\n.pops-rightClickMenu-anim-scale {\n transition:\n opacity 150ms cubic-bezier(0.2, 0, 0.2, 1),\n transform 150ms cubic-bezier(0.2, 0, 0.2, 1);\n transform: scale(0.85);\n}\n.pops-rightClickMenu-anim-scale-open {\n transform: scale(1);\n}\n.pops-rightClickMenu-anim-scale-not-open {\n opacity: 0;\n}\n/* 展开动画 */\n.pops-rightClickMenu-anim-grid {\n display: grid;\n transition: 0.3s;\n grid-template-rows: 0fr;\n}\n.pops-rightClickMenu-anim-show {\n grid-template-rows: 1fr;\n}\n.pops-rightClickMenu-is-visited {\n background: var(--pops-right-context-menu-row-visited-color);\n}\ni.pops-rightClickMenu-icon {\n height: 1em;\n width: 1em;\n line-height: normal;\n align-content: center;\n display: inline-flex;\n justify-content: center;\n align-items: center;\n position: relative;\n fill: currentColor;\n color: inherit;\n font-size: inherit;\n margin-right: 6px;\n}\ni.pops-rightClickMenu-icon[is-loading=\"true\"] {\n animation: rotating 2s linear infinite;\n}\n.pops-rightClickMenu li:hover {\n background: var(--pops-right-context-menu-row-hover-color);\n cursor: pointer;\n}\n.pops-rightClickMenu ul {\n margin: 0;\n padding: 0;\n display: flex;\n flex-direction: column;\n align-items: flex-start;\n justify-content: center;\n overflow: hidden;\n}\n.pops-rightClickMenu ul li {\n padding: 5px 10px;\n margin: 5px 5px;\n border-radius: var(--pops-right-context-menu-row-bd-radius);\n display: flex;\n width: -webkit-fill-available;\n width: -moz-available;\n text-align: left;\n align-items: center;\n -webkit-user-select: none;\n -moz-user-select: none;\n -ms-user-select: none;\n user-select: none;\n}\n\n@media (prefers-color-scheme: dark) {\n /*.pops-rightClickMenu {\n\t\t--pops-right-context-menu-shadow-color: #3c3c3c;\n\t}*/\n}\n@media (hover: hover) {\n .pops-rightClickMenu ul li:active {\n transform: scale(0.98);\n }\n}\n";
|
|
2859
2840
|
|
|
2860
2841
|
const PopsCSS = {
|
|
2861
2842
|
/** 主CSS */
|
|
@@ -2902,7 +2883,7 @@
|
|
|
2902
2883
|
if (!this.$flag.isInit) {
|
|
2903
2884
|
this.$flag.isInit = true;
|
|
2904
2885
|
/* 处理获取当前所有的动画名 */
|
|
2905
|
-
|
|
2886
|
+
const animationStyle = document.createElement("style");
|
|
2906
2887
|
PopsSafeUtils.setSafeHTML(animationStyle, PopsCSS.anim);
|
|
2907
2888
|
popsDOMUtils.appendHead(animationStyle);
|
|
2908
2889
|
this.$data = null;
|
|
@@ -2916,7 +2897,7 @@
|
|
|
2916
2897
|
* 判断是否存在某个动画名
|
|
2917
2898
|
*/
|
|
2918
2899
|
hasAnim(name) {
|
|
2919
|
-
return this.$data
|
|
2900
|
+
return Object.prototype.hasOwnProperty.call(this.$data, name);
|
|
2920
2901
|
},
|
|
2921
2902
|
};
|
|
2922
2903
|
|
|
@@ -2959,7 +2940,6 @@
|
|
|
2959
2940
|
// 当前页面最大的z-index
|
|
2960
2941
|
let zIndex = 0;
|
|
2961
2942
|
// 当前的最大z-index的元素,调试使用
|
|
2962
|
-
// @ts-ignore
|
|
2963
2943
|
let maxZIndexNode = null;
|
|
2964
2944
|
/**
|
|
2965
2945
|
* 元素是否可见
|
|
@@ -2975,7 +2955,7 @@
|
|
|
2975
2955
|
*/
|
|
2976
2956
|
function queryMaxZIndex($ele) {
|
|
2977
2957
|
if (typeof ignoreCallBack === "function") {
|
|
2978
|
-
|
|
2958
|
+
const ignoreResult = ignoreCallBack($ele);
|
|
2979
2959
|
if (typeof ignoreResult === "boolean" && !ignoreResult) {
|
|
2980
2960
|
return;
|
|
2981
2961
|
}
|
|
@@ -2984,7 +2964,7 @@
|
|
|
2984
2964
|
const nodeStyle = PopsCore.window.getComputedStyle($ele);
|
|
2985
2965
|
/* 不对position为static和display为none的元素进行获取它们的z-index */
|
|
2986
2966
|
if (isVisibleNode(nodeStyle)) {
|
|
2987
|
-
|
|
2967
|
+
const nodeZIndex = parseInt(nodeStyle.zIndex);
|
|
2988
2968
|
if (!isNaN(nodeZIndex)) {
|
|
2989
2969
|
if (nodeZIndex > zIndex) {
|
|
2990
2970
|
// 赋值到全局
|
|
@@ -3000,7 +2980,7 @@
|
|
|
3000
2980
|
}
|
|
3001
2981
|
}
|
|
3002
2982
|
}
|
|
3003
|
-
target.querySelectorAll("*").forEach(($ele
|
|
2983
|
+
target.querySelectorAll("*").forEach(($ele) => {
|
|
3004
2984
|
queryMaxZIndex($ele);
|
|
3005
2985
|
});
|
|
3006
2986
|
zIndex += deviation;
|
|
@@ -3035,13 +3015,13 @@
|
|
|
3035
3015
|
return $css.position !== "static" && $css.display !== "none";
|
|
3036
3016
|
}
|
|
3037
3017
|
Object.keys(PopsInstData).forEach((instKeyName) => {
|
|
3038
|
-
|
|
3018
|
+
const instData = PopsInstData[instKeyName];
|
|
3039
3019
|
for (let index = 0; index < instData.length; index++) {
|
|
3040
3020
|
const inst = instData[index];
|
|
3041
|
-
|
|
3021
|
+
const nodeStyle = window.getComputedStyle(inst.animElement);
|
|
3042
3022
|
/* 不对position为static和display为none的元素进行获取它们的z-index */
|
|
3043
3023
|
if (isVisibleNode(nodeStyle)) {
|
|
3044
|
-
|
|
3024
|
+
const nodeZIndex = parseInt(nodeStyle.zIndex);
|
|
3045
3025
|
if (!isNaN(nodeZIndex)) {
|
|
3046
3026
|
if (nodeZIndex > zIndex) {
|
|
3047
3027
|
zIndex = nodeZIndex;
|
|
@@ -3052,7 +3032,7 @@
|
|
|
3052
3032
|
}
|
|
3053
3033
|
});
|
|
3054
3034
|
zIndex += deviation;
|
|
3055
|
-
|
|
3035
|
+
const isOverMaxZIndex = zIndex >= maxZIndex;
|
|
3056
3036
|
if (isOverMaxZIndex) {
|
|
3057
3037
|
// 超出z-index最大值
|
|
3058
3038
|
zIndex = maxZIndex;
|
|
@@ -3097,9 +3077,9 @@
|
|
|
3097
3077
|
// 移除全部或者guid相同
|
|
3098
3078
|
if (isAll || instConfigItem["guid"] === guid) {
|
|
3099
3079
|
// 判断是否有动画
|
|
3100
|
-
|
|
3080
|
+
const animName = instConfigItem.animElement.getAttribute("anim");
|
|
3101
3081
|
if (PopsAnimation.hasAnim(animName)) {
|
|
3102
|
-
|
|
3082
|
+
const reverseAnimName = animName + "-reverse";
|
|
3103
3083
|
instConfigItem.animElement.style.width = "100%";
|
|
3104
3084
|
instConfigItem.animElement.style.height = "100%";
|
|
3105
3085
|
instConfigItem.animElement.style["animation-name"] = reverseAnimName;
|
|
@@ -3134,9 +3114,9 @@
|
|
|
3134
3114
|
*/
|
|
3135
3115
|
hide(popsType, instConfigList, guid, config, animElement, maskElement) {
|
|
3136
3116
|
return new Promise((resolve) => {
|
|
3137
|
-
|
|
3117
|
+
const popsElement = animElement.querySelector(".pops[type-value]");
|
|
3138
3118
|
if (popsType === "drawer") {
|
|
3139
|
-
|
|
3119
|
+
const drawerConfig = config;
|
|
3140
3120
|
popsUtils.setTimeout(() => {
|
|
3141
3121
|
maskElement.style.setProperty("display", "none");
|
|
3142
3122
|
if (["top", "bottom"].includes(drawerConfig.direction)) {
|
|
@@ -3152,18 +3132,14 @@
|
|
|
3152
3132
|
}, drawerConfig.closeDelay);
|
|
3153
3133
|
}
|
|
3154
3134
|
else {
|
|
3155
|
-
|
|
3135
|
+
const fintInst = instConfigList.find((instConfigItem) => instConfigItem.guid === guid);
|
|
3156
3136
|
if (fintInst) {
|
|
3157
3137
|
/* 存在动画 */
|
|
3158
|
-
|
|
3138
|
+
const instConfigItem = fintInst;
|
|
3159
3139
|
instConfigItem.animElement.style.width = "100%";
|
|
3160
3140
|
instConfigItem.animElement.style.height = "100%";
|
|
3161
|
-
|
|
3162
|
-
instConfigItem.animElement.style
|
|
3163
|
-
instConfigItem.animElement.getAttribute("anim") + "-reverse";
|
|
3164
|
-
if (PopsAnimation.hasAnim(
|
|
3165
|
-
// @ts-ignore
|
|
3166
|
-
instConfigItem.animElement.style["animation-name"])) {
|
|
3141
|
+
Reflect.set(instConfigItem.animElement.style, "animation-name", instConfigItem.animElement.getAttribute("anim") + "-reverse");
|
|
3142
|
+
if (PopsAnimation.hasAnim(Reflect.get(instConfigItem.animElement.style, "animation-name"))) {
|
|
3167
3143
|
/**
|
|
3168
3144
|
* 动画结束的回调
|
|
3169
3145
|
*/
|
|
@@ -3203,13 +3179,13 @@
|
|
|
3203
3179
|
*/
|
|
3204
3180
|
show(popsType, instConfigList, guid, config, animElement, maskElement) {
|
|
3205
3181
|
return new Promise((resolve) => {
|
|
3206
|
-
|
|
3182
|
+
const popsElement = animElement.querySelector(".pops[type-value]");
|
|
3207
3183
|
if (popsType === "drawer") {
|
|
3208
|
-
|
|
3184
|
+
const drawerConfig = config;
|
|
3209
3185
|
popsUtils.setTimeout(() => {
|
|
3210
3186
|
popsDOMUtils.css(maskElement, "display", "");
|
|
3211
|
-
|
|
3212
|
-
|
|
3187
|
+
const direction = drawerConfig.direction;
|
|
3188
|
+
const size = drawerConfig.size.toString();
|
|
3213
3189
|
if (["top", "bottom"].includes(direction)) {
|
|
3214
3190
|
popsElement.style.setProperty("height", size);
|
|
3215
3191
|
}
|
|
@@ -3223,18 +3199,13 @@
|
|
|
3223
3199
|
}, drawerConfig.openDelay ?? 0);
|
|
3224
3200
|
}
|
|
3225
3201
|
else {
|
|
3226
|
-
|
|
3202
|
+
const fintInst = instConfigList.find((instConfigItem) => instConfigItem.guid === guid);
|
|
3227
3203
|
if (fintInst) {
|
|
3228
|
-
|
|
3204
|
+
const instConfigItem = fintInst;
|
|
3229
3205
|
instConfigItem.animElement.style.width = "";
|
|
3230
3206
|
instConfigItem.animElement.style.height = "";
|
|
3231
|
-
|
|
3232
|
-
instConfigItem.animElement.style
|
|
3233
|
-
.animElement.getAttribute("anim")
|
|
3234
|
-
.replace("-reverse", "");
|
|
3235
|
-
if (PopsAnimation.hasAnim(
|
|
3236
|
-
// @ts-ignore
|
|
3237
|
-
instConfigItem.animElement.style["animation-name"])) {
|
|
3207
|
+
Reflect.set(instConfigItem.animElement.style, "animation-name", instConfigItem.animElement.getAttribute("anim").replace("-reverse", ""));
|
|
3208
|
+
if (PopsAnimation.hasAnim(Reflect.get(instConfigItem.animElement.style, "animation-name"))) {
|
|
3238
3209
|
/**
|
|
3239
3210
|
* 动画结束的回调
|
|
3240
3211
|
*/
|
|
@@ -3273,8 +3244,8 @@
|
|
|
3273
3244
|
*/
|
|
3274
3245
|
close(popsType, instConfigList, guid, config, animElement) {
|
|
3275
3246
|
return new Promise((resolve) => {
|
|
3276
|
-
|
|
3277
|
-
|
|
3247
|
+
const popsElement = animElement.querySelector(".pops[type-value]");
|
|
3248
|
+
const drawerConfig = config;
|
|
3278
3249
|
/**
|
|
3279
3250
|
* 动画结束事件
|
|
3280
3251
|
*/
|
|
@@ -3292,7 +3263,7 @@
|
|
|
3292
3263
|
}
|
|
3293
3264
|
/* 监听过渡结束 */
|
|
3294
3265
|
popsDOMUtils.on(popsElement, popsDOMUtils.getTransitionEndNameList(), closeCallBack);
|
|
3295
|
-
|
|
3266
|
+
const popsTransForm = getComputedStyle(popsElement).transform;
|
|
3296
3267
|
if (popsTransForm !== "none") {
|
|
3297
3268
|
popsDOMUtils.trigger(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, true);
|
|
3298
3269
|
return;
|
|
@@ -3344,8 +3315,8 @@
|
|
|
3344
3315
|
let clickElementLeftOffset = 0;
|
|
3345
3316
|
/* 点击元素,top偏移 */
|
|
3346
3317
|
let clickElementTopOffset = 0;
|
|
3347
|
-
|
|
3348
|
-
|
|
3318
|
+
const AnyTouch = popsUtils.AnyTouch();
|
|
3319
|
+
const anyTouchElement = new AnyTouch(options.dragElement, {
|
|
3349
3320
|
preventDefault(event) {
|
|
3350
3321
|
if (typeof options.preventEvent === "function") {
|
|
3351
3322
|
return options.preventEvent(event);
|
|
@@ -3363,7 +3334,7 @@
|
|
|
3363
3334
|
* 修改移动的元素的style
|
|
3364
3335
|
*/
|
|
3365
3336
|
function changeMoveElementStyle(element) {
|
|
3366
|
-
|
|
3337
|
+
const old_transitionDuration = element.style.transitionDuration;
|
|
3367
3338
|
if (globalThis.getComputedStyle(element).transitionDuration !== "0s") {
|
|
3368
3339
|
element.style.transitionDuration = "0s";
|
|
3369
3340
|
}
|
|
@@ -3393,7 +3364,7 @@
|
|
|
3393
3364
|
};
|
|
3394
3365
|
}
|
|
3395
3366
|
else {
|
|
3396
|
-
|
|
3367
|
+
const rect = container.getBoundingClientRect();
|
|
3397
3368
|
return {
|
|
3398
3369
|
left: rect.left,
|
|
3399
3370
|
top: rect.top,
|
|
@@ -3406,7 +3377,7 @@
|
|
|
3406
3377
|
anyTouchElement.on("pan", function (event) {
|
|
3407
3378
|
if (!isMove) {
|
|
3408
3379
|
isMove = true;
|
|
3409
|
-
|
|
3380
|
+
const rect = options.dragElement.getBoundingClientRect();
|
|
3410
3381
|
clickElementLeftOffset = event.x - rect.left;
|
|
3411
3382
|
clickElementTopOffset = event.y - rect.top;
|
|
3412
3383
|
transformInfo = popsDOMUtils.getTransform(moveElement);
|
|
@@ -3431,12 +3402,12 @@
|
|
|
3431
3402
|
if (options.limit) {
|
|
3432
3403
|
/* 限制在容器内移动 */
|
|
3433
3404
|
/* left偏移最大值 */
|
|
3434
|
-
|
|
3405
|
+
const maxLeftOffset = getContainerWidthOrHeight(options.container).width -
|
|
3435
3406
|
popsDOMUtils.width(moveElement) +
|
|
3436
3407
|
transformInfo.transformLeft;
|
|
3437
|
-
|
|
3408
|
+
const { left: minLeftOffset, top: minTopOffset } = getContainerTopOrLeft(options.container);
|
|
3438
3409
|
/* top偏移的最大值 */
|
|
3439
|
-
|
|
3410
|
+
const maxTopOffset = getContainerWidthOrHeight(options.container).height -
|
|
3440
3411
|
popsDOMUtils.height(moveElement) +
|
|
3441
3412
|
transformInfo.transformTop;
|
|
3442
3413
|
if (currentMoveLeftOffset > maxLeftOffset) {
|
|
@@ -3447,8 +3418,7 @@
|
|
|
3447
3418
|
/* 不允许超过容器的最大高度 */
|
|
3448
3419
|
currentMoveTopOffset = maxTopOffset;
|
|
3449
3420
|
}
|
|
3450
|
-
if (currentMoveLeftOffset - options.extraDistance * 2 <
|
|
3451
|
-
minLeftOffset + transformInfo.transformLeft) {
|
|
3421
|
+
if (currentMoveLeftOffset - options.extraDistance * 2 < minLeftOffset + transformInfo.transformLeft) {
|
|
3452
3422
|
/* 不允许left偏移小于容器最小值 */
|
|
3453
3423
|
currentMoveLeftOffset = minLeftOffset + transformInfo.transformLeft;
|
|
3454
3424
|
/* 最左边 +额外距离 */
|
|
@@ -3512,8 +3482,8 @@
|
|
|
3512
3482
|
throw new Error("获取前面的值或后面的值的方法不能为空");
|
|
3513
3483
|
}
|
|
3514
3484
|
return function (after_obj, before_obj) {
|
|
3515
|
-
|
|
3516
|
-
|
|
3485
|
+
const beforeValue = getBeforeValueFun(before_obj); /* 前 */
|
|
3486
|
+
const afterValue = getAfterValueFun(after_obj); /* 后 */
|
|
3517
3487
|
if (sortByDesc) {
|
|
3518
3488
|
if (afterValue > beforeValue) {
|
|
3519
3489
|
return -1;
|
|
@@ -3545,10 +3515,10 @@
|
|
|
3545
3515
|
* 创建shadow
|
|
3546
3516
|
*/
|
|
3547
3517
|
handlerShadow(config) {
|
|
3548
|
-
|
|
3518
|
+
const $shadowContainer = document.createElement("div");
|
|
3549
3519
|
$shadowContainer.className = "pops-shadow-container";
|
|
3550
3520
|
if (config.useShadowRoot) {
|
|
3551
|
-
|
|
3521
|
+
const $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
|
|
3552
3522
|
return {
|
|
3553
3523
|
$shadowContainer,
|
|
3554
3524
|
$shadowRoot,
|
|
@@ -3600,7 +3570,7 @@
|
|
|
3600
3570
|
});
|
|
3601
3571
|
}
|
|
3602
3572
|
for (const cssItem of css) {
|
|
3603
|
-
|
|
3573
|
+
const $css = popsDOMUtils.createElement("style", {}, {
|
|
3604
3574
|
"data-type": "PopsHandler.handleInit",
|
|
3605
3575
|
});
|
|
3606
3576
|
$css.textContent = cssItem.css;
|
|
@@ -3617,7 +3587,7 @@
|
|
|
3617
3587
|
* @param details 传递的配置
|
|
3618
3588
|
*/
|
|
3619
3589
|
handleMask(details = {}) {
|
|
3620
|
-
|
|
3590
|
+
const result = {
|
|
3621
3591
|
maskElement: popsDOMUtils.parseTextToDOM(details.maskHTML),
|
|
3622
3592
|
};
|
|
3623
3593
|
let isMaskClick = false;
|
|
@@ -3628,7 +3598,7 @@
|
|
|
3628
3598
|
function clickEvent(event) {
|
|
3629
3599
|
popsDOMUtils.preventEvent(event);
|
|
3630
3600
|
// 获取该类型实例存储列表
|
|
3631
|
-
|
|
3601
|
+
const targetInst = PopsInstData[details.type];
|
|
3632
3602
|
function originalRun() {
|
|
3633
3603
|
if (details.config.mask.clickEvent.toClose) {
|
|
3634
3604
|
/* 关闭 */
|
|
@@ -3662,12 +3632,12 @@
|
|
|
3662
3632
|
}
|
|
3663
3633
|
/* 判断按下的元素是否是pops-anim */
|
|
3664
3634
|
popsDOMUtils.on(details.animElement, ["touchstart", "mousedown"], void 0, (event) => {
|
|
3665
|
-
|
|
3635
|
+
const $click = event.composedPath()[0];
|
|
3666
3636
|
isMaskClick = isAnimElement($click);
|
|
3667
3637
|
});
|
|
3668
3638
|
/* 如果有动画层,在动画层上监听点击事件 */
|
|
3669
3639
|
popsDOMUtils.on(details.animElement, "click", void 0, (event) => {
|
|
3670
|
-
|
|
3640
|
+
const $click = event.composedPath()[0];
|
|
3671
3641
|
if (isAnimElement($click) && isMaskClick) {
|
|
3672
3642
|
return clickEvent(event);
|
|
3673
3643
|
}
|
|
@@ -3860,7 +3830,7 @@
|
|
|
3860
3830
|
* 处理返回的配置,针对popsHandler.handleEventDetails
|
|
3861
3831
|
*/
|
|
3862
3832
|
handleResultDetails(details) {
|
|
3863
|
-
|
|
3833
|
+
const resultDetails = Object.assign({}, details);
|
|
3864
3834
|
popsUtils.delete(resultDetails, "type");
|
|
3865
3835
|
popsUtils.delete(resultDetails, "function");
|
|
3866
3836
|
return resultDetails;
|
|
@@ -3874,7 +3844,7 @@
|
|
|
3874
3844
|
*/
|
|
3875
3845
|
handleClickEvent(type, $btn, eventDetails, callback) {
|
|
3876
3846
|
popsDOMUtils.on($btn, "click", (event) => {
|
|
3877
|
-
|
|
3847
|
+
const extraParam = {
|
|
3878
3848
|
type: type,
|
|
3879
3849
|
};
|
|
3880
3850
|
callback(Object.assign(eventDetails, extraParam), event);
|
|
@@ -3889,9 +3859,9 @@
|
|
|
3889
3859
|
* @param callback 回调函数
|
|
3890
3860
|
*/
|
|
3891
3861
|
handleKeyboardEvent(keyName, otherKeyList = [], callback) {
|
|
3892
|
-
|
|
3893
|
-
|
|
3894
|
-
|
|
3862
|
+
const keyboardEvent = function (event) {
|
|
3863
|
+
const _keyName = event.code || event.key;
|
|
3864
|
+
const _keyValue = event.charCode || event.keyCode || event.which;
|
|
3895
3865
|
if (otherKeyList.includes("ctrl") && !event.ctrlKey) {
|
|
3896
3866
|
return;
|
|
3897
3867
|
}
|
|
@@ -3933,7 +3903,7 @@
|
|
|
3933
3903
|
handlePromptClickEvent(type, inputElement, $btn, eventDetails, callback) {
|
|
3934
3904
|
popsDOMUtils.on($btn, "click", (event) => {
|
|
3935
3905
|
// 额外参数
|
|
3936
|
-
|
|
3906
|
+
const extraParam = {
|
|
3937
3907
|
type: type,
|
|
3938
3908
|
text: inputElement.value,
|
|
3939
3909
|
};
|
|
@@ -3966,7 +3936,7 @@
|
|
|
3966
3936
|
// .rightClickMenu
|
|
3967
3937
|
// 单独处理
|
|
3968
3938
|
if (type === "loading" || type === "tooltip" || type === "rightClickMenu") {
|
|
3969
|
-
|
|
3939
|
+
const inst = PopsInstData[type];
|
|
3970
3940
|
if (inst) {
|
|
3971
3941
|
PopsInstanceUtils.removeInstance([inst], "", true);
|
|
3972
3942
|
}
|
|
@@ -3986,7 +3956,7 @@
|
|
|
3986
3956
|
else {
|
|
3987
3957
|
// 对配置进行处理
|
|
3988
3958
|
// 选择配置的z-index和已有的pops实例的最大z-index值
|
|
3989
|
-
|
|
3959
|
+
const originZIndex = config.zIndex;
|
|
3990
3960
|
config.zIndex = () => {
|
|
3991
3961
|
const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(originZIndex) + 100);
|
|
3992
3962
|
return maxZIndex;
|
|
@@ -4106,13 +4076,13 @@
|
|
|
4106
4076
|
},
|
|
4107
4077
|
]);
|
|
4108
4078
|
// 先把z-index提取出来
|
|
4109
|
-
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4114
|
-
|
|
4115
|
-
|
|
4079
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4080
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
4081
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
4082
|
+
const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
4083
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
4084
|
+
const { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(popsType, config);
|
|
4085
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
4116
4086
|
/*html*/ `
|
|
4117
4087
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
4118
4088
|
? config.title.text
|
|
@@ -4123,15 +4093,15 @@
|
|
|
4123
4093
|
/**
|
|
4124
4094
|
* 弹窗的主元素,包括动画层
|
|
4125
4095
|
*/
|
|
4126
|
-
|
|
4127
|
-
|
|
4096
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
4097
|
+
const { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, btnOkElement, titleElement: $title, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
4128
4098
|
/** 遮罩层元素 */
|
|
4129
4099
|
let $mask = null;
|
|
4130
4100
|
/** 已创建的元素列表 */
|
|
4131
|
-
|
|
4101
|
+
const elementList = [$anim];
|
|
4132
4102
|
/* 遮罩层元素 */
|
|
4133
4103
|
if (config.mask.enable) {
|
|
4134
|
-
|
|
4104
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
4135
4105
|
type: popsType,
|
|
4136
4106
|
guid: guid,
|
|
4137
4107
|
config: config,
|
|
@@ -4142,7 +4112,7 @@
|
|
|
4142
4112
|
elementList.push($mask);
|
|
4143
4113
|
}
|
|
4144
4114
|
/* 处理返回的配置 */
|
|
4145
|
-
|
|
4115
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
4146
4116
|
/* 为顶部右边的关闭按钮添加点击事件 */
|
|
4147
4117
|
PopsHandler.handleClickEvent("close", $headerCloseBtn, eventDetails, config.btn.close.callback);
|
|
4148
4118
|
/* 为底部ok按钮添加点击事件 */
|
|
@@ -4176,7 +4146,7 @@
|
|
|
4176
4146
|
endCallBack: config.dragEndCallBack,
|
|
4177
4147
|
});
|
|
4178
4148
|
}
|
|
4179
|
-
|
|
4149
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
4180
4150
|
return result;
|
|
4181
4151
|
},
|
|
4182
4152
|
};
|
|
@@ -4310,13 +4280,13 @@
|
|
|
4310
4280
|
},
|
|
4311
4281
|
]);
|
|
4312
4282
|
// 先把z-index提取出来
|
|
4313
|
-
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4283
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4284
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
4285
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
4286
|
+
const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
4287
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
4288
|
+
const { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(popsType, config);
|
|
4289
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
4320
4290
|
/*html*/ `
|
|
4321
4291
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
4322
4292
|
? config.title.text
|
|
@@ -4327,8 +4297,8 @@
|
|
|
4327
4297
|
/**
|
|
4328
4298
|
* 弹窗的主元素,包括动画层
|
|
4329
4299
|
*/
|
|
4330
|
-
|
|
4331
|
-
|
|
4300
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
4301
|
+
const { popsElement: $pops, titleElement: $title, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
4332
4302
|
/**
|
|
4333
4303
|
* 遮罩层元素
|
|
4334
4304
|
*/
|
|
@@ -4336,10 +4306,10 @@
|
|
|
4336
4306
|
/**
|
|
4337
4307
|
* 已创建的元素列表
|
|
4338
4308
|
*/
|
|
4339
|
-
|
|
4309
|
+
const elementList = [$anim];
|
|
4340
4310
|
if (config.mask.enable) {
|
|
4341
4311
|
// 启用遮罩层
|
|
4342
|
-
|
|
4312
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
4343
4313
|
type: popsType,
|
|
4344
4314
|
guid: guid,
|
|
4345
4315
|
config: config,
|
|
@@ -4349,7 +4319,7 @@
|
|
|
4349
4319
|
$mask = _handleMask_.maskElement;
|
|
4350
4320
|
elementList.push($mask);
|
|
4351
4321
|
}
|
|
4352
|
-
|
|
4322
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
4353
4323
|
PopsHandler.handleClickEvent("close", $btnClose, eventDetails, config.btn.close.callback);
|
|
4354
4324
|
PopsHandler.handleClickEvent("ok", $btnOk, eventDetails, config.btn.ok.callback);
|
|
4355
4325
|
PopsHandler.handleClickEvent("cancel", $btnCancel, eventDetails, config.btn.cancel.callback);
|
|
@@ -4381,7 +4351,7 @@
|
|
|
4381
4351
|
endCallBack: config.dragEndCallBack,
|
|
4382
4352
|
});
|
|
4383
4353
|
}
|
|
4384
|
-
|
|
4354
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
4385
4355
|
return result;
|
|
4386
4356
|
},
|
|
4387
4357
|
};
|
|
@@ -4514,13 +4484,13 @@
|
|
|
4514
4484
|
},
|
|
4515
4485
|
]);
|
|
4516
4486
|
// 先把z-index提取出来
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4487
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4488
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
4489
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
4490
|
+
const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
4491
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
4492
|
+
const { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(popsType, config);
|
|
4493
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
4524
4494
|
/*html*/ `
|
|
4525
4495
|
${config.title.enable
|
|
4526
4496
|
? /*html*/ `<div class="pops-title pops-${popsType}-title" style="${headerStyle}">${config.title.html
|
|
@@ -4533,13 +4503,13 @@
|
|
|
4533
4503
|
/**
|
|
4534
4504
|
* 弹窗的主元素,包括动画层
|
|
4535
4505
|
*/
|
|
4536
|
-
|
|
4537
|
-
|
|
4538
|
-
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4506
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
4507
|
+
const { popsElement, headerCloseBtnElement, btnCancelElement, btnOkElement, btnOtherElement } = PopsHandler.handleQueryElement($anim, popsType);
|
|
4508
|
+
const $pops = popsElement;
|
|
4509
|
+
const $headerCloseBtn = headerCloseBtnElement;
|
|
4510
|
+
const $btnCancel = btnCancelElement;
|
|
4511
|
+
const $btnOk = btnOkElement;
|
|
4512
|
+
const $btnOther = btnOtherElement;
|
|
4543
4513
|
/**
|
|
4544
4514
|
* 遮罩层元素
|
|
4545
4515
|
*/
|
|
@@ -4547,9 +4517,9 @@
|
|
|
4547
4517
|
/**
|
|
4548
4518
|
* 已创建的元素列表
|
|
4549
4519
|
*/
|
|
4550
|
-
|
|
4520
|
+
const elementList = [$anim];
|
|
4551
4521
|
if (config.mask.enable) {
|
|
4552
|
-
|
|
4522
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
4553
4523
|
type: popsType,
|
|
4554
4524
|
guid: guid,
|
|
4555
4525
|
config: config,
|
|
@@ -4559,7 +4529,7 @@
|
|
|
4559
4529
|
$mask = _handleMask_.maskElement;
|
|
4560
4530
|
elementList.push($mask);
|
|
4561
4531
|
}
|
|
4562
|
-
|
|
4532
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
4563
4533
|
/* 处理方向 */
|
|
4564
4534
|
$pops.setAttribute("direction", config.direction);
|
|
4565
4535
|
/* 处理border-radius */
|
|
@@ -4587,7 +4557,7 @@
|
|
|
4587
4557
|
});
|
|
4588
4558
|
}
|
|
4589
4559
|
/* 待处理的点击事件列表 */
|
|
4590
|
-
|
|
4560
|
+
const needHandleClickEventList = [
|
|
4591
4561
|
{
|
|
4592
4562
|
type: "close",
|
|
4593
4563
|
ele: $headerCloseBtn,
|
|
@@ -4655,7 +4625,7 @@
|
|
|
4655
4625
|
$shadowContainer: $shadowContainer,
|
|
4656
4626
|
$shadowRoot: $shadowRoot,
|
|
4657
4627
|
});
|
|
4658
|
-
|
|
4628
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
4659
4629
|
return result;
|
|
4660
4630
|
},
|
|
4661
4631
|
};
|
|
@@ -4693,14 +4663,14 @@
|
|
|
4693
4663
|
let config = PopsLoadingConfig();
|
|
4694
4664
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4695
4665
|
config = popsUtils.assign(config, details);
|
|
4696
|
-
|
|
4666
|
+
const guid = popsUtils.getRandomGUID();
|
|
4697
4667
|
const PopsType = "loading";
|
|
4698
4668
|
config = PopsHandler.handleOnly(PopsType, config);
|
|
4699
4669
|
// 先把z-index提取出来
|
|
4700
|
-
|
|
4701
|
-
|
|
4702
|
-
|
|
4703
|
-
|
|
4670
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4671
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
4672
|
+
const { contentPStyle } = PopsElementHandler.createContentStyle("loading", config);
|
|
4673
|
+
const animHTML = PopsElementHandler.createAnim(guid, PopsType, config,
|
|
4704
4674
|
/*html*/ `
|
|
4705
4675
|
<div class="pops-content pops-${PopsType}-content">${config.addIndexCSS
|
|
4706
4676
|
? /*html*/ `
|
|
@@ -4718,8 +4688,8 @@
|
|
|
4718
4688
|
/**
|
|
4719
4689
|
* 弹窗的主元素,包括动画层
|
|
4720
4690
|
*/
|
|
4721
|
-
|
|
4722
|
-
|
|
4691
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
4692
|
+
const { popsElement: $pops } = PopsHandler.handleQueryElement($anim, PopsType);
|
|
4723
4693
|
/**
|
|
4724
4694
|
* 遮罩层元素
|
|
4725
4695
|
*/
|
|
@@ -4727,10 +4697,10 @@
|
|
|
4727
4697
|
/**
|
|
4728
4698
|
* 已创建的元素列表
|
|
4729
4699
|
*/
|
|
4730
|
-
|
|
4700
|
+
const elementList = [$anim];
|
|
4731
4701
|
if (config.mask.enable) {
|
|
4732
4702
|
// 创建遮罩层
|
|
4733
|
-
|
|
4703
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
4734
4704
|
type: PopsType,
|
|
4735
4705
|
guid: guid,
|
|
4736
4706
|
config: config,
|
|
@@ -4740,7 +4710,7 @@
|
|
|
4740
4710
|
$mask = _handleMask_.maskElement;
|
|
4741
4711
|
elementList.push($mask);
|
|
4742
4712
|
}
|
|
4743
|
-
|
|
4713
|
+
const eventDetails = PopsHandler.handleLoadingEventDetails(guid, PopsType, $anim, $pops, $mask, config);
|
|
4744
4714
|
popsDOMUtils.append(config.parent, elementList);
|
|
4745
4715
|
if ($mask != null) {
|
|
4746
4716
|
$anim.after($mask);
|
|
@@ -4757,7 +4727,7 @@
|
|
|
4757
4727
|
popsDOMUtils.css($anim, "position", "absolute !important");
|
|
4758
4728
|
$mask && popsDOMUtils.css($mask, "position", "absolute !important");
|
|
4759
4729
|
}
|
|
4760
|
-
|
|
4730
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
4761
4731
|
return result;
|
|
4762
4732
|
},
|
|
4763
4733
|
};
|
|
@@ -4977,20 +4947,14 @@
|
|
|
4977
4947
|
},
|
|
4978
4948
|
]);
|
|
4979
4949
|
/* 办公几件套 */
|
|
4980
|
-
|
|
4981
|
-
Folder_ICON
|
|
4982
|
-
|
|
4983
|
-
Folder_ICON
|
|
4984
|
-
|
|
4985
|
-
Folder_ICON
|
|
4986
|
-
// @ts-ignore
|
|
4987
|
-
Folder_ICON.pptx = Folder_ICON.ppt;
|
|
4988
|
-
// @ts-ignore;
|
|
4989
|
-
Folder_ICON.dmg = Folder_ICON.ipa;
|
|
4990
|
-
// @ts-ignore
|
|
4991
|
-
Folder_ICON.json = Folder_ICON.js;
|
|
4950
|
+
Reflect.set(Folder_ICON, "docx", Folder_ICON.doc);
|
|
4951
|
+
Reflect.set(Folder_ICON, "rtf", Folder_ICON.doc);
|
|
4952
|
+
Reflect.set(Folder_ICON, "xlsx", Folder_ICON.xls);
|
|
4953
|
+
Reflect.set(Folder_ICON, "pptx", Folder_ICON.ppt);
|
|
4954
|
+
Reflect.set(Folder_ICON, "dmg", Folder_ICON.ipa);
|
|
4955
|
+
Reflect.set(Folder_ICON, "json", Folder_ICON.js);
|
|
4992
4956
|
/* 压缩包 */
|
|
4993
|
-
|
|
4957
|
+
const zipIconList = [
|
|
4994
4958
|
"rar",
|
|
4995
4959
|
"7z",
|
|
4996
4960
|
"arj",
|
|
@@ -5009,11 +4973,11 @@
|
|
|
5009
4973
|
"001",
|
|
5010
4974
|
];
|
|
5011
4975
|
/* 图片 */
|
|
5012
|
-
|
|
4976
|
+
const imageIconList = ["jpg", "jpeg", "ico", "webp"];
|
|
5013
4977
|
/* 代码语言 */
|
|
5014
|
-
|
|
4978
|
+
const codeLanguageIconList = ["htm", "py", "vue", "bat", "sh", "vbs", "java", "kt"];
|
|
5015
4979
|
/* Android安装包 */
|
|
5016
|
-
|
|
4980
|
+
const androidIconList = ["apk", "apkm", "xapk"];
|
|
5017
4981
|
zipIconList.forEach((keyName) => {
|
|
5018
4982
|
Folder_ICON[keyName] = Folder_ICON.zip;
|
|
5019
4983
|
});
|
|
@@ -5027,16 +4991,15 @@
|
|
|
5027
4991
|
Folder_ICON[keyName] = Folder_ICON.apk;
|
|
5028
4992
|
});
|
|
5029
4993
|
if (details?.folder) {
|
|
5030
|
-
|
|
5031
|
-
config.folder = details.folder;
|
|
4994
|
+
Reflect.set(config, "folder", details.folder);
|
|
5032
4995
|
}
|
|
5033
4996
|
// 先把z-index提取出来
|
|
5034
|
-
|
|
5035
|
-
|
|
5036
|
-
|
|
5037
|
-
|
|
5038
|
-
|
|
5039
|
-
|
|
4997
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4998
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
4999
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
5000
|
+
const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
5001
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
5002
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
5040
5003
|
/*html*/ `
|
|
5041
5004
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
5042
5005
|
? config.title.text
|
|
@@ -5138,8 +5101,8 @@
|
|
|
5138
5101
|
/**
|
|
5139
5102
|
* 弹窗的主元素,包括动画层
|
|
5140
5103
|
*/
|
|
5141
|
-
|
|
5142
|
-
|
|
5104
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
5105
|
+
const { popsElement: $pops, titleElement: $title, contentElement: $content,
|
|
5143
5106
|
// folderListElement,
|
|
5144
5107
|
// folderListHeaderElement,
|
|
5145
5108
|
// folderListHeaderRowElement,
|
|
@@ -5151,9 +5114,9 @@
|
|
|
5151
5114
|
/**
|
|
5152
5115
|
* 已创建的元素列表
|
|
5153
5116
|
*/
|
|
5154
|
-
|
|
5117
|
+
const elementList = [$anim];
|
|
5155
5118
|
if (config.mask.enable) {
|
|
5156
|
-
|
|
5119
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
5157
5120
|
type: popsType,
|
|
5158
5121
|
guid: guid,
|
|
5159
5122
|
config: config,
|
|
@@ -5164,7 +5127,7 @@
|
|
|
5164
5127
|
elementList.push($mask);
|
|
5165
5128
|
}
|
|
5166
5129
|
/* 事件 */
|
|
5167
|
-
|
|
5130
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
5168
5131
|
PopsHandler.handleClickEvent("close", $btnCloseBtn, eventDetails, config.btn.close.callback);
|
|
5169
5132
|
PopsHandler.handleClickEvent("ok", btnOkElement, eventDetails, config.btn.ok.callback);
|
|
5170
5133
|
PopsHandler.handleClickEvent("cancel", btnCancelElement, eventDetails, config.btn.cancel.callback);
|
|
@@ -5183,7 +5146,7 @@
|
|
|
5183
5146
|
config.folder.sort();
|
|
5184
5147
|
this.initFolderView(config.folder);
|
|
5185
5148
|
/* 将数据存到全部文件的属性_config_中 */
|
|
5186
|
-
|
|
5149
|
+
const allFilesElement = folderFileListBreadcrumbPrimaryElement.querySelector(".pops-folder-list .pops-folder-file-list-breadcrumb-allFiles:first-child");
|
|
5187
5150
|
Reflect.set(allFilesElement, "_config_", config.folder);
|
|
5188
5151
|
/* 设置点击顶部的全部文件事件 */
|
|
5189
5152
|
popsDOMUtils.on(allFilesElement, "click", (event) => {
|
|
@@ -5232,13 +5195,13 @@
|
|
|
5232
5195
|
* @param isFolder 是否是文件夹
|
|
5233
5196
|
*/
|
|
5234
5197
|
createFolderRowElement(fileName, latestTime = "-", fileSize = "-", isFolder = false) {
|
|
5235
|
-
|
|
5236
|
-
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
|
|
5240
|
-
|
|
5241
|
-
|
|
5198
|
+
const origin_fileName = fileName;
|
|
5199
|
+
const origin_latestTime = latestTime;
|
|
5200
|
+
const origin_fileSize = fileSize;
|
|
5201
|
+
const folderElement = popsDOMUtils.createElement("tr");
|
|
5202
|
+
const fileNameElement = popsDOMUtils.createElement("td");
|
|
5203
|
+
const fileTimeElement = popsDOMUtils.createElement("td");
|
|
5204
|
+
const fileFormatSize = popsDOMUtils.createElement("td");
|
|
5242
5205
|
let fileType = "";
|
|
5243
5206
|
let fileIcon = Folder_ICON.folder;
|
|
5244
5207
|
if (isFolder) {
|
|
@@ -5255,14 +5218,14 @@
|
|
|
5255
5218
|
if (typeof fileSize === "number") {
|
|
5256
5219
|
fileSize = popsUtils.formatByteToSize(fileSize);
|
|
5257
5220
|
}
|
|
5258
|
-
for (
|
|
5221
|
+
for (const keyName in Folder_ICON) {
|
|
5259
5222
|
if (fileName.toLowerCase().endsWith("." + keyName)) {
|
|
5260
5223
|
fileType = keyName;
|
|
5261
5224
|
fileIcon = Folder_ICON[keyName];
|
|
5262
5225
|
break;
|
|
5263
5226
|
}
|
|
5264
5227
|
}
|
|
5265
|
-
if (!
|
|
5228
|
+
if (!fileIcon) {
|
|
5266
5229
|
fileType = "Null";
|
|
5267
5230
|
fileIcon = Folder_ICON.Null;
|
|
5268
5231
|
}
|
|
@@ -5295,7 +5258,7 @@
|
|
|
5295
5258
|
</div>
|
|
5296
5259
|
`);
|
|
5297
5260
|
/* 存储原来的值 */
|
|
5298
|
-
|
|
5261
|
+
const __value__ = {
|
|
5299
5262
|
fileName: origin_fileName,
|
|
5300
5263
|
latestTime: origin_latestTime,
|
|
5301
5264
|
fileSize: origin_fileSize,
|
|
@@ -5323,11 +5286,11 @@
|
|
|
5323
5286
|
* @param isFolder 是否是文件夹
|
|
5324
5287
|
*/
|
|
5325
5288
|
createFolderRowElementByMobile(fileName, latestTime = "-", fileSize = "-", isFolder = false) {
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5289
|
+
const origin_fileName = fileName;
|
|
5290
|
+
const origin_latestTime = latestTime;
|
|
5291
|
+
const origin_fileSize = fileSize;
|
|
5292
|
+
const folderElement = popsDOMUtils.createElement("tr");
|
|
5293
|
+
const fileNameElement = popsDOMUtils.createElement("td");
|
|
5331
5294
|
let fileType = "";
|
|
5332
5295
|
let fileIcon = Folder_ICON.folder;
|
|
5333
5296
|
if (isFolder) {
|
|
@@ -5344,14 +5307,14 @@
|
|
|
5344
5307
|
if (typeof fileSize === "number") {
|
|
5345
5308
|
fileSize = popsUtils.formatByteToSize(fileSize);
|
|
5346
5309
|
}
|
|
5347
|
-
for (
|
|
5310
|
+
for (const keyName in Folder_ICON) {
|
|
5348
5311
|
if (fileName.toLowerCase().endsWith("." + keyName)) {
|
|
5349
5312
|
fileType = keyName;
|
|
5350
5313
|
fileIcon = Folder_ICON[keyName];
|
|
5351
5314
|
break;
|
|
5352
5315
|
}
|
|
5353
5316
|
}
|
|
5354
|
-
if (!
|
|
5317
|
+
if (!fileIcon) {
|
|
5355
5318
|
fileType = "Null";
|
|
5356
5319
|
fileIcon = Folder_ICON.Null;
|
|
5357
5320
|
}
|
|
@@ -5369,7 +5332,7 @@
|
|
|
5369
5332
|
</div>
|
|
5370
5333
|
`);
|
|
5371
5334
|
/* 存储原来的值 */
|
|
5372
|
-
|
|
5335
|
+
const __value__ = {
|
|
5373
5336
|
fileName: origin_fileName,
|
|
5374
5337
|
latestTime: origin_latestTime,
|
|
5375
5338
|
fileSize: origin_fileSize,
|
|
@@ -5393,7 +5356,7 @@
|
|
|
5393
5356
|
* 创建顶部导航的箭头图标
|
|
5394
5357
|
*/
|
|
5395
5358
|
createHeaderArrowIcon() {
|
|
5396
|
-
|
|
5359
|
+
const $arrowIcon = popsDOMUtils.createElement("div", {
|
|
5397
5360
|
className: "iconArrow",
|
|
5398
5361
|
});
|
|
5399
5362
|
return $arrowIcon;
|
|
@@ -5404,7 +5367,7 @@
|
|
|
5404
5367
|
* @param folderDataConfig 文件夹配置
|
|
5405
5368
|
*/
|
|
5406
5369
|
createBreadcrumb(folderName, folderDataConfig) {
|
|
5407
|
-
|
|
5370
|
+
const $breadcrumb = popsDOMUtils.createElement("span", {
|
|
5408
5371
|
className: "pops-folder-file-list-breadcrumb-allFiles cursor-p",
|
|
5409
5372
|
innerHTML: `<a>${folderName}</a>`,
|
|
5410
5373
|
_config_: folderDataConfig,
|
|
@@ -5422,8 +5385,8 @@
|
|
|
5422
5385
|
setBreadcrumbClickEvent(clickEvent, isTop, dataConfigList) {
|
|
5423
5386
|
this.clearFolderInfoView();
|
|
5424
5387
|
/* 获取当前的导航元素 */
|
|
5425
|
-
|
|
5426
|
-
|
|
5388
|
+
const $click = clickEvent.target;
|
|
5389
|
+
const currentBreadcrumb = $click.closest("span.pops-folder-file-list-breadcrumb-allFiles");
|
|
5427
5390
|
if (currentBreadcrumb) {
|
|
5428
5391
|
while (currentBreadcrumb.nextElementSibling) {
|
|
5429
5392
|
currentBreadcrumb.nextElementSibling.remove();
|
|
@@ -5432,7 +5395,7 @@
|
|
|
5432
5395
|
else {
|
|
5433
5396
|
console.error("获取导航按钮失败");
|
|
5434
5397
|
}
|
|
5435
|
-
|
|
5398
|
+
const loadingMask = PopsLoading.init({
|
|
5436
5399
|
parent: $content,
|
|
5437
5400
|
content: {
|
|
5438
5401
|
text: "获取文件列表中...",
|
|
@@ -5458,7 +5421,7 @@
|
|
|
5458
5421
|
*/
|
|
5459
5422
|
async enterFolder(clickEvent, dataConfig) {
|
|
5460
5423
|
this.clearFolderInfoView();
|
|
5461
|
-
|
|
5424
|
+
const loadingMask = PopsLoading.init({
|
|
5462
5425
|
parent: $content,
|
|
5463
5426
|
content: {
|
|
5464
5427
|
text: "获取文件列表中...",
|
|
@@ -5469,11 +5432,11 @@
|
|
|
5469
5432
|
addIndexCSS: false,
|
|
5470
5433
|
});
|
|
5471
5434
|
if (typeof dataConfig.clickEvent === "function") {
|
|
5472
|
-
|
|
5435
|
+
const childConfig = await dataConfig.clickEvent(clickEvent, dataConfig);
|
|
5473
5436
|
/* 添加顶部导航的箭头 */
|
|
5474
5437
|
folderFileListBreadcrumbPrimaryElement.appendChild(this.createHeaderArrowIcon());
|
|
5475
5438
|
/* 添加顶部导航的链接文字 */
|
|
5476
|
-
|
|
5439
|
+
const breadcrumbAllFilesElement = this.createBreadcrumb(dataConfig.fileName, childConfig);
|
|
5477
5440
|
folderFileListBreadcrumbPrimaryElement.appendChild(breadcrumbAllFilesElement);
|
|
5478
5441
|
/* 设置顶部导航点击事件 */
|
|
5479
5442
|
popsDOMUtils.on(breadcrumbAllFilesElement, "click", (event) => {
|
|
@@ -5490,9 +5453,9 @@
|
|
|
5490
5453
|
*/
|
|
5491
5454
|
async downloadFile(clickEvent, $row, dataConfig) {
|
|
5492
5455
|
popsDOMUtils.preventEvent(clickEvent);
|
|
5493
|
-
|
|
5456
|
+
const $link = $row.querySelector("a");
|
|
5494
5457
|
if (typeof dataConfig.clickEvent === "function") {
|
|
5495
|
-
|
|
5458
|
+
const downloadInfo = await dataConfig.clickEvent(clickEvent, dataConfig);
|
|
5496
5459
|
if (downloadInfo != null &&
|
|
5497
5460
|
typeof downloadInfo === "object" &&
|
|
5498
5461
|
!Array.isArray(downloadInfo) &&
|
|
@@ -5507,7 +5470,7 @@
|
|
|
5507
5470
|
}
|
|
5508
5471
|
if (downloadInfo.mode === "a" || downloadInfo.mode === "aBlank") {
|
|
5509
5472
|
/* a标签下载 */
|
|
5510
|
-
|
|
5473
|
+
const downloadLinkElement = document.createElement("a");
|
|
5511
5474
|
if (downloadInfo.mode === "aBlank") {
|
|
5512
5475
|
downloadLinkElement.setAttribute("target", "_blank");
|
|
5513
5476
|
}
|
|
@@ -5525,7 +5488,7 @@
|
|
|
5525
5488
|
}
|
|
5526
5489
|
else if (downloadInfo.mode === "iframe") {
|
|
5527
5490
|
/* iframe下载 */
|
|
5528
|
-
|
|
5491
|
+
const downloadIframeLinkElement = document.createElement("iframe");
|
|
5529
5492
|
downloadIframeLinkElement.src = downloadInfo.url;
|
|
5530
5493
|
downloadIframeLinkElement.onload = function () {
|
|
5531
5494
|
popsUtils.setTimeout(() => {
|
|
@@ -5553,16 +5516,16 @@
|
|
|
5553
5516
|
sortFolderConfig(folderDataConfigList, sortName = "fileName", isDesc = false) {
|
|
5554
5517
|
if (sortName === "fileName") {
|
|
5555
5518
|
// 如果是以文件名排序,文件夹优先放前面
|
|
5556
|
-
|
|
5519
|
+
const onlyFolderDataConfigList = folderDataConfigList.filter((value) => {
|
|
5557
5520
|
return value.isFolder;
|
|
5558
5521
|
});
|
|
5559
|
-
|
|
5522
|
+
const onlyFileDataConfigList = folderDataConfigList.filter((value) => {
|
|
5560
5523
|
return !value.isFolder;
|
|
5561
5524
|
});
|
|
5562
5525
|
// 文件夹排序
|
|
5563
5526
|
onlyFolderDataConfigList.sort((leftConfig, rightConfig) => {
|
|
5564
|
-
|
|
5565
|
-
|
|
5527
|
+
const beforeVal = leftConfig[sortName].toString();
|
|
5528
|
+
const afterVal = rightConfig[sortName].toString();
|
|
5566
5529
|
let compareVal = beforeVal.localeCompare(afterVal);
|
|
5567
5530
|
if (isDesc) {
|
|
5568
5531
|
/* 降序 */
|
|
@@ -5577,8 +5540,8 @@
|
|
|
5577
5540
|
});
|
|
5578
5541
|
// 文件名排序
|
|
5579
5542
|
onlyFileDataConfigList.sort((leftConfig, rightConfig) => {
|
|
5580
|
-
|
|
5581
|
-
|
|
5543
|
+
const beforeVal = leftConfig[sortName].toString();
|
|
5544
|
+
const afterVal = rightConfig[sortName].toString();
|
|
5582
5545
|
let compareVal = beforeVal.localeCompare(afterVal);
|
|
5583
5546
|
if (isDesc) {
|
|
5584
5547
|
/* 降序 */
|
|
@@ -5648,7 +5611,7 @@
|
|
|
5648
5611
|
this.sortFolderConfig(dataConfig, config.sort.name, config.sort.isDesc);
|
|
5649
5612
|
dataConfig.forEach((item) => {
|
|
5650
5613
|
if (item.isFolder) {
|
|
5651
|
-
|
|
5614
|
+
const { folderElement, fileNameElement } = popsUtils.isPhone()
|
|
5652
5615
|
? this.createFolderRowElementByMobile(item.fileName, "", "", true)
|
|
5653
5616
|
: this.createFolderRowElement(item.fileName, "", "", true);
|
|
5654
5617
|
// 文件夹 - 点击事件
|
|
@@ -5659,7 +5622,7 @@
|
|
|
5659
5622
|
folderListBodyElement.appendChild(folderElement);
|
|
5660
5623
|
}
|
|
5661
5624
|
else {
|
|
5662
|
-
|
|
5625
|
+
const { folderElement, fileNameElement } = popsUtils.isPhone()
|
|
5663
5626
|
? this.createFolderRowElementByMobile(item.fileName, item.latestTime, item.fileSize, false)
|
|
5664
5627
|
: this.createFolderRowElement(item.fileName, item.latestTime, item.fileSize, false);
|
|
5665
5628
|
// 文件 - 点击事件
|
|
@@ -5705,20 +5668,20 @@
|
|
|
5705
5668
|
config.sort.name = sortName;
|
|
5706
5669
|
config.sort.isDesc = !config.sort.isDesc;
|
|
5707
5670
|
}
|
|
5708
|
-
|
|
5709
|
-
|
|
5671
|
+
const arrowUp = target.querySelector(".pops-folder-icon-arrow-up");
|
|
5672
|
+
const arrowDown = target.querySelector(".pops-folder-icon-arrow-down");
|
|
5710
5673
|
this.changeArrowActive(arrowUp, arrowDown, config.sort.isDesc);
|
|
5711
5674
|
if (typeof config.sort.callback === "function" &&
|
|
5712
5675
|
config.sort.callback(target, event, config.sort.name, config.sort.isDesc)) {
|
|
5713
5676
|
return;
|
|
5714
5677
|
}
|
|
5715
|
-
|
|
5678
|
+
const childrenList = [];
|
|
5716
5679
|
Array.from(folderListBodyElement.children).forEach((trElement) => {
|
|
5717
|
-
|
|
5680
|
+
const __value__ = Reflect.get(trElement, "__value__");
|
|
5718
5681
|
Reflect.set(__value__, "target", trElement);
|
|
5719
5682
|
childrenList.push(__value__);
|
|
5720
5683
|
});
|
|
5721
|
-
|
|
5684
|
+
const sortedConfigList = this.sortFolderConfig(childrenList, config.sort.name, config.sort.isDesc);
|
|
5722
5685
|
sortedConfigList.forEach((item) => {
|
|
5723
5686
|
folderListBodyElement.appendChild(item.target);
|
|
5724
5687
|
});
|
|
@@ -5745,7 +5708,7 @@
|
|
|
5745
5708
|
$shadowContainer: $shadowContainer,
|
|
5746
5709
|
$shadowRoot: $shadowRoot,
|
|
5747
5710
|
});
|
|
5748
|
-
|
|
5711
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
5749
5712
|
return result;
|
|
5750
5713
|
},
|
|
5751
5714
|
};
|
|
@@ -5847,17 +5810,15 @@
|
|
|
5847
5810
|
css: PopsCSS.iframeCSS,
|
|
5848
5811
|
},
|
|
5849
5812
|
]);
|
|
5850
|
-
|
|
5851
|
-
// @ts-ignore
|
|
5852
|
-
config.animation != null && config.animation != "" ? "position:absolute;" : "";
|
|
5813
|
+
const maskExtraStyle = config.animation != null && config.animation != "" ? "position:absolute;" : "";
|
|
5853
5814
|
// 先把z-index提取出来
|
|
5854
|
-
|
|
5855
|
-
|
|
5856
|
-
|
|
5857
|
-
|
|
5858
|
-
|
|
5859
|
-
|
|
5860
|
-
|
|
5815
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
5816
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex, maskExtraStyle);
|
|
5817
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
5818
|
+
const iframeLoadingHTML = '<div class="pops-loading"></div>';
|
|
5819
|
+
const titleText = config.title.text.trim() !== "" ? config.title.text : config.url;
|
|
5820
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
5821
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
5861
5822
|
/*html*/ `
|
|
5862
5823
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
5863
5824
|
? titleText
|
|
@@ -5870,14 +5831,14 @@
|
|
|
5870
5831
|
/**
|
|
5871
5832
|
* 弹窗的主元素,包括动画层
|
|
5872
5833
|
*/
|
|
5873
|
-
|
|
5874
|
-
|
|
5834
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
5835
|
+
const { popsElement: $pops, headerCloseBtnElement, headerControlsElement, titleElement: $title, iframeElement: $iframe, loadingElement, contentLoadingElement: $contentLoading, headerMinBtnElement, headerMaxBtnElement, headerMiseBtnElement, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
5875
5836
|
let $iframeContainer = PopsCore.document.querySelector(".pops-iframe-container");
|
|
5876
5837
|
if (!$iframeContainer) {
|
|
5877
5838
|
$iframeContainer = PopsCore.document.createElement("div");
|
|
5878
5839
|
$iframeContainer.className = "pops-iframe-container";
|
|
5879
5840
|
$iframeContainer.style.cssText =
|
|
5880
|
-
"display: flex;position: fixed;bottom: 0px;flex-flow: wrap-reverse
|
|
5841
|
+
"display: flex;position: fixed;bottom: 0px;flex-flow: wrap-reverse;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;";
|
|
5881
5842
|
popsDOMUtils.appendBody($iframeContainer);
|
|
5882
5843
|
}
|
|
5883
5844
|
/**
|
|
@@ -5887,9 +5848,9 @@
|
|
|
5887
5848
|
/**
|
|
5888
5849
|
* 已创建的元素列表
|
|
5889
5850
|
*/
|
|
5890
|
-
|
|
5851
|
+
const elementList = [$anim];
|
|
5891
5852
|
if (config.mask.enable) {
|
|
5892
|
-
|
|
5853
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
5893
5854
|
type: popsType,
|
|
5894
5855
|
guid: guid,
|
|
5895
5856
|
config: config,
|
|
@@ -5899,7 +5860,7 @@
|
|
|
5899
5860
|
$mask = _handleMask_.maskElement;
|
|
5900
5861
|
elementList.push($mask);
|
|
5901
5862
|
}
|
|
5902
|
-
|
|
5863
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
5903
5864
|
eventDetails["iframeElement"] = $iframe;
|
|
5904
5865
|
popsDOMUtils.on($anim, popsDOMUtils.getAnimationEndNameList(), function () {
|
|
5905
5866
|
/* 动画加载完毕 */
|
|
@@ -6050,7 +6011,7 @@
|
|
|
6050
6011
|
$shadowContainer: $shadowContainer,
|
|
6051
6012
|
$shadowRoot: $shadowRoot,
|
|
6052
6013
|
});
|
|
6053
|
-
|
|
6014
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
6054
6015
|
return result;
|
|
6055
6016
|
},
|
|
6056
6017
|
};
|
|
@@ -6321,7 +6282,7 @@
|
|
|
6321
6282
|
text: "单选3",
|
|
6322
6283
|
isHTML: false,
|
|
6323
6284
|
disable(value, allSelectedInfo) {
|
|
6324
|
-
return
|
|
6285
|
+
return allSelectedInfo.findIndex((it) => ["select-2", "select-5"].includes(it.value)) !== -1;
|
|
6325
6286
|
},
|
|
6326
6287
|
},
|
|
6327
6288
|
{
|
|
@@ -6329,7 +6290,7 @@
|
|
|
6329
6290
|
text: "单选4",
|
|
6330
6291
|
isHTML: false,
|
|
6331
6292
|
disable(value, allSelectedInfo) {
|
|
6332
|
-
return
|
|
6293
|
+
return allSelectedInfo.findIndex((it) => ["select-3", "select-5"].includes(it.value)) !== -1;
|
|
6333
6294
|
},
|
|
6334
6295
|
},
|
|
6335
6296
|
{
|
|
@@ -6511,7 +6472,7 @@
|
|
|
6511
6472
|
// @ts-ignore
|
|
6512
6473
|
props: {},
|
|
6513
6474
|
forms: [],
|
|
6514
|
-
clickFirstCallback: function (
|
|
6475
|
+
clickFirstCallback: function () {
|
|
6515
6476
|
return false;
|
|
6516
6477
|
},
|
|
6517
6478
|
},
|
|
@@ -6528,7 +6489,7 @@
|
|
|
6528
6489
|
// @ts-ignore
|
|
6529
6490
|
props: {},
|
|
6530
6491
|
forms: [],
|
|
6531
|
-
clickFirstCallback: function (
|
|
6492
|
+
clickFirstCallback: function () {
|
|
6532
6493
|
return false;
|
|
6533
6494
|
},
|
|
6534
6495
|
},
|
|
@@ -6585,20 +6546,20 @@
|
|
|
6585
6546
|
* @param number2
|
|
6586
6547
|
*/
|
|
6587
6548
|
add(number1, number2) {
|
|
6588
|
-
let number1length, number2length
|
|
6549
|
+
let number1length, number2length;
|
|
6589
6550
|
try {
|
|
6590
6551
|
number1length = number1.toString().split(".")[1].length;
|
|
6591
6552
|
}
|
|
6592
|
-
catch
|
|
6553
|
+
catch {
|
|
6593
6554
|
number1length = 0;
|
|
6594
6555
|
}
|
|
6595
6556
|
try {
|
|
6596
6557
|
number2length = number2.toString().split(".")[1].length;
|
|
6597
6558
|
}
|
|
6598
|
-
catch
|
|
6559
|
+
catch {
|
|
6599
6560
|
number2length = 0;
|
|
6600
6561
|
}
|
|
6601
|
-
powValue = Math.pow(10, Math.max(number1length, number2length));
|
|
6562
|
+
const powValue = Math.pow(10, Math.max(number1length, number2length));
|
|
6602
6563
|
return Math.round(number1 * powValue + number2 * powValue) / powValue;
|
|
6603
6564
|
},
|
|
6604
6565
|
/**
|
|
@@ -6607,21 +6568,21 @@
|
|
|
6607
6568
|
* @param number2
|
|
6608
6569
|
*/
|
|
6609
6570
|
sub(number1, number2) {
|
|
6610
|
-
let number1length, number2length
|
|
6571
|
+
let number1length, number2length;
|
|
6611
6572
|
try {
|
|
6612
6573
|
number1length = number1.toString().split(".")[1].length;
|
|
6613
6574
|
}
|
|
6614
|
-
catch
|
|
6575
|
+
catch {
|
|
6615
6576
|
number1length = 0;
|
|
6616
6577
|
}
|
|
6617
6578
|
try {
|
|
6618
6579
|
number2length = number2.toString().split(".")[1].length;
|
|
6619
6580
|
}
|
|
6620
|
-
catch
|
|
6581
|
+
catch {
|
|
6621
6582
|
number2length = 0;
|
|
6622
6583
|
}
|
|
6623
|
-
powValue = Math.pow(10, Math.max(number1length, number2length));
|
|
6624
|
-
|
|
6584
|
+
const powValue = Math.pow(10, Math.max(number1length, number2length));
|
|
6585
|
+
const fixedValue = number1length >= number2length ? number1length : number2length;
|
|
6625
6586
|
return (Math.round(number1 * powValue - number2 * powValue) / powValue).toFixed(fixedValue);
|
|
6626
6587
|
},
|
|
6627
6588
|
/**
|
|
@@ -6630,21 +6591,21 @@
|
|
|
6630
6591
|
* @param number2
|
|
6631
6592
|
*/
|
|
6632
6593
|
division(number1, number2) {
|
|
6633
|
-
let number1length, number2length
|
|
6594
|
+
let number1length, number2length;
|
|
6634
6595
|
try {
|
|
6635
6596
|
number1length = number1.toString().split(".")[1].length;
|
|
6636
6597
|
}
|
|
6637
|
-
catch
|
|
6598
|
+
catch {
|
|
6638
6599
|
number1length = 0;
|
|
6639
6600
|
}
|
|
6640
6601
|
try {
|
|
6641
6602
|
number2length = number2.toString().split(".")[1].length;
|
|
6642
6603
|
}
|
|
6643
|
-
catch
|
|
6604
|
+
catch {
|
|
6644
6605
|
number2length = 0;
|
|
6645
6606
|
}
|
|
6646
|
-
number1ReplaceValue = Number(number1.toString().replace(".", ""));
|
|
6647
|
-
number2ReplaceValue = Number(number2.toString().replace(".", ""));
|
|
6607
|
+
const number1ReplaceValue = Number(number1.toString().replace(".", ""));
|
|
6608
|
+
const number2ReplaceValue = Number(number2.toString().replace(".", ""));
|
|
6648
6609
|
return (number1ReplaceValue / number2ReplaceValue) * Math.pow(10, number2length - number1length);
|
|
6649
6610
|
},
|
|
6650
6611
|
};
|
|
@@ -6709,7 +6670,7 @@
|
|
|
6709
6670
|
this.init();
|
|
6710
6671
|
}
|
|
6711
6672
|
init() {
|
|
6712
|
-
|
|
6673
|
+
const toolTipInfo = this.createToolTip();
|
|
6713
6674
|
this.$el.$toolTip = toolTipInfo.$toolTipContainer;
|
|
6714
6675
|
this.$el.$content = toolTipInfo.$toolTipContent;
|
|
6715
6676
|
this.$el.$arrow = toolTipInfo.$toolTipArrow;
|
|
@@ -6725,7 +6686,7 @@
|
|
|
6725
6686
|
* 创建提示元素
|
|
6726
6687
|
*/
|
|
6727
6688
|
createToolTip() {
|
|
6728
|
-
|
|
6689
|
+
const $toolTipContainer = popsDOMUtils.createElement("div", {
|
|
6729
6690
|
className: "pops-tip",
|
|
6730
6691
|
innerHTML: /*html*/ `
|
|
6731
6692
|
<div class="pops-tip-content" style="text-align: center;"></div>
|
|
@@ -6736,9 +6697,9 @@
|
|
|
6736
6697
|
"data-guid": this.$data.guid,
|
|
6737
6698
|
});
|
|
6738
6699
|
/** 内容 */
|
|
6739
|
-
|
|
6700
|
+
const $toolTipContent = $toolTipContainer.querySelector(".pops-tip-content");
|
|
6740
6701
|
/** 箭头 */
|
|
6741
|
-
|
|
6702
|
+
const $toolTipArrow = $toolTipContainer.querySelector(".pops-tip-arrow");
|
|
6742
6703
|
// 处理className
|
|
6743
6704
|
if (typeof this.$data.config.className === "string" && this.$data.config.className.trim() !== "") {
|
|
6744
6705
|
popsDOMUtils.addClassName($toolTipContainer, this.$data.config.className);
|
|
@@ -6747,7 +6708,7 @@
|
|
|
6747
6708
|
$toolTipContainer.style.zIndex = PopsHandler.handleZIndex(this.$data.config.zIndex).toString();
|
|
6748
6709
|
if (this.$data.config.style != null) {
|
|
6749
6710
|
/* 添加自定义style */
|
|
6750
|
-
|
|
6711
|
+
const cssNode = popsDOMUtils.createElement("style", {
|
|
6751
6712
|
type: "text/css",
|
|
6752
6713
|
innerHTML: this.$data.config.style,
|
|
6753
6714
|
});
|
|
@@ -6767,9 +6728,7 @@
|
|
|
6767
6728
|
* 获取提示的内容
|
|
6768
6729
|
*/
|
|
6769
6730
|
getContent() {
|
|
6770
|
-
return typeof this.$data.config.content === "function"
|
|
6771
|
-
? this.$data.config.content()
|
|
6772
|
-
: this.$data.config.content;
|
|
6731
|
+
return typeof this.$data.config.content === "function" ? this.$data.config.content() : this.$data.config.content;
|
|
6773
6732
|
}
|
|
6774
6733
|
/**
|
|
6775
6734
|
* 修改提示的内容
|
|
@@ -6780,17 +6739,15 @@
|
|
|
6780
6739
|
text = this.getContent();
|
|
6781
6740
|
}
|
|
6782
6741
|
if (this.$data.config.isDiffContent) {
|
|
6783
|
-
|
|
6784
|
-
|
|
6785
|
-
let originContentText = this.$el.$content[contentPropKey];
|
|
6742
|
+
const contentPropKey = "data-content";
|
|
6743
|
+
const originContentText = Reflect.get(this.$el.$content, contentPropKey);
|
|
6786
6744
|
if (typeof originContentText === "string") {
|
|
6787
6745
|
if (originContentText === text) {
|
|
6788
6746
|
// 内容未改变,不修改避免渲染
|
|
6789
6747
|
return;
|
|
6790
6748
|
}
|
|
6791
6749
|
}
|
|
6792
|
-
|
|
6793
|
-
this.$el.$content[contentPropKey] = text;
|
|
6750
|
+
Reflect.set(this.$el.$content, contentPropKey, text);
|
|
6794
6751
|
}
|
|
6795
6752
|
PopsSafeUtils.setSafeHTML(this.$el.$content, text);
|
|
6796
6753
|
}
|
|
@@ -6816,23 +6773,23 @@
|
|
|
6816
6773
|
* @param otherDistance 其它位置的偏移
|
|
6817
6774
|
*/
|
|
6818
6775
|
calcToolTipPosition(targetElement, arrowDistance, otherDistance, event) {
|
|
6819
|
-
|
|
6776
|
+
const offsetInfo = popsDOMUtils.offset(targetElement, !this.$data.config.isFixed);
|
|
6820
6777
|
// 目标 宽
|
|
6821
|
-
|
|
6778
|
+
const targetElement_width = offsetInfo.width;
|
|
6822
6779
|
// 目标 高
|
|
6823
|
-
|
|
6780
|
+
const targetElement_height = offsetInfo.height;
|
|
6824
6781
|
// 目标 顶部距离
|
|
6825
|
-
|
|
6782
|
+
const targetElement_top = offsetInfo.top;
|
|
6826
6783
|
// let targetElement_bottom = offsetInfo.bottom;
|
|
6827
6784
|
// 目标 左边距离
|
|
6828
|
-
|
|
6785
|
+
const targetElement_left = offsetInfo.left;
|
|
6829
6786
|
// let targetElement_right = offsetInfo.right;
|
|
6830
|
-
|
|
6831
|
-
|
|
6787
|
+
const toolTipElement_width = popsDOMUtils.outerWidth(this.$el.$toolTip);
|
|
6788
|
+
const toolTipElement_height = popsDOMUtils.outerHeight(this.$el.$toolTip);
|
|
6832
6789
|
/* 目标元素的x轴的中间位置 */
|
|
6833
|
-
|
|
6790
|
+
const targetElement_X_center_pos = targetElement_left + targetElement_width / 2 - toolTipElement_width / 2;
|
|
6834
6791
|
/* 目标元素的Y轴的中间位置 */
|
|
6835
|
-
|
|
6792
|
+
const targetElement_Y_center_pos = targetElement_top + targetElement_height / 2 - toolTipElement_height / 2;
|
|
6836
6793
|
let mouseX = 0;
|
|
6837
6794
|
let mouseY = 0;
|
|
6838
6795
|
if (event != null) {
|
|
@@ -6841,19 +6798,15 @@
|
|
|
6841
6798
|
mouseY = event.y;
|
|
6842
6799
|
}
|
|
6843
6800
|
else if (event instanceof TouchEvent) {
|
|
6844
|
-
|
|
6801
|
+
const touchEvent = event.touches[0];
|
|
6845
6802
|
mouseX = touchEvent.pageX;
|
|
6846
6803
|
mouseY = touchEvent.pageY;
|
|
6847
6804
|
}
|
|
6848
6805
|
else {
|
|
6849
|
-
// @ts-ignore
|
|
6850
6806
|
if (typeof event.clientX === "number") {
|
|
6851
|
-
// @ts-ignore
|
|
6852
6807
|
mouseX = event.clientX;
|
|
6853
6808
|
}
|
|
6854
|
-
// @ts-ignore
|
|
6855
6809
|
if (typeof event.clientY === "number") {
|
|
6856
|
-
// @ts-ignore
|
|
6857
6810
|
mouseY = event.clientY;
|
|
6858
6811
|
}
|
|
6859
6812
|
}
|
|
@@ -6895,9 +6848,9 @@
|
|
|
6895
6848
|
* 动态修改tooltip的位置
|
|
6896
6849
|
*/
|
|
6897
6850
|
changePosition(event) {
|
|
6898
|
-
|
|
6899
|
-
|
|
6900
|
-
|
|
6851
|
+
const positionInfo = this.calcToolTipPosition(this.$data.config.target, this.$data.config.arrowDistance, this.$data.config.otherDistance, event);
|
|
6852
|
+
const positionKey = this.$data.config.position.toUpperCase();
|
|
6853
|
+
const positionDetail = positionInfo[positionKey];
|
|
6901
6854
|
if (positionDetail) {
|
|
6902
6855
|
this.$el.$toolTip.style.left = positionDetail.left + "px";
|
|
6903
6856
|
this.$el.$toolTip.style.top = positionDetail.top + "px";
|
|
@@ -6947,7 +6900,7 @@
|
|
|
6947
6900
|
* @param type 事件类型
|
|
6948
6901
|
*/
|
|
6949
6902
|
clearCloseTimeoutId(type, timeId) {
|
|
6950
|
-
|
|
6903
|
+
const timeIdList = type === "MouseEvent" ? this.$data.timeId_close_MouseEvent : this.$data.timeId_close_TouchEvent;
|
|
6951
6904
|
for (let index = 0; index < timeIdList.length; index++) {
|
|
6952
6905
|
const currentTimeId = timeIdList[index];
|
|
6953
6906
|
if (typeof timeId === "number") {
|
|
@@ -6969,11 +6922,11 @@
|
|
|
6969
6922
|
* 显示提示框
|
|
6970
6923
|
*/
|
|
6971
6924
|
show(...args) {
|
|
6972
|
-
|
|
6973
|
-
|
|
6925
|
+
const event = args[0];
|
|
6926
|
+
const eventType = event instanceof MouseEvent ? "MouseEvent" : "TouchEvent";
|
|
6974
6927
|
this.clearCloseTimeoutId(eventType);
|
|
6975
6928
|
if (typeof this.$data.config.showBeforeCallBack === "function") {
|
|
6976
|
-
|
|
6929
|
+
const result = this.$data.config.showBeforeCallBack(this.$el.$toolTip);
|
|
6977
6930
|
if (typeof result === "boolean" && !result) {
|
|
6978
6931
|
return;
|
|
6979
6932
|
}
|
|
@@ -7016,19 +6969,19 @@
|
|
|
7016
6969
|
* 关闭提示框
|
|
7017
6970
|
*/
|
|
7018
6971
|
close(...args) {
|
|
7019
|
-
|
|
7020
|
-
|
|
6972
|
+
const event = args[0];
|
|
6973
|
+
const eventType = event instanceof MouseEvent ? "MouseEvent" : "TouchEvent";
|
|
7021
6974
|
// 只判断鼠标事件
|
|
7022
6975
|
// 其它的如Touch事件不做处理
|
|
7023
6976
|
if (event && event instanceof MouseEvent) {
|
|
7024
|
-
|
|
6977
|
+
const $target = event.composedPath()[0];
|
|
7025
6978
|
// 如果是目标元素的子元素/tooltip元素的子元素触发的话,那就不管
|
|
7026
6979
|
if ($target != this.$data.config.target && $target != this.$el.$toolTip) {
|
|
7027
6980
|
return;
|
|
7028
6981
|
}
|
|
7029
6982
|
}
|
|
7030
6983
|
if (typeof this.$data.config.closeBeforeCallBack === "function") {
|
|
7031
|
-
|
|
6984
|
+
const result = this.$data.config.closeBeforeCallBack(this.$el.$toolTip);
|
|
7032
6985
|
if (typeof result === "boolean" && !result) {
|
|
7033
6986
|
return;
|
|
7034
6987
|
}
|
|
@@ -7037,14 +6990,14 @@
|
|
|
7037
6990
|
(typeof this.$data.config.delayCloseTime === "number" && this.$data.config.delayCloseTime <= 0)) {
|
|
7038
6991
|
this.$data.config.delayCloseTime = 100;
|
|
7039
6992
|
}
|
|
7040
|
-
|
|
6993
|
+
const timeId = popsUtils.setTimeout(() => {
|
|
7041
6994
|
// 设置属性触发关闭动画
|
|
7042
6995
|
this.clearCloseTimeoutId(eventType, timeId);
|
|
7043
6996
|
if (this.$el.$toolTip == null) {
|
|
7044
6997
|
// 已清除了
|
|
7045
6998
|
return;
|
|
7046
6999
|
}
|
|
7047
|
-
|
|
7000
|
+
const motion = this.$el.$toolTip.getAttribute("data-motion");
|
|
7048
7001
|
if (motion == null || motion.trim() === "") {
|
|
7049
7002
|
// 没有动画
|
|
7050
7003
|
this.toolTipAnimationFinishEvent();
|
|
@@ -7188,7 +7141,7 @@
|
|
|
7188
7141
|
css: PopsCSS.tooltipCSS,
|
|
7189
7142
|
},
|
|
7190
7143
|
]);
|
|
7191
|
-
|
|
7144
|
+
const toolTip = new ToolTip(config, guid, {
|
|
7192
7145
|
$shadowContainer,
|
|
7193
7146
|
$shadowRoot,
|
|
7194
7147
|
});
|
|
@@ -7256,8 +7209,7 @@
|
|
|
7256
7209
|
this.$config = details.config;
|
|
7257
7210
|
this.asideULElement = this.$el.$contentAside.querySelector(`ul.pops-${PopsType}-aside-top-container`);
|
|
7258
7211
|
this.asideBottomULElement = this.$el.$contentAside.querySelector(`ul.pops-${PopsType}-aside-bottom-container`);
|
|
7259
|
-
this.sectionContainerHeaderULElement =
|
|
7260
|
-
this.$el.$contentSectionContainer.querySelector(`ul.pops-${PopsType}-container-header-ul`);
|
|
7212
|
+
this.sectionContainerHeaderULElement = this.$el.$contentSectionContainer.querySelector(`ul.pops-${PopsType}-container-header-ul`);
|
|
7261
7213
|
this.sectionContainerULElement = this.$el.$contentSectionContainer.querySelector(`ul.pops-${PopsType}-container-main-ul`);
|
|
7262
7214
|
/**
|
|
7263
7215
|
* 默认点击的左侧容器项
|
|
@@ -7267,12 +7219,10 @@
|
|
|
7267
7219
|
let isScrollToDefaultView = false;
|
|
7268
7220
|
// 初始化配置
|
|
7269
7221
|
details.config.content.forEach((asideItemConfig) => {
|
|
7270
|
-
|
|
7222
|
+
const $asideLiElement = this.createAsideItem(asideItemConfig);
|
|
7271
7223
|
this.setAsideItemClickEvent($asideLiElement, asideItemConfig);
|
|
7272
7224
|
// 是否处于底部
|
|
7273
|
-
|
|
7274
|
-
? asideItemConfig.isBottom()
|
|
7275
|
-
: asideItemConfig.isBottom;
|
|
7225
|
+
const isBottom = typeof asideItemConfig.isBottom === "function" ? asideItemConfig.isBottom() : asideItemConfig.isBottom;
|
|
7276
7226
|
if (isBottom) {
|
|
7277
7227
|
this.asideBottomULElement.appendChild($asideLiElement);
|
|
7278
7228
|
}
|
|
@@ -7378,7 +7328,7 @@
|
|
|
7378
7328
|
return;
|
|
7379
7329
|
}
|
|
7380
7330
|
Object.keys(props).forEach((propName) => {
|
|
7381
|
-
|
|
7331
|
+
const value = props[propName];
|
|
7382
7332
|
if (propName === "innerHTML") {
|
|
7383
7333
|
PopsSafeUtils.setSafeHTML(element, value);
|
|
7384
7334
|
return;
|
|
@@ -7399,7 +7349,7 @@
|
|
|
7399
7349
|
className = className();
|
|
7400
7350
|
}
|
|
7401
7351
|
if (typeof className === "string") {
|
|
7402
|
-
|
|
7352
|
+
const splitClassName = className.split(" ");
|
|
7403
7353
|
splitClassName.forEach((classNameStr) => {
|
|
7404
7354
|
element.classList.add(classNameStr);
|
|
7405
7355
|
});
|
|
@@ -7415,10 +7365,10 @@
|
|
|
7415
7365
|
* @param asideConfig
|
|
7416
7366
|
*/
|
|
7417
7367
|
createAsideItem(asideConfig) {
|
|
7418
|
-
|
|
7368
|
+
const $li = document.createElement("li");
|
|
7419
7369
|
$li.id = asideConfig.id;
|
|
7420
7370
|
Reflect.set($li, "__forms__", asideConfig.forms);
|
|
7421
|
-
|
|
7371
|
+
const title = typeof asideConfig.title === "function" ? asideConfig.title() : asideConfig.title;
|
|
7422
7372
|
PopsSafeUtils.setSafeHTML($li, title);
|
|
7423
7373
|
/* 处理className */
|
|
7424
7374
|
this.setElementClassName($li, "pops-panel-aside-item");
|
|
@@ -7428,7 +7378,7 @@
|
|
|
7428
7378
|
/** 禁用左侧项的hover的CSS样式的类名 */
|
|
7429
7379
|
const disableAsideItemHoverCSSClassName = "pops-panel-disabled-aside-hover-css";
|
|
7430
7380
|
/** 是否禁用左侧项的hover的CSS样式 */
|
|
7431
|
-
|
|
7381
|
+
const disableAsideItemHoverCSS = typeof asideConfig.disableAsideItemHoverCSS === "function"
|
|
7432
7382
|
? asideConfig.disableAsideItemHoverCSS()
|
|
7433
7383
|
: asideConfig.disableAsideItemHoverCSS;
|
|
7434
7384
|
if (disableAsideItemHoverCSS) {
|
|
@@ -7445,14 +7395,14 @@
|
|
|
7445
7395
|
* @param formConfig
|
|
7446
7396
|
*/
|
|
7447
7397
|
createSectionContainerItem_switch(formConfig) {
|
|
7448
|
-
|
|
7398
|
+
const $li = document.createElement("li");
|
|
7449
7399
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
7450
7400
|
this.setElementClassName($li, formConfig.className);
|
|
7451
7401
|
this.setElementAttributes($li, formConfig.attributes);
|
|
7452
7402
|
this.setElementProps($li, formConfig.props);
|
|
7453
7403
|
/* 左边底部的描述的文字 */
|
|
7454
7404
|
let leftDescriptionText = "";
|
|
7455
|
-
if (
|
|
7405
|
+
if (formConfig.description) {
|
|
7456
7406
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
7457
7407
|
}
|
|
7458
7408
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -7479,7 +7429,7 @@
|
|
|
7479
7429
|
},
|
|
7480
7430
|
init() {
|
|
7481
7431
|
this.setStatus(this.$data.value);
|
|
7482
|
-
|
|
7432
|
+
const disabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
7483
7433
|
if (disabled) {
|
|
7484
7434
|
this.disable();
|
|
7485
7435
|
}
|
|
@@ -7489,7 +7439,7 @@
|
|
|
7489
7439
|
* 设置点击事件
|
|
7490
7440
|
*/
|
|
7491
7441
|
setClickEvent() {
|
|
7492
|
-
|
|
7442
|
+
const that = this;
|
|
7493
7443
|
popsDOMUtils.on(this.$ele.core, "click", function (event) {
|
|
7494
7444
|
if (that.$ele.input.disabled || that.$ele.switch.hasAttribute("data-disabled")) {
|
|
7495
7445
|
return;
|
|
@@ -7551,14 +7501,14 @@
|
|
|
7551
7501
|
* @param formConfig
|
|
7552
7502
|
*/
|
|
7553
7503
|
createSectionContainerItem_slider(formConfig) {
|
|
7554
|
-
|
|
7504
|
+
const $li = document.createElement("li");
|
|
7555
7505
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
7556
7506
|
this.setElementClassName($li, formConfig.className);
|
|
7557
7507
|
this.setElementAttributes($li, formConfig.attributes);
|
|
7558
7508
|
this.setElementProps($li, formConfig.props);
|
|
7559
7509
|
/* 左边底部的描述的文字 */
|
|
7560
7510
|
let leftDescriptionText = "";
|
|
7561
|
-
if (
|
|
7511
|
+
if (formConfig.description) {
|
|
7562
7512
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
7563
7513
|
}
|
|
7564
7514
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -7569,7 +7519,7 @@
|
|
|
7569
7519
|
<input type="range" min="${formConfig.min}" max="${formConfig.max}">
|
|
7570
7520
|
</div>
|
|
7571
7521
|
`);
|
|
7572
|
-
|
|
7522
|
+
const $rangeInput = $li.querySelector(".pops-panel-slider input[type=range]");
|
|
7573
7523
|
if (formConfig.step) {
|
|
7574
7524
|
$rangeInput.setAttribute("step", formConfig.step.toString());
|
|
7575
7525
|
}
|
|
@@ -7578,7 +7528,7 @@
|
|
|
7578
7528
|
* 获取提示的内容
|
|
7579
7529
|
* @param value
|
|
7580
7530
|
*/
|
|
7581
|
-
|
|
7531
|
+
const getToolTipContent = function (value) {
|
|
7582
7532
|
if (typeof formConfig.getToolTipContent === "function") {
|
|
7583
7533
|
return formConfig.getToolTipContent(value);
|
|
7584
7534
|
}
|
|
@@ -7586,7 +7536,7 @@
|
|
|
7586
7536
|
return value;
|
|
7587
7537
|
}
|
|
7588
7538
|
};
|
|
7589
|
-
|
|
7539
|
+
const tooltip = PopsTooltip.init({
|
|
7590
7540
|
target: $rangeInput.parentElement,
|
|
7591
7541
|
content: () => {
|
|
7592
7542
|
return getToolTipContent($rangeInput.value);
|
|
@@ -7614,14 +7564,14 @@
|
|
|
7614
7564
|
* @param formConfig
|
|
7615
7565
|
*/
|
|
7616
7566
|
createSectionContainerItem_slider_new(formConfig) {
|
|
7617
|
-
|
|
7567
|
+
const $li = document.createElement("li");
|
|
7618
7568
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
7619
7569
|
this.setElementClassName($li, formConfig.className);
|
|
7620
7570
|
this.setElementAttributes($li, formConfig.attributes);
|
|
7621
7571
|
this.setElementProps($li, formConfig.props);
|
|
7622
7572
|
/* 左边底部的描述的文字 */
|
|
7623
7573
|
let leftDescriptionText = "";
|
|
7624
|
-
if (
|
|
7574
|
+
if (formConfig.description) {
|
|
7625
7575
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
7626
7576
|
}
|
|
7627
7577
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -7732,9 +7682,9 @@
|
|
|
7732
7682
|
}
|
|
7733
7683
|
this.$interval.isCheck = true;
|
|
7734
7684
|
let isSuccess = false;
|
|
7735
|
-
|
|
7685
|
+
const oldTotalWidth = this.$data.totalWidth;
|
|
7736
7686
|
let timer = void 0;
|
|
7737
|
-
|
|
7687
|
+
const interval = setInterval(() => {
|
|
7738
7688
|
if (isSuccess) {
|
|
7739
7689
|
this.$interval.isCheck = false;
|
|
7740
7690
|
clearTimeout(timer);
|
|
@@ -7787,12 +7737,12 @@
|
|
|
7787
7737
|
initStepMap() {
|
|
7788
7738
|
let index = 0;
|
|
7789
7739
|
// 计算出份数
|
|
7790
|
-
|
|
7740
|
+
const blockNums = (this.max - this.min) / this.step;
|
|
7791
7741
|
// 计算出每一份占据的px
|
|
7792
7742
|
this.$data.stepPx = this.$data.totalWidth / blockNums;
|
|
7793
7743
|
let widthPx = 0;
|
|
7794
7744
|
for (let stepValue = this.min; stepValue <= this.max; stepValue += this.step) {
|
|
7795
|
-
|
|
7745
|
+
const value = this.formatValue(stepValue);
|
|
7796
7746
|
let info;
|
|
7797
7747
|
if (value === this.min) {
|
|
7798
7748
|
/* 起始 */
|
|
@@ -7830,12 +7780,12 @@
|
|
|
7830
7780
|
initFloatStepMap() {
|
|
7831
7781
|
let index = 0;
|
|
7832
7782
|
// 计算出份数
|
|
7833
|
-
|
|
7783
|
+
const blockNums = (this.max - this.min) / this.step;
|
|
7834
7784
|
// 计算出每一份占据的px
|
|
7835
7785
|
this.$data.stepPx = this.$data.totalWidth / blockNums;
|
|
7836
7786
|
let widthPx = 0;
|
|
7837
7787
|
for (let stepValue = this.min; stepValue <= this.max; stepValue = PopsMathFloatUtils.add(stepValue, this.step)) {
|
|
7838
|
-
|
|
7788
|
+
const value = this.formatValue(stepValue);
|
|
7839
7789
|
let info;
|
|
7840
7790
|
if (value === this.min) {
|
|
7841
7791
|
/* 起始 */
|
|
@@ -7975,7 +7925,7 @@
|
|
|
7975
7925
|
* 判断当前滑块是否被禁用(配置中判断)
|
|
7976
7926
|
*/
|
|
7977
7927
|
isFormConfigDisabledDrag() {
|
|
7978
|
-
|
|
7928
|
+
const isDisabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
7979
7929
|
if (typeof isDisabled === "boolean") {
|
|
7980
7930
|
return isDisabled;
|
|
7981
7931
|
}
|
|
@@ -7991,8 +7941,8 @@
|
|
|
7991
7941
|
if (event.target !== this.$ele.runAway && event.target !== this.$ele.bar) {
|
|
7992
7942
|
return;
|
|
7993
7943
|
}
|
|
7994
|
-
|
|
7995
|
-
|
|
7944
|
+
const clickX = parseFloat(event.offsetX.toString());
|
|
7945
|
+
const dragStartResult = this.dragStartCallBack();
|
|
7996
7946
|
if (!dragStartResult) {
|
|
7997
7947
|
return;
|
|
7998
7948
|
}
|
|
@@ -8084,7 +8034,7 @@
|
|
|
8084
8034
|
if (!this.dragStartCallBack()) {
|
|
8085
8035
|
return;
|
|
8086
8036
|
}
|
|
8087
|
-
|
|
8037
|
+
const oldValue = this.value;
|
|
8088
8038
|
const runAwayRect = this.$ele.runAway.getBoundingClientRect();
|
|
8089
8039
|
let displacementX = event.x - (runAwayRect.left + globalThis.screenX);
|
|
8090
8040
|
if (displacementX <= 0) {
|
|
@@ -8098,7 +8048,7 @@
|
|
|
8098
8048
|
this.dragMoveCallBack(event, currentDragX, oldValue);
|
|
8099
8049
|
});
|
|
8100
8050
|
/* 监听触点离开,处理某些情况下,拖拽松开,但是未触发pan事件,可以通过设置这个来关闭tooltip */
|
|
8101
|
-
this.$tooltip.on("at:end", (
|
|
8051
|
+
this.$tooltip.on("at:end", () => {
|
|
8102
8052
|
this.dragEndCallBack(currentDragX);
|
|
8103
8053
|
});
|
|
8104
8054
|
},
|
|
@@ -8122,7 +8072,7 @@
|
|
|
8122
8072
|
return;
|
|
8123
8073
|
}
|
|
8124
8074
|
this.$data.isCheckingStopDragMove = true;
|
|
8125
|
-
|
|
8075
|
+
const interval = setInterval(() => {
|
|
8126
8076
|
if (!this.$data.isMove) {
|
|
8127
8077
|
this.$data.isCheckingStopDragMove = false;
|
|
8128
8078
|
this.closeToolTip();
|
|
@@ -8149,7 +8099,7 @@
|
|
|
8149
8099
|
return PopsPanelSlider.value.toString();
|
|
8150
8100
|
}
|
|
8151
8101
|
}
|
|
8152
|
-
|
|
8102
|
+
const tooltip = PopsTooltip.init({
|
|
8153
8103
|
target: this.$ele.button,
|
|
8154
8104
|
content: getToolTipContent,
|
|
8155
8105
|
zIndex: () => {
|
|
@@ -8163,7 +8113,7 @@
|
|
|
8163
8113
|
passive: true,
|
|
8164
8114
|
},
|
|
8165
8115
|
showBeforeCallBack: () => {
|
|
8166
|
-
|
|
8116
|
+
const isShowHoverTip = typeof formConfig.isShowHoverTip === "function"
|
|
8167
8117
|
? formConfig.isShowHoverTip()
|
|
8168
8118
|
: typeof formConfig.isShowHoverTip === "boolean"
|
|
8169
8119
|
? formConfig.isShowHoverTip
|
|
@@ -8173,7 +8123,7 @@
|
|
|
8173
8123
|
}
|
|
8174
8124
|
this.intervalInit();
|
|
8175
8125
|
},
|
|
8176
|
-
showAfterCallBack: (
|
|
8126
|
+
showAfterCallBack: () => {
|
|
8177
8127
|
tooltip.toolTip.changeContent(getToolTipContent());
|
|
8178
8128
|
},
|
|
8179
8129
|
closeBeforeCallBack: () => {
|
|
@@ -8199,7 +8149,7 @@
|
|
|
8199
8149
|
* @param formConfig
|
|
8200
8150
|
*/
|
|
8201
8151
|
createSectionContainerItem_input(formConfig) {
|
|
8202
|
-
|
|
8152
|
+
const $li = document.createElement("li");
|
|
8203
8153
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
8204
8154
|
this.setElementClassName($li, formConfig.className);
|
|
8205
8155
|
this.setElementAttributes($li, formConfig.attributes);
|
|
@@ -8213,7 +8163,7 @@
|
|
|
8213
8163
|
}
|
|
8214
8164
|
/* 左边底部的描述的文字 */
|
|
8215
8165
|
let leftDescriptionText = "";
|
|
8216
|
-
if (
|
|
8166
|
+
if (formConfig.description) {
|
|
8217
8167
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8218
8168
|
}
|
|
8219
8169
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -8255,7 +8205,7 @@
|
|
|
8255
8205
|
}
|
|
8256
8206
|
this.setInputChangeEvent();
|
|
8257
8207
|
// 是否禁用复选框
|
|
8258
|
-
|
|
8208
|
+
const disabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
8259
8209
|
if (disabled) {
|
|
8260
8210
|
this.disable();
|
|
8261
8211
|
}
|
|
@@ -8404,14 +8354,14 @@
|
|
|
8404
8354
|
* @param formConfig
|
|
8405
8355
|
*/
|
|
8406
8356
|
createSectionContainerItem_textarea(formConfig) {
|
|
8407
|
-
|
|
8357
|
+
const $li = document.createElement("li");
|
|
8408
8358
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
8409
8359
|
this.setElementClassName($li, formConfig.className);
|
|
8410
8360
|
this.setElementAttributes($li, formConfig.attributes);
|
|
8411
8361
|
this.setElementProps($li, formConfig.props);
|
|
8412
8362
|
/* 左边底部的描述的文字 */
|
|
8413
8363
|
let leftDescriptionText = "";
|
|
8414
|
-
if (
|
|
8364
|
+
if (formConfig.description) {
|
|
8415
8365
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8416
8366
|
}
|
|
8417
8367
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -8435,7 +8385,7 @@
|
|
|
8435
8385
|
init() {
|
|
8436
8386
|
this.setValue(this.$data.value);
|
|
8437
8387
|
this.setChangeEvent();
|
|
8438
|
-
|
|
8388
|
+
const disabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
8439
8389
|
if (disabled) {
|
|
8440
8390
|
this.disable();
|
|
8441
8391
|
}
|
|
@@ -8462,7 +8412,7 @@
|
|
|
8462
8412
|
*/
|
|
8463
8413
|
setChangeEvent() {
|
|
8464
8414
|
popsDOMUtils.on(this.$ele.textarea, ["input", "propertychange"], (event) => {
|
|
8465
|
-
|
|
8415
|
+
const value = this.$ele.textarea.value;
|
|
8466
8416
|
this.$data.value = value;
|
|
8467
8417
|
if (typeof formConfig.callback === "function") {
|
|
8468
8418
|
formConfig.callback(event, value);
|
|
@@ -8481,14 +8431,14 @@
|
|
|
8481
8431
|
*/
|
|
8482
8432
|
createSectionContainerItem_select(formConfig) {
|
|
8483
8433
|
const that = this;
|
|
8484
|
-
|
|
8434
|
+
const $li = document.createElement("li");
|
|
8485
8435
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
8486
8436
|
this.setElementClassName($li, formConfig.className);
|
|
8487
8437
|
this.setElementAttributes($li, formConfig.attributes);
|
|
8488
8438
|
this.setElementProps($li, formConfig.props);
|
|
8489
8439
|
/* 左边底部的描述的文字 */
|
|
8490
8440
|
let leftDescriptionText = "";
|
|
8491
|
-
if (
|
|
8441
|
+
if (formConfig.description) {
|
|
8492
8442
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8493
8443
|
}
|
|
8494
8444
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -8519,7 +8469,7 @@
|
|
|
8519
8469
|
this.initOption();
|
|
8520
8470
|
this.setChangeEvent();
|
|
8521
8471
|
this.setClickEvent();
|
|
8522
|
-
|
|
8472
|
+
const disabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
8523
8473
|
if (disabled) {
|
|
8524
8474
|
this.disable();
|
|
8525
8475
|
}
|
|
@@ -8571,7 +8521,7 @@
|
|
|
8571
8521
|
initOption() {
|
|
8572
8522
|
formConfig.data.forEach((dataItem) => {
|
|
8573
8523
|
// 初始化默认选中
|
|
8574
|
-
|
|
8524
|
+
const optionElement = document.createElement("option");
|
|
8575
8525
|
this.setNodeValue(optionElement, this.$eleKey.value, dataItem.value);
|
|
8576
8526
|
this.setNodeValue(optionElement, this.$eleKey.disable, dataItem.disable);
|
|
8577
8527
|
this.setNodeValue(optionElement, this.$eleKey.forms, dataItem.forms);
|
|
@@ -8599,9 +8549,9 @@
|
|
|
8599
8549
|
/** 设置禁用状态 */
|
|
8600
8550
|
setOptionDisableStatus(optionElement) {
|
|
8601
8551
|
let disable = false;
|
|
8602
|
-
|
|
8552
|
+
const optionDisableAttr = this.getNodeValue(optionElement, this.$eleKey.disable);
|
|
8603
8553
|
if (optionDisableAttr === "function") {
|
|
8604
|
-
|
|
8554
|
+
const value = this.getNodeValue(optionElement, this.$eleKey.value);
|
|
8605
8555
|
disable = Boolean(optionDisableAttr(value));
|
|
8606
8556
|
}
|
|
8607
8557
|
if (disable) {
|
|
@@ -8613,9 +8563,9 @@
|
|
|
8613
8563
|
},
|
|
8614
8564
|
/** 获取option上的信息 */
|
|
8615
8565
|
getSelectOptionInfo($option) {
|
|
8616
|
-
|
|
8617
|
-
|
|
8618
|
-
|
|
8566
|
+
const optionValue = this.getNodeValue($option, this.$eleKey.value);
|
|
8567
|
+
const optionText = $option.innerText || $option.textContent;
|
|
8568
|
+
const optionForms = this.getNodeValue($option, this.$eleKey.forms);
|
|
8619
8569
|
return {
|
|
8620
8570
|
value: optionValue,
|
|
8621
8571
|
text: optionText,
|
|
@@ -8628,16 +8578,16 @@
|
|
|
8628
8578
|
*/
|
|
8629
8579
|
setChangeEvent() {
|
|
8630
8580
|
popsDOMUtils.on(this.$ele.select, "change", void 0, (event) => {
|
|
8631
|
-
|
|
8632
|
-
|
|
8581
|
+
const $isSelectedElement = this.$ele.select[this.$ele.select.selectedIndex];
|
|
8582
|
+
const selectInfo = this.getSelectOptionInfo($isSelectedElement);
|
|
8633
8583
|
this.setSelectOptionsDisableStatus();
|
|
8634
8584
|
if (typeof formConfig.callback === "function") {
|
|
8635
8585
|
formConfig.callback(event, selectInfo.value, selectInfo.text);
|
|
8636
8586
|
}
|
|
8637
|
-
|
|
8587
|
+
const forms = typeof selectInfo.forms === "function" ? selectInfo.forms() : selectInfo.forms;
|
|
8638
8588
|
if (Array.isArray(forms)) {
|
|
8639
8589
|
/* 如果成功创建,加入到中间容器中 */
|
|
8640
|
-
|
|
8590
|
+
const childUListClassName = "pops-panel-select-child-forms";
|
|
8641
8591
|
// 移除旧的元素
|
|
8642
8592
|
while ($li.nextElementSibling) {
|
|
8643
8593
|
if ($li.nextElementSibling.classList.contains(childUListClassName)) {
|
|
@@ -8647,7 +8597,7 @@
|
|
|
8647
8597
|
break;
|
|
8648
8598
|
}
|
|
8649
8599
|
}
|
|
8650
|
-
|
|
8600
|
+
const $childUList = document.createElement("ul");
|
|
8651
8601
|
$childUList.className = childUListClassName;
|
|
8652
8602
|
popsDOMUtils.after($li, $childUList);
|
|
8653
8603
|
that.uListContainerAddItem(formConfig, {
|
|
@@ -8678,14 +8628,14 @@
|
|
|
8678
8628
|
* @param formConfig
|
|
8679
8629
|
*/
|
|
8680
8630
|
createSectionContainerItem_select_multiple_new(formConfig) {
|
|
8681
|
-
|
|
8631
|
+
const $li = document.createElement("li");
|
|
8682
8632
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
8683
8633
|
this.setElementClassName($li, formConfig.className);
|
|
8684
8634
|
this.setElementAttributes($li, formConfig.attributes);
|
|
8685
8635
|
this.setElementProps($li, formConfig.props);
|
|
8686
8636
|
/* 左边底部的描述的文字 */
|
|
8687
8637
|
let leftDescriptionText = "";
|
|
8688
|
-
if (
|
|
8638
|
+
if (formConfig.description) {
|
|
8689
8639
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8690
8640
|
}
|
|
8691
8641
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -8748,7 +8698,7 @@
|
|
|
8748
8698
|
this.initPlaceHolder();
|
|
8749
8699
|
this.initTagElement();
|
|
8750
8700
|
this.setSelectContainerClickEvent();
|
|
8751
|
-
|
|
8701
|
+
const disabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
8752
8702
|
if (disabled) {
|
|
8753
8703
|
this.disable();
|
|
8754
8704
|
}
|
|
@@ -8786,12 +8736,12 @@
|
|
|
8786
8736
|
placeholder = formConfig.placeholder;
|
|
8787
8737
|
}
|
|
8788
8738
|
else if (typeof formConfig.placeholder === "function") {
|
|
8789
|
-
|
|
8739
|
+
const placeholderResult = formConfig.placeholder();
|
|
8790
8740
|
if (typeof placeholderResult === "string") {
|
|
8791
8741
|
placeholder = placeholderResult;
|
|
8792
8742
|
}
|
|
8793
8743
|
}
|
|
8794
|
-
|
|
8744
|
+
const $placeholder = popsDOMUtils.createElement("span", {
|
|
8795
8745
|
innerText: placeholder,
|
|
8796
8746
|
});
|
|
8797
8747
|
this.$el.$selectedPlaceHolderWrapper.appendChild($placeholder);
|
|
@@ -8800,10 +8750,10 @@
|
|
|
8800
8750
|
initTagElement() {
|
|
8801
8751
|
// 遍历数据,寻找对应的值
|
|
8802
8752
|
formConfig.data.forEach((dataItem) => {
|
|
8803
|
-
|
|
8753
|
+
const findValue = this.$data.selectInfo.find((item) => item.value === dataItem.value);
|
|
8804
8754
|
if (findValue) {
|
|
8805
8755
|
// 存在对应的值
|
|
8806
|
-
|
|
8756
|
+
const selectedInfo = this.createSelectedTagItem(dataItem);
|
|
8807
8757
|
this.addSelectedTagItem(selectedInfo.$tag);
|
|
8808
8758
|
this.setSelectedItemCloseIconClickEvent({
|
|
8809
8759
|
$tag: selectedInfo.$tag,
|
|
@@ -8840,7 +8790,7 @@
|
|
|
8840
8790
|
const $tagText = $selectedItem.querySelector(".el-select__tags-text");
|
|
8841
8791
|
/** 关闭图标 */
|
|
8842
8792
|
const $closeIcon = $selectedItem.querySelector(".el-icon.el-tag__close");
|
|
8843
|
-
|
|
8793
|
+
const text = typeof data.text === "function" ? data.text(data, this.$data.selectInfo) : data.text;
|
|
8844
8794
|
if (data.isHTML) {
|
|
8845
8795
|
PopsSafeUtils.setSafeHTML($tagText, text);
|
|
8846
8796
|
}
|
|
@@ -8862,7 +8812,7 @@
|
|
|
8862
8812
|
// 去除前面的空白
|
|
8863
8813
|
this.setSectionIsNear();
|
|
8864
8814
|
if (this.$el.$section.contains(this.$el.$selectedInputWrapper)) {
|
|
8865
|
-
|
|
8815
|
+
const $prev = this.$el.$selectedInputWrapper.previousElementSibling;
|
|
8866
8816
|
if ($prev) {
|
|
8867
8817
|
// 存在前一个元素,添加到前面的元素的后面
|
|
8868
8818
|
popsDOMUtils.after($prev, $tag);
|
|
@@ -8873,7 +8823,7 @@
|
|
|
8873
8823
|
}
|
|
8874
8824
|
}
|
|
8875
8825
|
else if (this.$el.$section.contains(this.$el.$selectedPlaceHolderWrapper)) {
|
|
8876
|
-
|
|
8826
|
+
const $prev = this.$el.$selectedPlaceHolderWrapper.previousElementSibling;
|
|
8877
8827
|
if ($prev) {
|
|
8878
8828
|
// 存在前一个元素,添加到前面的元素的后面
|
|
8879
8829
|
popsDOMUtils.after($prev, $tag);
|
|
@@ -8933,7 +8883,7 @@
|
|
|
8933
8883
|
this.removeSelectItemDisabled($select);
|
|
8934
8884
|
}
|
|
8935
8885
|
// 更新选中状态
|
|
8936
|
-
|
|
8886
|
+
const findValue = this.$data.selectInfo.find((it) => it.value === data.value);
|
|
8937
8887
|
if (findValue) {
|
|
8938
8888
|
this.setSelectItemSelected($select);
|
|
8939
8889
|
}
|
|
@@ -8971,8 +8921,8 @@
|
|
|
8971
8921
|
* @param $select 选项元素
|
|
8972
8922
|
*/
|
|
8973
8923
|
addSelectedItemInfo(dataList, $select) {
|
|
8974
|
-
|
|
8975
|
-
|
|
8924
|
+
const info = this.getSelectedItemInfo($select);
|
|
8925
|
+
const findValue = dataList.find((item) => item.value === info.value);
|
|
8976
8926
|
if (!findValue) {
|
|
8977
8927
|
dataList.push({
|
|
8978
8928
|
value: info.value,
|
|
@@ -8996,8 +8946,8 @@
|
|
|
8996
8946
|
* @param $select 选项元素
|
|
8997
8947
|
*/
|
|
8998
8948
|
removeSelectedItemInfo(dataList, $select) {
|
|
8999
|
-
|
|
9000
|
-
|
|
8949
|
+
const info = this.getSelectedItemInfo($select);
|
|
8950
|
+
const findIndex = dataList.findIndex((item) => item.value === info.value);
|
|
9001
8951
|
if (findIndex !== -1) {
|
|
9002
8952
|
dataList.splice(findIndex, 1);
|
|
9003
8953
|
}
|
|
@@ -9012,8 +8962,8 @@
|
|
|
9012
8962
|
getAllSelectItemInfo(onlySelected = true) {
|
|
9013
8963
|
return Array.from(this.$el.$selectContainer?.querySelectorAll(".select-item") ?? [])
|
|
9014
8964
|
.map(($select) => {
|
|
9015
|
-
|
|
9016
|
-
|
|
8965
|
+
const data = this.getSelectedItemInfo($select);
|
|
8966
|
+
const result = {
|
|
9017
8967
|
/** 选项信息数据 */
|
|
9018
8968
|
data: data,
|
|
9019
8969
|
/** 选项元素 */
|
|
@@ -9021,7 +8971,7 @@
|
|
|
9021
8971
|
};
|
|
9022
8972
|
if (onlySelected) {
|
|
9023
8973
|
// 仅选中
|
|
9024
|
-
|
|
8974
|
+
const isSelected = this.isSelectItemSelected($select);
|
|
9025
8975
|
if (isSelected) {
|
|
9026
8976
|
return result;
|
|
9027
8977
|
}
|
|
@@ -9040,7 +8990,7 @@
|
|
|
9040
8990
|
* @param data 选择项的数据
|
|
9041
8991
|
*/
|
|
9042
8992
|
createSelectItemElement(data) {
|
|
9043
|
-
|
|
8993
|
+
const $select = popsDOMUtils.createElement("li", {
|
|
9044
8994
|
className: "select-item",
|
|
9045
8995
|
innerHTML: /*html*/ `
|
|
9046
8996
|
<span class="select-item-text"></span>
|
|
@@ -9056,8 +9006,8 @@
|
|
|
9056
9006
|
* @param $select 选择项元素
|
|
9057
9007
|
*/
|
|
9058
9008
|
setSelectItemText(data, $select) {
|
|
9059
|
-
|
|
9060
|
-
|
|
9009
|
+
const text = typeof data.text === "function" ? data.text(data.value, this.$data.selectInfo) : data.text;
|
|
9010
|
+
const $selectSpan = $select.querySelector(".select-item-text");
|
|
9061
9011
|
if (data.isHTML) {
|
|
9062
9012
|
PopsSafeUtils.setSafeHTML($selectSpan, text);
|
|
9063
9013
|
}
|
|
@@ -9100,8 +9050,8 @@
|
|
|
9100
9050
|
return;
|
|
9101
9051
|
}
|
|
9102
9052
|
if (typeof formConfig.clickCallBack === "function") {
|
|
9103
|
-
|
|
9104
|
-
|
|
9053
|
+
const allSelectedInfo = this.getAllSelectItemInfo().map((it) => it.data);
|
|
9054
|
+
const clickResult = formConfig.clickCallBack(event, allSelectedInfo);
|
|
9105
9055
|
if (typeof clickResult === "boolean" && !clickResult) {
|
|
9106
9056
|
return;
|
|
9107
9057
|
}
|
|
@@ -9122,14 +9072,14 @@
|
|
|
9122
9072
|
*/
|
|
9123
9073
|
setSelectContainerClickEvent() {
|
|
9124
9074
|
const that = this;
|
|
9125
|
-
popsDOMUtils.on(this.$el.$container, "click", (
|
|
9075
|
+
popsDOMUtils.on(this.$el.$container, "click", () => {
|
|
9126
9076
|
if (this.isDisabled()) {
|
|
9127
9077
|
return;
|
|
9128
9078
|
}
|
|
9129
9079
|
/** 弹窗的选中的值 */
|
|
9130
|
-
|
|
9131
|
-
|
|
9132
|
-
|
|
9080
|
+
const selectedInfo = that.$data.selectInfo;
|
|
9081
|
+
const { style, ...userConfirmDetails } = formConfig.selectConfirmDialogDetails || {};
|
|
9082
|
+
const confirmDetails = popsUtils.assign({
|
|
9133
9083
|
title: {
|
|
9134
9084
|
text: "请勾选需要选择的选项",
|
|
9135
9085
|
position: "center",
|
|
@@ -9146,7 +9096,7 @@
|
|
|
9146
9096
|
},
|
|
9147
9097
|
close: {
|
|
9148
9098
|
enable: true,
|
|
9149
|
-
callback(details
|
|
9099
|
+
callback(details) {
|
|
9150
9100
|
that.$data.selectInfo = [...selectedInfo];
|
|
9151
9101
|
that.updateSelectTagItem();
|
|
9152
9102
|
that.$el.$selectContainer = null;
|
|
@@ -9156,7 +9106,7 @@
|
|
|
9156
9106
|
},
|
|
9157
9107
|
mask: {
|
|
9158
9108
|
enable: true,
|
|
9159
|
-
clickCallBack(originalRun
|
|
9109
|
+
clickCallBack(originalRun) {
|
|
9160
9110
|
originalRun();
|
|
9161
9111
|
that.$data.selectInfo = [...selectedInfo];
|
|
9162
9112
|
that.updateSelectTagItem();
|
|
@@ -9235,12 +9185,12 @@
|
|
|
9235
9185
|
${style || ""}
|
|
9236
9186
|
`,
|
|
9237
9187
|
}, userConfirmDetails);
|
|
9238
|
-
|
|
9239
|
-
|
|
9188
|
+
const $dialog = PopsAlert.init(confirmDetails);
|
|
9189
|
+
const $selectContainer = $dialog.$shadowRoot.querySelector(".select-container");
|
|
9240
9190
|
this.$el.$selectContainer = $selectContainer;
|
|
9241
9191
|
// 配置选项元素
|
|
9242
9192
|
formConfig.data.forEach((item) => {
|
|
9243
|
-
|
|
9193
|
+
const $select = this.createSelectItemElement(item);
|
|
9244
9194
|
// 添加到confirm中
|
|
9245
9195
|
$selectContainer.appendChild($select);
|
|
9246
9196
|
// 设置每一项的点击事件
|
|
@@ -9261,7 +9211,7 @@
|
|
|
9261
9211
|
return;
|
|
9262
9212
|
}
|
|
9263
9213
|
if (typeof formConfig.closeIconClickCallBack === "function") {
|
|
9264
|
-
|
|
9214
|
+
const result = formConfig.closeIconClickCallBack(event, {
|
|
9265
9215
|
$tag: data.$tag,
|
|
9266
9216
|
$closeIcon: data.$closeIcon,
|
|
9267
9217
|
value: data.value,
|
|
@@ -9370,14 +9320,14 @@
|
|
|
9370
9320
|
* @param formConfig
|
|
9371
9321
|
*/
|
|
9372
9322
|
createSectionContainerItem_button(formConfig) {
|
|
9373
|
-
|
|
9323
|
+
const $li = document.createElement("li");
|
|
9374
9324
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
9375
9325
|
this.setElementClassName($li, formConfig.className);
|
|
9376
9326
|
this.setElementAttributes($li, formConfig.attributes);
|
|
9377
9327
|
this.setElementProps($li, formConfig.props);
|
|
9378
9328
|
/* 左边底部的描述的文字 */
|
|
9379
9329
|
let leftDescriptionText = "";
|
|
9380
|
-
if (
|
|
9330
|
+
if (formConfig.description) {
|
|
9381
9331
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
9382
9332
|
}
|
|
9383
9333
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -9518,8 +9468,8 @@
|
|
|
9518
9468
|
* @param formConfig
|
|
9519
9469
|
*/
|
|
9520
9470
|
createSectionContainerItem_deepMenu(formConfig) {
|
|
9521
|
-
|
|
9522
|
-
|
|
9471
|
+
const that = this;
|
|
9472
|
+
const $li = document.createElement("li");
|
|
9523
9473
|
popsDOMUtils.addClassName($li, "pops-panel-deepMenu-nav-item");
|
|
9524
9474
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
9525
9475
|
this.setElementClassName($li, formConfig.className);
|
|
@@ -9529,12 +9479,12 @@
|
|
|
9529
9479
|
this.setElementProps($li, formConfig.props);
|
|
9530
9480
|
/* 左边底部的描述的文字 */
|
|
9531
9481
|
let leftDescriptionText = "";
|
|
9532
|
-
if (
|
|
9482
|
+
if (formConfig.description) {
|
|
9533
9483
|
// 设置描述
|
|
9534
9484
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
9535
9485
|
}
|
|
9536
9486
|
// 箭头图标
|
|
9537
|
-
|
|
9487
|
+
const arrowRightIcon = typeof formConfig.arrowRightIcon === "boolean" ? formConfig.arrowRightIcon : true;
|
|
9538
9488
|
let arrowRightIconHTML = "";
|
|
9539
9489
|
if (arrowRightIcon) {
|
|
9540
9490
|
arrowRightIconHTML = `<i class="pops-panel-deepMenu-arrowRight-icon">${PopsIcon.getIcon("arrowRight")}</i>`;
|
|
@@ -9565,17 +9515,17 @@
|
|
|
9565
9515
|
* @param formItemConfig
|
|
9566
9516
|
*/
|
|
9567
9517
|
initFormItem($container, formItemConfig) {
|
|
9568
|
-
|
|
9518
|
+
const formConfig_forms = formItemConfig;
|
|
9569
9519
|
if (formConfig_forms.type === "forms") {
|
|
9570
|
-
|
|
9520
|
+
const childForms = formConfig_forms["forms"];
|
|
9571
9521
|
/* 每一项<li>元素 */
|
|
9572
|
-
|
|
9522
|
+
const formContainerListElement = document.createElement("li");
|
|
9573
9523
|
/* 每一项<li>内的子<ul>元素 */
|
|
9574
|
-
|
|
9524
|
+
const formContainerULElement = document.createElement("ul");
|
|
9575
9525
|
formContainerULElement.classList.add("pops-panel-forms-container-item-formlist");
|
|
9576
9526
|
formContainerListElement.classList.add("pops-panel-forms-container-item");
|
|
9577
9527
|
/* 区域头部的文字 */
|
|
9578
|
-
|
|
9528
|
+
const formHeaderDivElement = popsDOMUtils.createElement("div", {
|
|
9579
9529
|
className: "pops-panel-forms-container-item-header-text",
|
|
9580
9530
|
});
|
|
9581
9531
|
PopsSafeUtils.setSafeHTML(formHeaderDivElement, formConfig_forms["text"]);
|
|
@@ -9592,7 +9542,7 @@
|
|
|
9592
9542
|
</i>
|
|
9593
9543
|
`);
|
|
9594
9544
|
// 添加点击事件
|
|
9595
|
-
popsDOMUtils.on(formHeaderDivElement, "click", (
|
|
9545
|
+
popsDOMUtils.on(formHeaderDivElement, "click", () => {
|
|
9596
9546
|
if (formContainerListElement.hasAttribute("data-fold-enable")) {
|
|
9597
9547
|
formContainerListElement.removeAttribute("data-fold-enable");
|
|
9598
9548
|
}
|
|
@@ -9647,26 +9597,26 @@
|
|
|
9647
9597
|
*/
|
|
9648
9598
|
async gotoDeepMenu(event, liElement) {
|
|
9649
9599
|
/** 当前所在的容器 */
|
|
9650
|
-
|
|
9600
|
+
const $currentSection = liElement.closest("section.pops-panel-container");
|
|
9651
9601
|
// 子菜单的容器
|
|
9652
|
-
|
|
9602
|
+
const $deepMenuSection = popsDOMUtils.createElement("section", {
|
|
9653
9603
|
className: "pops-panel-container pops-panel-deepMenu-container",
|
|
9654
9604
|
});
|
|
9655
9605
|
Reflect.set($deepMenuSection, "__formConfig__", formConfig);
|
|
9656
|
-
|
|
9606
|
+
const $deepMenuHeaderUL = popsDOMUtils.createElement("ul", {
|
|
9657
9607
|
className: "pops-panel-container-header-ul pops-panel-deepMenu-container-header-ul",
|
|
9658
9608
|
});
|
|
9659
|
-
|
|
9609
|
+
const $deepMenuMain = popsDOMUtils.createElement("ul", {
|
|
9660
9610
|
className: "pops-panel-container-main-ul",
|
|
9661
9611
|
});
|
|
9662
9612
|
// 标题文字
|
|
9663
|
-
|
|
9664
|
-
|
|
9613
|
+
const headerTitleText = formConfig.headerTitle ?? formConfig.text;
|
|
9614
|
+
const $header = popsDOMUtils.createElement("li", {
|
|
9665
9615
|
className: "pops-panel-container-header-title-text pops-panel-deepMenu-container-header",
|
|
9666
9616
|
innerHTML: /*html*/ `<p class="pops-panel-deepMenu-container-header-title-text">${headerTitleText}</p>`,
|
|
9667
9617
|
});
|
|
9668
9618
|
// 返回箭头
|
|
9669
|
-
|
|
9619
|
+
const $headerLeftArrow = popsDOMUtils.createElement("i", {
|
|
9670
9620
|
className: "pops-panel-deepMenu-container-left-arrow-icon",
|
|
9671
9621
|
innerHTML: PopsIcon.getIcon("arrowLeft"),
|
|
9672
9622
|
});
|
|
@@ -9731,7 +9681,7 @@
|
|
|
9731
9681
|
$deepMenuSection.appendChild($deepMenuMain);
|
|
9732
9682
|
if (formConfig.forms && Array.isArray(formConfig.forms)) {
|
|
9733
9683
|
for (let index = 0; index < formConfig.forms.length; index++) {
|
|
9734
|
-
|
|
9684
|
+
const formItemConfig = formConfig.forms[index];
|
|
9735
9685
|
this.initFormItem($deepMenuMain, formItemConfig);
|
|
9736
9686
|
}
|
|
9737
9687
|
}
|
|
@@ -9769,7 +9719,7 @@
|
|
|
9769
9719
|
setLiClickEvent() {
|
|
9770
9720
|
popsDOMUtils.on($li, "click", void 0, async (event) => {
|
|
9771
9721
|
if (typeof formConfig.clickCallBack === "function") {
|
|
9772
|
-
|
|
9722
|
+
const result = await formConfig.clickCallBack(event, formConfig);
|
|
9773
9723
|
if (result) {
|
|
9774
9724
|
return;
|
|
9775
9725
|
}
|
|
@@ -9802,7 +9752,7 @@
|
|
|
9802
9752
|
*/
|
|
9803
9753
|
createSectionContainerItem(formConfig) {
|
|
9804
9754
|
/** 配置项的类型 */
|
|
9805
|
-
|
|
9755
|
+
const formType = formConfig.type;
|
|
9806
9756
|
if (formType === "switch") {
|
|
9807
9757
|
return this.createSectionContainerItem_switch(formConfig);
|
|
9808
9758
|
}
|
|
@@ -9840,18 +9790,18 @@
|
|
|
9840
9790
|
* @param formConfig
|
|
9841
9791
|
*/
|
|
9842
9792
|
createSectionContainerItem_forms(formConfig) {
|
|
9843
|
-
|
|
9844
|
-
|
|
9793
|
+
const that = this;
|
|
9794
|
+
const formConfig_forms = formConfig;
|
|
9845
9795
|
if (formConfig_forms.type === "forms") {
|
|
9846
|
-
|
|
9796
|
+
const childForms = formConfig["forms"];
|
|
9847
9797
|
/* 每一项<li>元素 */
|
|
9848
|
-
|
|
9798
|
+
const formContainerListElement = document.createElement("li");
|
|
9849
9799
|
/* 每一项<li>内的子<ul>元素 */
|
|
9850
|
-
|
|
9800
|
+
const formContainerULElement = document.createElement("ul");
|
|
9851
9801
|
formContainerListElement.classList.add("pops-panel-forms-container-item");
|
|
9852
9802
|
formContainerULElement.classList.add("pops-panel-forms-container-item-formlist");
|
|
9853
9803
|
/* 区域头部的文字 */
|
|
9854
|
-
|
|
9804
|
+
const formHeaderDivElement = popsDOMUtils.createElement("div", {
|
|
9855
9805
|
className: "pops-panel-forms-container-item-header-text",
|
|
9856
9806
|
});
|
|
9857
9807
|
PopsSafeUtils.setSafeHTML(formHeaderDivElement, formConfig_forms["text"]);
|
|
@@ -9867,7 +9817,7 @@
|
|
|
9867
9817
|
</i>
|
|
9868
9818
|
`);
|
|
9869
9819
|
// 添加点击事件
|
|
9870
|
-
popsDOMUtils.on(formHeaderDivElement, "click", (
|
|
9820
|
+
popsDOMUtils.on(formHeaderDivElement, "click", () => {
|
|
9871
9821
|
if (formContainerListElement.hasAttribute("data-fold-enable")) {
|
|
9872
9822
|
formContainerListElement.removeAttribute("data-fold-enable");
|
|
9873
9823
|
}
|
|
@@ -9919,7 +9869,7 @@
|
|
|
9919
9869
|
* 触发触发渲染右侧容器的事件
|
|
9920
9870
|
*/
|
|
9921
9871
|
triggerRenderRightContainer($container) {
|
|
9922
|
-
|
|
9872
|
+
const __formConfig__ = Reflect.get($container, "__formConfig__");
|
|
9923
9873
|
this.$el.$pops.dispatchEvent(new CustomEvent("pops:renderRightContainer", {
|
|
9924
9874
|
detail: {
|
|
9925
9875
|
formConfig: __formConfig__,
|
|
@@ -9932,7 +9882,7 @@
|
|
|
9932
9882
|
* @param containerOptions
|
|
9933
9883
|
*/
|
|
9934
9884
|
uListContainerAddItem(formConfig, containerOptions) {
|
|
9935
|
-
|
|
9885
|
+
const itemLiElement = this.createSectionContainerItem(formConfig);
|
|
9936
9886
|
if (itemLiElement) {
|
|
9937
9887
|
containerOptions["ulElement"].appendChild(itemLiElement);
|
|
9938
9888
|
}
|
|
@@ -9951,23 +9901,23 @@
|
|
|
9951
9901
|
setAsideItemClickEvent(asideLiElement, asideConfig) {
|
|
9952
9902
|
popsDOMUtils.on(asideLiElement, "click", async (event) => {
|
|
9953
9903
|
if (typeof asideConfig.clickFirstCallback === "function") {
|
|
9954
|
-
|
|
9904
|
+
const clickFirstCallbackResult = await asideConfig.clickFirstCallback(event, this.sectionContainerHeaderULElement, this.sectionContainerULElement);
|
|
9955
9905
|
if (typeof clickFirstCallbackResult === "boolean" && !clickFirstCallbackResult) {
|
|
9956
9906
|
return;
|
|
9957
9907
|
}
|
|
9958
9908
|
}
|
|
9959
9909
|
this.clearContainer();
|
|
9960
|
-
|
|
9910
|
+
const rightContainerFormConfig = Reflect.get(asideLiElement, "__forms__");
|
|
9961
9911
|
Reflect.set(this.$el.$contentSectionContainer, "__formConfig__", rightContainerFormConfig);
|
|
9962
9912
|
popsDOMUtils.cssShow(this.$el.$contentSectionContainer);
|
|
9963
9913
|
this.clearAsideItemIsVisited();
|
|
9964
9914
|
this.setAsideItemIsVisited(asideLiElement);
|
|
9965
9915
|
/* 顶部标题栏,存在就设置 */
|
|
9966
|
-
|
|
9916
|
+
const title = typeof asideConfig.title === "function" ? asideConfig.title() : asideConfig.title;
|
|
9967
9917
|
let headerTitleText = typeof asideConfig.headerTitle === "function" ? asideConfig.headerTitle() : asideConfig.headerTitle;
|
|
9968
9918
|
headerTitleText = headerTitleText ?? title;
|
|
9969
9919
|
if (typeof headerTitleText === "string" && headerTitleText.trim() !== "") {
|
|
9970
|
-
|
|
9920
|
+
const $containerHeaderTitle = document.createElement("li");
|
|
9971
9921
|
$containerHeaderTitle.classList.add("pops-panel-container-header-title-text");
|
|
9972
9922
|
Reflect.set($containerHeaderTitle, "__asideConfig__", asideConfig);
|
|
9973
9923
|
PopsSafeUtils.setSafeHTML($containerHeaderTitle, headerTitleText);
|
|
@@ -9978,7 +9928,7 @@
|
|
|
9978
9928
|
});
|
|
9979
9929
|
if (typeof asideConfig.clickCallback === "function") {
|
|
9980
9930
|
/* 执行回调 */
|
|
9981
|
-
|
|
9931
|
+
const asideClickCallbackResult = await asideConfig.clickCallback(event, this.sectionContainerHeaderULElement, this.sectionContainerULElement);
|
|
9982
9932
|
if (typeof asideClickCallbackResult === "boolean" && !asideClickCallbackResult) {
|
|
9983
9933
|
return;
|
|
9984
9934
|
}
|
|
@@ -10033,11 +9983,11 @@
|
|
|
10033
9983
|
},
|
|
10034
9984
|
]);
|
|
10035
9985
|
// 先把z-index提取出来
|
|
10036
|
-
|
|
10037
|
-
|
|
10038
|
-
|
|
10039
|
-
|
|
10040
|
-
|
|
9986
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
9987
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
9988
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
9989
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
9990
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
10041
9991
|
/*html*/ `
|
|
10042
9992
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
10043
9993
|
? config.title.text
|
|
@@ -10057,9 +10007,9 @@
|
|
|
10057
10007
|
/**
|
|
10058
10008
|
* 弹窗的主元素,包括动画层
|
|
10059
10009
|
*/
|
|
10060
|
-
|
|
10010
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
10061
10011
|
/* 结构元素 */
|
|
10062
|
-
|
|
10012
|
+
const { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, titleElement: $title, contentElement: $content, panelSectionWrapper: $panelSectionWrapper, contentAsideElement: $contentAside, contentSectionContainerElement: $contentSectionContainer, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
10063
10013
|
if (config.isMobile || popsUtils.isPhone()) {
|
|
10064
10014
|
popsDOMUtils.addClassName($pops, config.mobileClassName);
|
|
10065
10015
|
}
|
|
@@ -10070,10 +10020,10 @@
|
|
|
10070
10020
|
/**
|
|
10071
10021
|
* 已创建的元素列表
|
|
10072
10022
|
*/
|
|
10073
|
-
|
|
10023
|
+
const isCreatedElementList = [$anim];
|
|
10074
10024
|
/* 遮罩层元素 */
|
|
10075
10025
|
if (config.mask.enable) {
|
|
10076
|
-
|
|
10026
|
+
const { maskElement } = PopsHandler.handleMask({
|
|
10077
10027
|
type: popsType,
|
|
10078
10028
|
guid: guid,
|
|
10079
10029
|
config: config,
|
|
@@ -10084,7 +10034,7 @@
|
|
|
10084
10034
|
isCreatedElementList.push($mask);
|
|
10085
10035
|
}
|
|
10086
10036
|
/* 处理返回的配置 */
|
|
10087
|
-
|
|
10037
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
10088
10038
|
/* 为顶部右边的关闭按钮添加点击事件 */
|
|
10089
10039
|
PopsHandler.handleClickEvent("close", $headerCloseBtn, eventDetails, config.btn.close.callback);
|
|
10090
10040
|
/* 创建到页面中 */
|
|
@@ -10097,7 +10047,7 @@
|
|
|
10097
10047
|
if ($mask != null) {
|
|
10098
10048
|
$anim.after($mask);
|
|
10099
10049
|
}
|
|
10100
|
-
|
|
10050
|
+
const panelHandlerComponents = PanelHandlerComponents();
|
|
10101
10051
|
/**
|
|
10102
10052
|
* 处理内部配置
|
|
10103
10053
|
*/
|
|
@@ -10129,7 +10079,7 @@
|
|
|
10129
10079
|
endCallBack: config.dragEndCallBack,
|
|
10130
10080
|
});
|
|
10131
10081
|
}
|
|
10132
|
-
|
|
10082
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
10133
10083
|
return {
|
|
10134
10084
|
...result,
|
|
10135
10085
|
addEventListener: (event, listener, options) => {
|
|
@@ -10275,13 +10225,13 @@
|
|
|
10275
10225
|
},
|
|
10276
10226
|
]);
|
|
10277
10227
|
// 先把z-index提取出来
|
|
10278
|
-
|
|
10279
|
-
|
|
10280
|
-
|
|
10281
|
-
|
|
10282
|
-
|
|
10283
|
-
|
|
10284
|
-
|
|
10228
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
10229
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
10230
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
10231
|
+
const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
10232
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
10233
|
+
const { contentPStyle } = PopsElementHandler.createContentStyle(popsType, config);
|
|
10234
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
10285
10235
|
/*html*/ `
|
|
10286
10236
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
10287
10237
|
? config.title.text
|
|
@@ -10298,8 +10248,8 @@
|
|
|
10298
10248
|
/**
|
|
10299
10249
|
* 弹窗的主元素,包括动画层
|
|
10300
10250
|
*/
|
|
10301
|
-
|
|
10302
|
-
|
|
10251
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
10252
|
+
const { popsElement: $pops, inputElement: $input, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, titleElement: $title, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
10303
10253
|
/**
|
|
10304
10254
|
* 遮罩层元素
|
|
10305
10255
|
*/
|
|
@@ -10307,10 +10257,10 @@
|
|
|
10307
10257
|
/**
|
|
10308
10258
|
* 已创建的元素列表
|
|
10309
10259
|
*/
|
|
10310
|
-
|
|
10260
|
+
const elementList = [$anim];
|
|
10311
10261
|
if (config.mask.enable) {
|
|
10312
10262
|
// 启用遮罩层
|
|
10313
|
-
|
|
10263
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
10314
10264
|
type: popsType,
|
|
10315
10265
|
guid: guid,
|
|
10316
10266
|
config: config,
|
|
@@ -10320,7 +10270,7 @@
|
|
|
10320
10270
|
$mask = _handleMask_.maskElement;
|
|
10321
10271
|
elementList.push($mask);
|
|
10322
10272
|
}
|
|
10323
|
-
|
|
10273
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
10324
10274
|
/* 输入框赋值初始值 */
|
|
10325
10275
|
$input.value = config.content.text;
|
|
10326
10276
|
PopsHandler.handlePromptClickEvent("close", $input, $btnClose, eventDetails, config.btn.close.callback);
|
|
@@ -10362,7 +10312,7 @@
|
|
|
10362
10312
|
if (config.content.select) {
|
|
10363
10313
|
$input.select();
|
|
10364
10314
|
}
|
|
10365
|
-
|
|
10315
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
10366
10316
|
return result;
|
|
10367
10317
|
},
|
|
10368
10318
|
};
|
|
@@ -10476,8 +10426,7 @@
|
|
|
10476
10426
|
throw new Error("config.target 不能为空");
|
|
10477
10427
|
}
|
|
10478
10428
|
if (details.data) {
|
|
10479
|
-
|
|
10480
|
-
config.data = details.data;
|
|
10429
|
+
Reflect.set(config, "data", details.data);
|
|
10481
10430
|
}
|
|
10482
10431
|
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
10483
10432
|
PopsHandler.handleInit($shadowRoot, [
|
|
@@ -10499,7 +10448,7 @@
|
|
|
10499
10448
|
},
|
|
10500
10449
|
]);
|
|
10501
10450
|
if (config.style != null) {
|
|
10502
|
-
|
|
10451
|
+
const cssNode = popsDOMUtils.createElement("style", {
|
|
10503
10452
|
innerHTML: config.style,
|
|
10504
10453
|
}, {
|
|
10505
10454
|
type: "text/css",
|
|
@@ -10519,7 +10468,7 @@
|
|
|
10519
10468
|
if (!PopsContextMenu.rootElement) {
|
|
10520
10469
|
return;
|
|
10521
10470
|
}
|
|
10522
|
-
|
|
10471
|
+
const $click = event.target;
|
|
10523
10472
|
if ($click.closest(`.pops-${popsType}`)) {
|
|
10524
10473
|
return;
|
|
10525
10474
|
}
|
|
@@ -10536,7 +10485,7 @@
|
|
|
10536
10485
|
if (!PopsContextMenu.rootElement) {
|
|
10537
10486
|
return;
|
|
10538
10487
|
}
|
|
10539
|
-
|
|
10488
|
+
const $click = event.target;
|
|
10540
10489
|
if ($click.closest(`.pops-${popsType}`)) {
|
|
10541
10490
|
return;
|
|
10542
10491
|
}
|
|
@@ -10587,7 +10536,7 @@
|
|
|
10587
10536
|
if (PopsContextMenu.rootElement) {
|
|
10588
10537
|
PopsContextMenu.closeAllMenu(PopsContextMenu.rootElement);
|
|
10589
10538
|
}
|
|
10590
|
-
|
|
10539
|
+
const rootElement = PopsContextMenu.showMenu(event, config.data, selectorTarget);
|
|
10591
10540
|
PopsContextMenu.rootElement = rootElement;
|
|
10592
10541
|
if (config.only) {
|
|
10593
10542
|
PopsHandler.handlePush(popsType, {
|
|
@@ -10626,7 +10575,8 @@
|
|
|
10626
10575
|
/**
|
|
10627
10576
|
* 动画结束触发的事件
|
|
10628
10577
|
*/
|
|
10629
|
-
|
|
10578
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10579
|
+
const transitionEndEvent = (event) => {
|
|
10630
10580
|
popsDOMUtils.off($menu, popsDOMUtils.getTransitionEndNameList(), transitionEndEvent, {
|
|
10631
10581
|
capture: true,
|
|
10632
10582
|
});
|
|
@@ -10666,7 +10616,7 @@
|
|
|
10666
10616
|
if (rootElementMenuData?.root) {
|
|
10667
10617
|
rootElement = rootElementMenuData.root;
|
|
10668
10618
|
}
|
|
10669
|
-
|
|
10619
|
+
const childMenuList = rootElementMenuData.child;
|
|
10670
10620
|
childMenuList.forEach((childMenuElement) => {
|
|
10671
10621
|
this.animationCloseMenu(childMenuElement);
|
|
10672
10622
|
});
|
|
@@ -10678,11 +10628,11 @@
|
|
|
10678
10628
|
* @param isChildren 是否是rightClickMenu的某一项的子菜单
|
|
10679
10629
|
*/
|
|
10680
10630
|
createMenuContainerElement(isChildren) {
|
|
10681
|
-
|
|
10631
|
+
const $menu = popsDOMUtils.createElement("div", {
|
|
10682
10632
|
className: `pops-${popsType}`,
|
|
10683
10633
|
innerHTML: /*html*/ `<ul class="pops-${popsType}-wrapper"></ul>`,
|
|
10684
10634
|
});
|
|
10685
|
-
|
|
10635
|
+
const zIndex = this.getMenuZIndex();
|
|
10686
10636
|
if (zIndex > 10000) {
|
|
10687
10637
|
$menu.style.zIndex = zIndex.toString();
|
|
10688
10638
|
}
|
|
@@ -10713,26 +10663,26 @@
|
|
|
10713
10663
|
* @param isMainMenu 是否是主菜单
|
|
10714
10664
|
*/
|
|
10715
10665
|
getOffset(menuElement, mousePosition, parentInfo) {
|
|
10716
|
-
|
|
10666
|
+
const result = {
|
|
10717
10667
|
top: 0,
|
|
10718
10668
|
right: 0,
|
|
10719
10669
|
bottom: 0,
|
|
10720
10670
|
left: 0,
|
|
10721
10671
|
};
|
|
10722
|
-
|
|
10723
|
-
|
|
10672
|
+
const menuElementWidth = popsDOMUtils.width(menuElement);
|
|
10673
|
+
const menuElementHeight = popsDOMUtils.height(menuElement);
|
|
10724
10674
|
/**
|
|
10725
10675
|
* 限制的间隙距离
|
|
10726
10676
|
*/
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10677
|
+
const limitDistance = 1;
|
|
10678
|
+
const maxPageLeftOffset = popsDOMUtils.width(globalThis) - limitDistance;
|
|
10679
|
+
const maxPageTopOffset = popsDOMUtils.height(globalThis) - limitDistance;
|
|
10730
10680
|
/* left最大偏移 */
|
|
10731
|
-
|
|
10681
|
+
const maxLeftOffset = maxPageLeftOffset - menuElementWidth;
|
|
10732
10682
|
/* top最大偏移 */
|
|
10733
|
-
|
|
10734
|
-
|
|
10735
|
-
|
|
10683
|
+
const maxTopOffset = maxPageTopOffset - menuElementHeight;
|
|
10684
|
+
const chileMenuLeftOrRightDistance = config.chileMenuLeftOrRightDistance;
|
|
10685
|
+
const childMenuTopOrBottomDistance = config.childMenuTopOrBottomDistance;
|
|
10736
10686
|
let currentLeftOffset = mousePosition.x;
|
|
10737
10687
|
let currentTopOffset = mousePosition.y;
|
|
10738
10688
|
currentLeftOffset = currentLeftOffset < 0 ? 0 : currentLeftOffset;
|
|
@@ -10742,9 +10692,8 @@
|
|
|
10742
10692
|
// 偏移计算方式就是父菜单的右偏移+父菜单的宽度
|
|
10743
10693
|
if (parentInfo) {
|
|
10744
10694
|
// 子菜单
|
|
10745
|
-
|
|
10746
|
-
currentLeftOffset =
|
|
10747
|
-
maxPageLeftOffset - mainMenuOffset.left - chileMenuLeftOrRightDistance + limitDistance;
|
|
10695
|
+
const mainMenuOffset = popsDOMUtils.offset(parentInfo.$menu);
|
|
10696
|
+
currentLeftOffset = maxPageLeftOffset - mainMenuOffset.left - chileMenuLeftOrRightDistance + limitDistance;
|
|
10748
10697
|
}
|
|
10749
10698
|
else {
|
|
10750
10699
|
// 主菜单 默认的
|
|
@@ -10772,7 +10721,7 @@
|
|
|
10772
10721
|
// 超过,那么子菜单将会在放在上面
|
|
10773
10722
|
if (parentInfo) {
|
|
10774
10723
|
// 以项的top偏移为基准
|
|
10775
|
-
|
|
10724
|
+
const parentItemOffset = popsDOMUtils.offset(parentInfo.$parentItem, false);
|
|
10776
10725
|
currentTopOffset =
|
|
10777
10726
|
maxPageTopOffset - parentItemOffset.bottom - childMenuTopOrBottomDistance + limitDistance;
|
|
10778
10727
|
}
|
|
@@ -10803,7 +10752,7 @@
|
|
|
10803
10752
|
* @param menuListenerRootNode 右键菜单监听的元素
|
|
10804
10753
|
*/
|
|
10805
10754
|
showMenu(menuEvent, _config_, menuListenerRootNode) {
|
|
10806
|
-
|
|
10755
|
+
const menuElement = this.createMenuContainerElement(false);
|
|
10807
10756
|
Reflect.set(menuElement, "__menuData__", {
|
|
10808
10757
|
child: [],
|
|
10809
10758
|
});
|
|
@@ -10831,19 +10780,19 @@
|
|
|
10831
10780
|
* @param menuListenerRootNode 右键菜单监听的元素
|
|
10832
10781
|
*/
|
|
10833
10782
|
showClildMenu(menuEvent, posInfo, _config_, rootElement, targetLiElement, menuListenerRootNode) {
|
|
10834
|
-
|
|
10783
|
+
const menuElement = this.createMenuContainerElement(true);
|
|
10835
10784
|
Reflect.set(menuElement, "__menuData__", {
|
|
10836
10785
|
parent: targetLiElement,
|
|
10837
10786
|
root: rootElement,
|
|
10838
10787
|
});
|
|
10839
10788
|
// 根菜单数据
|
|
10840
|
-
|
|
10789
|
+
const rootElementMenuData = Reflect.get(rootElement, "__menuData__");
|
|
10841
10790
|
rootElementMenuData.child.push(menuElement);
|
|
10842
10791
|
// 添加子元素
|
|
10843
10792
|
PopsContextMenu.addMenuLiELement(menuEvent, rootElement, menuElement, _config_, menuListenerRootNode);
|
|
10844
10793
|
// 添加到页面
|
|
10845
10794
|
popsDOMUtils.append($shadowRoot, menuElement);
|
|
10846
|
-
|
|
10795
|
+
const $parentMenu = targetLiElement.closest(".pops-rightClickMenu");
|
|
10847
10796
|
this.handlerShowMenuCSS(menuElement, posInfo, {
|
|
10848
10797
|
$menu: $parentMenu,
|
|
10849
10798
|
$parentItem: targetLiElement,
|
|
@@ -10857,7 +10806,7 @@
|
|
|
10857
10806
|
* @param parentInfo 配置子菜单的父级信息
|
|
10858
10807
|
*/
|
|
10859
10808
|
handlerShowMenuCSS($menu, posInfo, parentInfo) {
|
|
10860
|
-
|
|
10809
|
+
const offset = this.getOffset($menu, {
|
|
10861
10810
|
x: posInfo.clientX,
|
|
10862
10811
|
y: posInfo.clientY,
|
|
10863
10812
|
}, parentInfo);
|
|
@@ -10883,14 +10832,14 @@
|
|
|
10883
10832
|
* @param menuListenerRootNode 右键菜单监听的元素
|
|
10884
10833
|
*/
|
|
10885
10834
|
addMenuLiELement(menuEvent, rootElement, menuElement, _config_, menuListenerRootNode) {
|
|
10886
|
-
|
|
10887
|
-
|
|
10835
|
+
const menuEventTarget = menuEvent.target;
|
|
10836
|
+
const menuULElement = menuElement.querySelector("ul");
|
|
10888
10837
|
_config_.forEach((item) => {
|
|
10889
|
-
|
|
10838
|
+
const menuLiElement = popsDOMUtils.parseTextToDOM(`<li></li>`);
|
|
10890
10839
|
/* 判断有无图标,有就添加进去 */
|
|
10891
10840
|
if (typeof item.icon === "string" && item.icon.trim() !== "") {
|
|
10892
|
-
|
|
10893
|
-
|
|
10841
|
+
const iconSVGHTML = PopsIcon.getIcon(item.icon) ?? item.icon;
|
|
10842
|
+
const iconElement = popsDOMUtils.parseTextToDOM(
|
|
10894
10843
|
/*html*/ `<i class="pops-${popsType}-icon" is-loading="${item.iconIsLoading ?? false}">${iconSVGHTML}</i>`);
|
|
10895
10844
|
menuLiElement.appendChild(iconElement);
|
|
10896
10845
|
}
|
|
@@ -10915,13 +10864,13 @@
|
|
|
10915
10864
|
}
|
|
10916
10865
|
Array.from(menuULElement.children).forEach((liElement) => {
|
|
10917
10866
|
popsDOMUtils.removeClassName(liElement, `pops-${popsType}-is-visited`);
|
|
10918
|
-
|
|
10867
|
+
const li_menuData = Reflect.get(liElement, "__menuData__");
|
|
10919
10868
|
if (!li_menuData) {
|
|
10920
10869
|
return;
|
|
10921
10870
|
}
|
|
10922
10871
|
function removeElement(element) {
|
|
10923
10872
|
element.querySelectorAll("ul li").forEach(($ele) => {
|
|
10924
|
-
|
|
10873
|
+
const menuData = Reflect.get($ele, "__menuData__");
|
|
10925
10874
|
if (menuData?.child) {
|
|
10926
10875
|
removeElement(menuData.child);
|
|
10927
10876
|
}
|
|
@@ -10932,9 +10881,9 @@
|
|
|
10932
10881
|
removeElement(li_menuData.child);
|
|
10933
10882
|
});
|
|
10934
10883
|
/* 清理根元素上的children不存在于页面中的元素 */
|
|
10935
|
-
|
|
10884
|
+
const root_menuData = Reflect.get(rootElement, "__menuData__");
|
|
10936
10885
|
for (let index = 0; index < root_menuData.child.length; index++) {
|
|
10937
|
-
|
|
10886
|
+
const element = root_menuData.child[index];
|
|
10938
10887
|
if (!$shadowRoot.contains(element)) {
|
|
10939
10888
|
root_menuData.child.splice(index, 1);
|
|
10940
10889
|
index--;
|
|
@@ -10944,8 +10893,8 @@
|
|
|
10944
10893
|
if (!item.item) {
|
|
10945
10894
|
return;
|
|
10946
10895
|
}
|
|
10947
|
-
|
|
10948
|
-
|
|
10896
|
+
const rect = menuLiElement.getBoundingClientRect();
|
|
10897
|
+
const childMenu = PopsContextMenu.showClildMenu(menuEvent, {
|
|
10949
10898
|
clientX: rect.left + popsDOMUtils.outerWidth(menuLiElement),
|
|
10950
10899
|
clientY: rect.top,
|
|
10951
10900
|
}, item.item, rootElement, menuLiElement, menuListenerRootNode);
|
|
@@ -10966,8 +10915,10 @@
|
|
|
10966
10915
|
},
|
|
10967
10916
|
});
|
|
10968
10917
|
}
|
|
10969
|
-
catch
|
|
10970
|
-
|
|
10918
|
+
catch {
|
|
10919
|
+
// 忽略
|
|
10920
|
+
}
|
|
10921
|
+
const callbackResult = await item.callback(clickEvent, menuEvent, menuLiElement, menuListenerRootNode);
|
|
10971
10922
|
if (typeof callbackResult === "boolean" && callbackResult == false) {
|
|
10972
10923
|
return;
|
|
10973
10924
|
}
|
|
@@ -11010,8 +10961,8 @@
|
|
|
11010
10961
|
console.log("删除当前项", [event, $dataItem, dataItem, config]);
|
|
11011
10962
|
return true;
|
|
11012
10963
|
},
|
|
11013
|
-
itemView(dateItem
|
|
11014
|
-
return
|
|
10964
|
+
itemView(dateItem) {
|
|
10965
|
+
return `${dateItem.value}-html`;
|
|
11015
10966
|
},
|
|
11016
10967
|
clickCallback(event, $dataItem, dataItem, config) {
|
|
11017
10968
|
console.log("item项的点击回调", [event, $dataItem, data, config]);
|
|
@@ -11089,7 +11040,7 @@
|
|
|
11089
11040
|
},
|
|
11090
11041
|
]);
|
|
11091
11042
|
if (config.style != null) {
|
|
11092
|
-
|
|
11043
|
+
const cssNode = document.createElement("style");
|
|
11093
11044
|
popsDOMUtils.createElement("style", {
|
|
11094
11045
|
innerHTML: config.style,
|
|
11095
11046
|
}, {
|
|
@@ -11137,8 +11088,7 @@
|
|
|
11137
11088
|
Reflect.set(SearchSuggestion.$el.root, "data-SearchSuggestion", SearchSuggestion);
|
|
11138
11089
|
SearchSuggestion.$el.$dynamicCSS =
|
|
11139
11090
|
SearchSuggestion.$el.root.querySelector("style[data-dynamic]");
|
|
11140
|
-
SearchSuggestion.$el.$hintULContainer =
|
|
11141
|
-
SearchSuggestion.$el.root.querySelector("ul");
|
|
11091
|
+
SearchSuggestion.$el.$hintULContainer = SearchSuggestion.$el.root.querySelector("ul");
|
|
11142
11092
|
},
|
|
11143
11093
|
/**
|
|
11144
11094
|
* 获取数据
|
|
@@ -11157,7 +11107,7 @@
|
|
|
11157
11107
|
* 获取显示出搜索建议框的html
|
|
11158
11108
|
*/
|
|
11159
11109
|
createSearchSelectElement() {
|
|
11160
|
-
|
|
11110
|
+
const $el = popsDOMUtils.createElement("div", {
|
|
11161
11111
|
className: `pops pops-${popsType}-search-suggestion`,
|
|
11162
11112
|
innerHTML: /*html*/ `
|
|
11163
11113
|
<style type="text/css">
|
|
@@ -11358,7 +11308,7 @@
|
|
|
11358
11308
|
*/
|
|
11359
11309
|
createSearchItemLiElement(dataItem, dateItemIndex) {
|
|
11360
11310
|
const dataValue = SearchSuggestion.getItemDataValue(dataItem);
|
|
11361
|
-
|
|
11311
|
+
const $li = popsDOMUtils.createElement("li", {
|
|
11362
11312
|
className: `pops-${popsType}-search-suggestion-hint-item`,
|
|
11363
11313
|
"data-index": dateItemIndex,
|
|
11364
11314
|
"data-value": dataValue,
|
|
@@ -11366,7 +11316,7 @@
|
|
|
11366
11316
|
Reflect.set($li, "data-index", dateItemIndex);
|
|
11367
11317
|
Reflect.set($li, "data-value", dataValue);
|
|
11368
11318
|
// 项内容
|
|
11369
|
-
|
|
11319
|
+
const $itemInner = dataItem.itemView(dataItem, $li, config);
|
|
11370
11320
|
if (typeof $itemInner === "string") {
|
|
11371
11321
|
PopsSafeUtils.setSafeHTML($li, $itemInner);
|
|
11372
11322
|
}
|
|
@@ -11376,7 +11326,7 @@
|
|
|
11376
11326
|
// 删除按钮
|
|
11377
11327
|
const enableDeleteButton = dataItem.enableDeleteButton;
|
|
11378
11328
|
if (typeof enableDeleteButton === "boolean" && enableDeleteButton) {
|
|
11379
|
-
|
|
11329
|
+
const $deleteIcon = SearchSuggestion.createItemDeleteIcon();
|
|
11380
11330
|
popsDOMUtils.append($li, $deleteIcon);
|
|
11381
11331
|
}
|
|
11382
11332
|
popsDOMUtils.addClassName($li, PopsCommonCSSClassName.flexCenter);
|
|
@@ -11390,14 +11340,14 @@
|
|
|
11390
11340
|
setSearchItemClickEvent($searchItem) {
|
|
11391
11341
|
popsDOMUtils.on($searchItem, "click", async (event) => {
|
|
11392
11342
|
popsDOMUtils.preventEvent(event);
|
|
11393
|
-
|
|
11343
|
+
const $click = event.target;
|
|
11394
11344
|
const data = SearchSuggestion.getData();
|
|
11395
11345
|
const dataItem = Reflect.get($searchItem, "data-value");
|
|
11396
|
-
|
|
11346
|
+
const isDelete = Boolean($click.closest(`.pops-${popsType}-delete-icon`));
|
|
11397
11347
|
if (isDelete) {
|
|
11398
11348
|
// 删除
|
|
11399
11349
|
if (typeof dataItem.deleteButtonClickCallback === "function") {
|
|
11400
|
-
|
|
11350
|
+
const result = await dataItem.deleteButtonClickCallback(event, $searchItem, dataItem, config);
|
|
11401
11351
|
if (typeof result === "boolean" && result) {
|
|
11402
11352
|
data.splice(data.indexOf(dataItem), 1);
|
|
11403
11353
|
$searchItem.remove();
|
|
@@ -11412,7 +11362,7 @@
|
|
|
11412
11362
|
else {
|
|
11413
11363
|
// 点击选择项
|
|
11414
11364
|
if (typeof dataItem.clickCallback === "function") {
|
|
11415
|
-
|
|
11365
|
+
const result = await dataItem.clickCallback(event, $searchItem, dataItem, config);
|
|
11416
11366
|
if (typeof result === "boolean" && result) {
|
|
11417
11367
|
if (config.inputTarget instanceof HTMLInputElement ||
|
|
11418
11368
|
config.inputTarget instanceof HTMLTextAreaElement) {
|
|
@@ -11429,6 +11379,7 @@
|
|
|
11429
11379
|
* 设置搜索建议框每一项的选中事件
|
|
11430
11380
|
* @param liElement
|
|
11431
11381
|
*/
|
|
11382
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11432
11383
|
setSearchItemSelectEvent(liElement) {
|
|
11433
11384
|
// popsDOMUtils.on(
|
|
11434
11385
|
// liElement,
|
|
@@ -11450,17 +11401,18 @@
|
|
|
11450
11401
|
capture: true,
|
|
11451
11402
|
}) {
|
|
11452
11403
|
/* 必须是input或者textarea才有input事件 */
|
|
11453
|
-
if (!(config.inputTarget instanceof HTMLInputElement ||
|
|
11454
|
-
config.inputTarget instanceof HTMLTextAreaElement)) {
|
|
11404
|
+
if (!(config.inputTarget instanceof HTMLInputElement || config.inputTarget instanceof HTMLTextAreaElement)) {
|
|
11455
11405
|
return;
|
|
11456
11406
|
}
|
|
11457
11407
|
/* 是input输入框 */
|
|
11458
11408
|
/* 禁用输入框自动提示 */
|
|
11459
11409
|
config.inputTarget.setAttribute("autocomplete", "off");
|
|
11460
11410
|
/* 内容改变事件 */
|
|
11461
|
-
const listenerHandler = popsDOMUtils.onInput(config.inputTarget,
|
|
11411
|
+
const listenerHandler = popsDOMUtils.onInput(config.inputTarget,
|
|
11412
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11413
|
+
async (_event) => {
|
|
11462
11414
|
const data = SearchSuggestion.getData();
|
|
11463
|
-
|
|
11415
|
+
const queryDataResult = await config.inputTargetChangeRefreshShowDataCallback(config.inputTarget.value, data, config);
|
|
11464
11416
|
SearchSuggestion.update(queryDataResult);
|
|
11465
11417
|
SearchSuggestion.updateStyleSheet();
|
|
11466
11418
|
}, option);
|
|
@@ -11469,7 +11421,9 @@
|
|
|
11469
11421
|
/**
|
|
11470
11422
|
* 移除输入框内容改变的监听
|
|
11471
11423
|
*/
|
|
11472
|
-
removeInputChangeEvent(
|
|
11424
|
+
removeInputChangeEvent(
|
|
11425
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11426
|
+
option = {
|
|
11473
11427
|
capture: true,
|
|
11474
11428
|
}) {
|
|
11475
11429
|
for (let index = 0; index < SearchSuggestion.$evt.offInputChangeEvtHandler.length; index++) {
|
|
@@ -11604,7 +11558,7 @@
|
|
|
11604
11558
|
* 获取删除按钮的html
|
|
11605
11559
|
*/
|
|
11606
11560
|
createItemDeleteIcon(size = 16, fill = "#bababa") {
|
|
11607
|
-
|
|
11561
|
+
const $svg = popsDOMUtils.parseTextToDOM(/*html*/ `
|
|
11608
11562
|
<svg class="pops-${popsType}-delete-icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="${fill}">
|
|
11609
11563
|
<path d="M512 883.2A371.2 371.2 0 1 0 140.8 512 371.2 371.2 0 0 0 512 883.2z m0 64a435.2 435.2 0 1 1 435.2-435.2 435.2 435.2 0 0 1-435.2 435.2z"></path>
|
|
11610
11564
|
<path d="M557.056 512l122.368 122.368a31.744 31.744 0 1 1-45.056 45.056L512 557.056l-122.368 122.368a31.744 31.744 0 1 1-45.056-45.056L466.944 512 344.576 389.632a31.744 31.744 0 1 1 45.056-45.056L512 466.944l122.368-122.368a31.744 31.744 0 1 1 45.056 45.056z"></path>
|
|
@@ -11616,7 +11570,7 @@
|
|
|
11616
11570
|
* 设置当前正在搜索中的提示
|
|
11617
11571
|
*/
|
|
11618
11572
|
setPromptsInSearch() {
|
|
11619
|
-
|
|
11573
|
+
const $isSearching = popsDOMUtils.createElement("li", {
|
|
11620
11574
|
className: `pops-${popsType}-search-suggestion-hint-searching-item`,
|
|
11621
11575
|
innerHTML: config.searchingTip,
|
|
11622
11576
|
});
|
|
@@ -11654,12 +11608,12 @@
|
|
|
11654
11608
|
documentHeight = popsDOMUtils.height(document);
|
|
11655
11609
|
}
|
|
11656
11610
|
// 文档最大宽度
|
|
11657
|
-
|
|
11611
|
+
const documentWidth = popsDOMUtils.width(document);
|
|
11658
11612
|
let position = config.position;
|
|
11659
11613
|
if (config.position === "auto") {
|
|
11660
11614
|
// 需目标高度+搜索建议框高度大于文档高度,则显示在上面
|
|
11661
|
-
|
|
11662
|
-
|
|
11615
|
+
const targetBottom = targetRect.bottom;
|
|
11616
|
+
const searchSuggestionContainerHeight = popsDOMUtils.height(SearchSuggestion.$el.$hintULContainer);
|
|
11663
11617
|
if (targetBottom + searchSuggestionContainerHeight > documentHeight) {
|
|
11664
11618
|
// 在上面
|
|
11665
11619
|
position = "top";
|
|
@@ -11679,7 +11633,7 @@
|
|
|
11679
11633
|
// 翻转折叠
|
|
11680
11634
|
SearchSuggestion.$el.root.setAttribute("data-popper-placement", "top");
|
|
11681
11635
|
}
|
|
11682
|
-
|
|
11636
|
+
const bottom = documentHeight - targetRect.top + config.topDistance;
|
|
11683
11637
|
SearchSuggestion.$el.root.style.top = "";
|
|
11684
11638
|
SearchSuggestion.$el.root.style.bottom = bottom + "px";
|
|
11685
11639
|
}
|
|
@@ -11688,13 +11642,13 @@
|
|
|
11688
11642
|
if (config.useFoldAnimation) {
|
|
11689
11643
|
SearchSuggestion.$el.root.setAttribute("data-popper-placement", "bottom-center");
|
|
11690
11644
|
}
|
|
11691
|
-
|
|
11645
|
+
const top = targetRect.height + targetRect.top + config.topDistance;
|
|
11692
11646
|
SearchSuggestion.$el.root.removeAttribute("data-top-reverse");
|
|
11693
11647
|
SearchSuggestion.$el.root.style.bottom = "";
|
|
11694
11648
|
SearchSuggestion.$el.root.style.top = top + "px";
|
|
11695
11649
|
}
|
|
11696
11650
|
let left = targetRect.left;
|
|
11697
|
-
|
|
11651
|
+
const hintUIWidth = popsDOMUtils.width(SearchSuggestion.$el.$hintULContainer);
|
|
11698
11652
|
if (hintUIWidth > documentWidth) {
|
|
11699
11653
|
// 超出宽度
|
|
11700
11654
|
left = left + documentWidth - hintUIWidth;
|
|
@@ -11715,7 +11669,7 @@
|
|
|
11715
11669
|
* @param target 目标元素
|
|
11716
11670
|
*/
|
|
11717
11671
|
changeHintULElementWidth(target = config.target ?? config.inputTarget) {
|
|
11718
|
-
|
|
11672
|
+
const targetRect = target.getBoundingClientRect();
|
|
11719
11673
|
if (config.followTargetWidth) {
|
|
11720
11674
|
SearchSuggestion.$el.$hintULContainer.style.width = targetRect.width + "px";
|
|
11721
11675
|
}
|
|
@@ -11727,7 +11681,7 @@
|
|
|
11727
11681
|
* 动态更新CSS
|
|
11728
11682
|
*/
|
|
11729
11683
|
updateDynamicCSS() {
|
|
11730
|
-
|
|
11684
|
+
const cssText = SearchSuggestion.getDynamicCSS();
|
|
11731
11685
|
PopsSafeUtils.setSafeHTML(SearchSuggestion.$el.$dynamicCSS, cssText);
|
|
11732
11686
|
},
|
|
11733
11687
|
/**
|
|
@@ -11769,9 +11723,9 @@
|
|
|
11769
11723
|
}
|
|
11770
11724
|
SearchSuggestion.clear(true);
|
|
11771
11725
|
/* 添加进ul中 */
|
|
11772
|
-
|
|
11726
|
+
const fragment = document.createDocumentFragment();
|
|
11773
11727
|
data.forEach((item, index) => {
|
|
11774
|
-
|
|
11728
|
+
const $item = SearchSuggestion.createSearchItemLiElement(item, index);
|
|
11775
11729
|
SearchSuggestion.setSearchItemClickEvent($item);
|
|
11776
11730
|
SearchSuggestion.setSearchItemSelectEvent($item);
|
|
11777
11731
|
fragment.appendChild($item);
|
|
@@ -11839,11 +11793,13 @@
|
|
|
11839
11793
|
},
|
|
11840
11794
|
};
|
|
11841
11795
|
|
|
11796
|
+
const version = "2.4.6";
|
|
11797
|
+
|
|
11842
11798
|
class Pops {
|
|
11843
11799
|
/** 配置 */
|
|
11844
11800
|
config = {
|
|
11845
11801
|
/** 版本号 */
|
|
11846
|
-
version:
|
|
11802
|
+
version: version,
|
|
11847
11803
|
cssText: PopsCSS,
|
|
11848
11804
|
/** icon图标的svg代码 */
|
|
11849
11805
|
iconSVG: PopsIcon.$data,
|
|
@@ -11878,9 +11834,7 @@
|
|
|
11878
11834
|
if (typeof PopsCore.globalThis.pops === "object") {
|
|
11879
11835
|
popsUtils.delete(PopsCore.globalThis, "pops");
|
|
11880
11836
|
}
|
|
11881
|
-
if (typeof unsafeWindow === "object" &&
|
|
11882
|
-
unsafeWindow != null &&
|
|
11883
|
-
typeof unsafeWindow.pops === "object") {
|
|
11837
|
+
if (typeof unsafeWindow === "object" && unsafeWindow != null && typeof unsafeWindow.pops === "object") {
|
|
11884
11838
|
popsUtils.delete(unsafeWindow, "pops");
|
|
11885
11839
|
}
|
|
11886
11840
|
return new Pops();
|
|
@@ -11901,7 +11855,7 @@
|
|
|
11901
11855
|
* @param details 配置
|
|
11902
11856
|
*/
|
|
11903
11857
|
alert = (details) => {
|
|
11904
|
-
|
|
11858
|
+
const dialog = PopsAlert.init(details);
|
|
11905
11859
|
return dialog;
|
|
11906
11860
|
};
|
|
11907
11861
|
/**
|
|
@@ -11909,7 +11863,7 @@
|
|
|
11909
11863
|
* @param details 配置
|
|
11910
11864
|
*/
|
|
11911
11865
|
confirm = (details) => {
|
|
11912
|
-
|
|
11866
|
+
const dialog = PopsConfirm.init(details);
|
|
11913
11867
|
return dialog;
|
|
11914
11868
|
};
|
|
11915
11869
|
/**
|
|
@@ -11917,7 +11871,7 @@
|
|
|
11917
11871
|
* @param details 配置
|
|
11918
11872
|
*/
|
|
11919
11873
|
prompt = (details) => {
|
|
11920
|
-
|
|
11874
|
+
const dialog = PopsPrompt.init(details);
|
|
11921
11875
|
return dialog;
|
|
11922
11876
|
};
|
|
11923
11877
|
/**
|
|
@@ -11925,7 +11879,7 @@
|
|
|
11925
11879
|
* @param details 配置
|
|
11926
11880
|
*/
|
|
11927
11881
|
loading = (details) => {
|
|
11928
|
-
|
|
11882
|
+
const popsLoading = PopsLoading.init(details);
|
|
11929
11883
|
return popsLoading;
|
|
11930
11884
|
};
|
|
11931
11885
|
/**
|
|
@@ -11933,7 +11887,7 @@
|
|
|
11933
11887
|
* @param details 配置
|
|
11934
11888
|
*/
|
|
11935
11889
|
iframe = (details) => {
|
|
11936
|
-
|
|
11890
|
+
const dialog = PopsIframe.init(details);
|
|
11937
11891
|
return dialog;
|
|
11938
11892
|
};
|
|
11939
11893
|
/**
|
|
@@ -11941,7 +11895,7 @@
|
|
|
11941
11895
|
* @param details 配置
|
|
11942
11896
|
*/
|
|
11943
11897
|
tooltip = (details) => {
|
|
11944
|
-
|
|
11898
|
+
const popsTooltip = PopsTooltip.init(details);
|
|
11945
11899
|
return popsTooltip;
|
|
11946
11900
|
};
|
|
11947
11901
|
/**
|
|
@@ -11949,7 +11903,7 @@
|
|
|
11949
11903
|
* @param details 配置
|
|
11950
11904
|
*/
|
|
11951
11905
|
drawer = (details) => {
|
|
11952
|
-
|
|
11906
|
+
const dialog = PopsDrawer.init(details);
|
|
11953
11907
|
return dialog;
|
|
11954
11908
|
};
|
|
11955
11909
|
/**
|
|
@@ -11957,7 +11911,7 @@
|
|
|
11957
11911
|
* @param details 配置
|
|
11958
11912
|
*/
|
|
11959
11913
|
folder = (details) => {
|
|
11960
|
-
|
|
11914
|
+
const dialog = PopsFolder.init(details);
|
|
11961
11915
|
return dialog;
|
|
11962
11916
|
};
|
|
11963
11917
|
/**
|
|
@@ -11965,7 +11919,7 @@
|
|
|
11965
11919
|
* @param details 配置
|
|
11966
11920
|
*/
|
|
11967
11921
|
panel = (details) => {
|
|
11968
|
-
|
|
11922
|
+
const dialog = PopsPanel.init(details);
|
|
11969
11923
|
return dialog;
|
|
11970
11924
|
};
|
|
11971
11925
|
/**
|
|
@@ -11973,7 +11927,7 @@
|
|
|
11973
11927
|
* @param details 配置
|
|
11974
11928
|
*/
|
|
11975
11929
|
rightClickMenu = (details) => {
|
|
11976
|
-
|
|
11930
|
+
const popsRightClickMenu = PopsRightClickMenu.init(details);
|
|
11977
11931
|
return popsRightClickMenu;
|
|
11978
11932
|
};
|
|
11979
11933
|
/**
|
|
@@ -11994,7 +11948,7 @@
|
|
|
11994
11948
|
* searchSuggestion.setAllEvent();
|
|
11995
11949
|
*/
|
|
11996
11950
|
searchSuggestion = (details) => {
|
|
11997
|
-
|
|
11951
|
+
const popsSearchSuggestion = PopsSearchSuggestion.init(details);
|
|
11998
11952
|
return popsSearchSuggestion;
|
|
11999
11953
|
};
|
|
12000
11954
|
}
|