@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.esm.js
CHANGED
|
@@ -12,12 +12,12 @@ const GlobalConfig = {
|
|
|
12
12
|
* 获取全局配置
|
|
13
13
|
*/
|
|
14
14
|
getGlobalConfig() {
|
|
15
|
-
|
|
15
|
+
const result = {};
|
|
16
16
|
Object.keys(GlobalConfig.config).forEach((keyName) => {
|
|
17
|
-
|
|
17
|
+
const configValue = Reflect.get(GlobalConfig.config, keyName);
|
|
18
18
|
if (keyName === "style") {
|
|
19
19
|
// 设置style属性
|
|
20
|
-
|
|
20
|
+
const style = configValue == null ? "" : typeof configValue === "function" ? configValue() : configValue;
|
|
21
21
|
if (typeof style === "string") {
|
|
22
22
|
result.style = style;
|
|
23
23
|
}
|
|
@@ -26,7 +26,7 @@ const GlobalConfig = {
|
|
|
26
26
|
// 设置zIndex属性
|
|
27
27
|
let zIndex = configValue == null ? "" : typeof configValue === "function" ? configValue() : configValue;
|
|
28
28
|
if (typeof zIndex === "string") {
|
|
29
|
-
|
|
29
|
+
const newIndex = (zIndex = Number(zIndex));
|
|
30
30
|
if (!isNaN(newIndex)) {
|
|
31
31
|
result.zIndex = newIndex;
|
|
32
32
|
}
|
|
@@ -38,7 +38,7 @@ const GlobalConfig = {
|
|
|
38
38
|
}
|
|
39
39
|
}
|
|
40
40
|
else if (keyName === "mask") {
|
|
41
|
-
|
|
41
|
+
const mask = GlobalConfig.config.mask == null ? {} : GlobalConfig.config.mask;
|
|
42
42
|
if (typeof mask === "object" && mask != null) {
|
|
43
43
|
result.mask = mask;
|
|
44
44
|
}
|
|
@@ -550,7 +550,7 @@ class PopsUtils {
|
|
|
550
550
|
}
|
|
551
551
|
}
|
|
552
552
|
assign(target = {}, source = {}, isAdd = false) {
|
|
553
|
-
|
|
553
|
+
const UtilsContext = this;
|
|
554
554
|
if (source == null) {
|
|
555
555
|
return target;
|
|
556
556
|
}
|
|
@@ -558,7 +558,7 @@ class PopsUtils {
|
|
|
558
558
|
target = {};
|
|
559
559
|
}
|
|
560
560
|
if (Array.isArray(source)) {
|
|
561
|
-
|
|
561
|
+
const canTraverse = source.filter((item) => {
|
|
562
562
|
return typeof item === "object";
|
|
563
563
|
});
|
|
564
564
|
if (!canTraverse.length) {
|
|
@@ -568,8 +568,8 @@ class PopsUtils {
|
|
|
568
568
|
if (isAdd) {
|
|
569
569
|
for (const sourceKeyName in source) {
|
|
570
570
|
const targetKeyName = sourceKeyName;
|
|
571
|
-
|
|
572
|
-
|
|
571
|
+
const targetValue = target[targetKeyName];
|
|
572
|
+
const sourceValue = source[sourceKeyName];
|
|
573
573
|
if (typeof sourceValue === "object" &&
|
|
574
574
|
sourceValue != null &&
|
|
575
575
|
sourceKeyName in target &&
|
|
@@ -584,22 +584,19 @@ class PopsUtils {
|
|
|
584
584
|
else {
|
|
585
585
|
for (const targetKeyName in target) {
|
|
586
586
|
if (targetKeyName in source) {
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
// @ts-ignore
|
|
590
|
-
let sourceValue = source[targetKeyName];
|
|
587
|
+
const targetValue = Reflect.get(target, targetKeyName);
|
|
588
|
+
const sourceValue = Reflect.get(source, targetKeyName);
|
|
591
589
|
if (typeof sourceValue === "object" &&
|
|
592
590
|
sourceValue != null &&
|
|
593
591
|
!UtilsContext.isDOM(sourceValue) &&
|
|
594
592
|
Object.keys(sourceValue).length) {
|
|
595
593
|
/* 源端的值是object类型,且不是元素节点 */
|
|
596
|
-
|
|
597
|
-
|
|
594
|
+
const childObjectValue = UtilsContext.assign(targetValue, sourceValue, isAdd);
|
|
595
|
+
Reflect.set(target, targetKeyName, childObjectValue);
|
|
598
596
|
continue;
|
|
599
597
|
}
|
|
600
598
|
/* 直接赋值 */
|
|
601
|
-
|
|
602
|
-
target[targetKeyName] = sourceValue;
|
|
599
|
+
Reflect.set(target, targetKeyName, sourceValue);
|
|
603
600
|
}
|
|
604
601
|
}
|
|
605
602
|
}
|
|
@@ -614,15 +611,16 @@ class PopsUtils {
|
|
|
614
611
|
}
|
|
615
612
|
else {
|
|
616
613
|
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g, function (charStr) {
|
|
617
|
-
|
|
614
|
+
const randomValue = (Math.random() * 16) | 0, randomCharValue = charStr === "x" ? randomValue : (randomValue & 0x3) | 0x8;
|
|
618
615
|
return randomCharValue.toString(16);
|
|
619
616
|
});
|
|
620
617
|
}
|
|
621
618
|
}
|
|
622
|
-
contains(
|
|
623
|
-
|
|
619
|
+
contains(...args) {
|
|
620
|
+
const [context, target] = args;
|
|
621
|
+
if (args.length === 1) {
|
|
624
622
|
// 只判断该页面是否存在该元素
|
|
625
|
-
return this.contains(PopsCore.document.body || PopsCore.document.documentElement,
|
|
623
|
+
return this.contains(PopsCore.document.body || PopsCore.document.documentElement, args[0]);
|
|
626
624
|
}
|
|
627
625
|
else {
|
|
628
626
|
if (target == null) {
|
|
@@ -645,7 +643,7 @@ class PopsUtils {
|
|
|
645
643
|
}
|
|
646
644
|
}
|
|
647
645
|
formatTime(text = new Date(), formatType = "yyyy-MM-dd HH:mm:ss") {
|
|
648
|
-
|
|
646
|
+
const time = text == null ? new Date() : new Date(text);
|
|
649
647
|
/**
|
|
650
648
|
* 校验时间补0
|
|
651
649
|
* @param timeNum
|
|
@@ -664,7 +662,7 @@ class PopsUtils {
|
|
|
664
662
|
function timeSystemChange(hourNum) {
|
|
665
663
|
return hourNum > 12 ? hourNum - 12 : hourNum;
|
|
666
664
|
}
|
|
667
|
-
|
|
665
|
+
const timeRegexp = {
|
|
668
666
|
yyyy: time.getFullYear(),
|
|
669
667
|
/* 年 */
|
|
670
668
|
MM: checkTime(time.getMonth() + 1),
|
|
@@ -681,7 +679,7 @@ class PopsUtils {
|
|
|
681
679
|
/* 秒 */
|
|
682
680
|
};
|
|
683
681
|
Object.keys(timeRegexp).forEach(function (key) {
|
|
684
|
-
|
|
682
|
+
const replaecRegexp = new RegExp(key, "g");
|
|
685
683
|
formatType = formatType.replace(replaecRegexp, timeRegexp[key]);
|
|
686
684
|
});
|
|
687
685
|
return formatType;
|
|
@@ -693,7 +691,7 @@ class PopsUtils {
|
|
|
693
691
|
}
|
|
694
692
|
let result = 0;
|
|
695
693
|
let resultType = "KB";
|
|
696
|
-
|
|
694
|
+
const sizeData = {};
|
|
697
695
|
sizeData.B = 1;
|
|
698
696
|
sizeData.KB = 1024;
|
|
699
697
|
sizeData.MB = sizeData.KB * sizeData.KB;
|
|
@@ -706,7 +704,7 @@ class PopsUtils {
|
|
|
706
704
|
sizeData.BB = sizeData.YB * sizeData.KB;
|
|
707
705
|
sizeData.NB = sizeData.BB * sizeData.KB;
|
|
708
706
|
sizeData.DB = sizeData.NB * sizeData.KB;
|
|
709
|
-
for (
|
|
707
|
+
for (const key in sizeData) {
|
|
710
708
|
result = byteSize / sizeData[key];
|
|
711
709
|
resultType = key;
|
|
712
710
|
if (sizeData.KB >= result) {
|
|
@@ -734,7 +732,7 @@ class PopsUtils {
|
|
|
734
732
|
try {
|
|
735
733
|
return setTimeout$1(callback, timeout);
|
|
736
734
|
}
|
|
737
|
-
catch
|
|
735
|
+
catch {
|
|
738
736
|
return PopsCore.setTimeout(callback, timeout);
|
|
739
737
|
}
|
|
740
738
|
}
|
|
@@ -747,7 +745,8 @@ class PopsUtils {
|
|
|
747
745
|
clearTimeout$1(timeId);
|
|
748
746
|
}
|
|
749
747
|
}
|
|
750
|
-
catch
|
|
748
|
+
catch {
|
|
749
|
+
// TODO
|
|
751
750
|
}
|
|
752
751
|
finally {
|
|
753
752
|
PopsCore.clearTimeout(timeId);
|
|
@@ -760,7 +759,7 @@ class PopsUtils {
|
|
|
760
759
|
try {
|
|
761
760
|
return setInterval$1(callback, timeout);
|
|
762
761
|
}
|
|
763
|
-
catch
|
|
762
|
+
catch {
|
|
764
763
|
return PopsCore.setInterval(callback, timeout);
|
|
765
764
|
}
|
|
766
765
|
}
|
|
@@ -773,7 +772,8 @@ class PopsUtils {
|
|
|
773
772
|
clearInterval$1(timeId);
|
|
774
773
|
}
|
|
775
774
|
}
|
|
776
|
-
catch
|
|
775
|
+
catch {
|
|
776
|
+
// 忽略
|
|
777
777
|
}
|
|
778
778
|
finally {
|
|
779
779
|
PopsCore.clearInterval(timeId);
|
|
@@ -787,10 +787,8 @@ const PopsSafeUtils = {
|
|
|
787
787
|
* 获取安全的html
|
|
788
788
|
*/
|
|
789
789
|
getSafeHTML(text) {
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
// @ts-ignore
|
|
793
|
-
const policy = globalThis.trustedTypes.createPolicy("safe-innerHTML", {
|
|
790
|
+
if (window.trustedTypes) {
|
|
791
|
+
const policy = window.trustedTypes.createPolicy("safe-innerHTML", {
|
|
794
792
|
createHTML: (html) => html,
|
|
795
793
|
});
|
|
796
794
|
return policy.createHTML(text);
|
|
@@ -828,7 +826,7 @@ class PopsDOMUtilsEvent {
|
|
|
828
826
|
* @param option
|
|
829
827
|
*/
|
|
830
828
|
function getOption(args, startIndex, option) {
|
|
831
|
-
|
|
829
|
+
const currentParam = args[startIndex];
|
|
832
830
|
if (typeof currentParam === "boolean") {
|
|
833
831
|
option.capture = currentParam;
|
|
834
832
|
if (typeof args[startIndex + 1] === "boolean") {
|
|
@@ -850,8 +848,9 @@ class PopsDOMUtilsEvent {
|
|
|
850
848
|
}
|
|
851
849
|
return option;
|
|
852
850
|
}
|
|
853
|
-
|
|
854
|
-
|
|
851
|
+
const DOMUtilsContext = this;
|
|
852
|
+
// eslint-disable-next-line prefer-rest-params
|
|
853
|
+
const args = arguments;
|
|
855
854
|
if (typeof element === "string") {
|
|
856
855
|
element = DOMUtilsContext.selectorAll(element);
|
|
857
856
|
}
|
|
@@ -927,14 +926,14 @@ class PopsDOMUtilsEvent {
|
|
|
927
926
|
totalParent = PopsCore.document.documentElement;
|
|
928
927
|
}
|
|
929
928
|
}
|
|
930
|
-
|
|
929
|
+
const findValue = selectorList.find((selectorItem) => {
|
|
931
930
|
// 判断目标元素是否匹配选择器
|
|
932
931
|
if (DOMUtilsContext.matches(eventTarget, selectorItem)) {
|
|
933
932
|
/* 当前目标可以被selector所匹配到 */
|
|
934
933
|
return true;
|
|
935
934
|
}
|
|
936
935
|
/* 在上层与主元素之间寻找可以被selector所匹配到的 */
|
|
937
|
-
|
|
936
|
+
const $closestMatches = DOMUtilsContext.closest(eventTarget, selectorItem);
|
|
938
937
|
if ($closestMatches && totalParent?.contains($closestMatches)) {
|
|
939
938
|
eventTarget = $closestMatches;
|
|
940
939
|
return true;
|
|
@@ -950,7 +949,9 @@ class PopsDOMUtilsEvent {
|
|
|
950
949
|
},
|
|
951
950
|
});
|
|
952
951
|
}
|
|
953
|
-
catch
|
|
952
|
+
catch {
|
|
953
|
+
// 忽略
|
|
954
|
+
}
|
|
954
955
|
listenerCallBack.call(eventTarget, event, eventTarget);
|
|
955
956
|
checkOptionOnceToRemoveEventListener();
|
|
956
957
|
}
|
|
@@ -965,7 +966,7 @@ class PopsDOMUtilsEvent {
|
|
|
965
966
|
eventTypeList.forEach((eventName) => {
|
|
966
967
|
elementItem.addEventListener(eventName, domUtilsEventCallBack, listenerOption);
|
|
967
968
|
/* 获取对象上的事件 */
|
|
968
|
-
|
|
969
|
+
const elementEvents = Reflect.get(elementItem, SymbolEvents) || {};
|
|
969
970
|
/* 初始化对象上的xx事件 */
|
|
970
971
|
elementEvents[eventName] = elementEvents[eventName] || [];
|
|
971
972
|
elementEvents[eventName].push({
|
|
@@ -987,7 +988,7 @@ class PopsDOMUtilsEvent {
|
|
|
987
988
|
* @param option
|
|
988
989
|
*/
|
|
989
990
|
function getOption(args1, startIndex, option) {
|
|
990
|
-
|
|
991
|
+
const currentParam = args1[startIndex];
|
|
991
992
|
if (typeof currentParam === "boolean") {
|
|
992
993
|
option.capture = currentParam;
|
|
993
994
|
}
|
|
@@ -996,8 +997,9 @@ class PopsDOMUtilsEvent {
|
|
|
996
997
|
}
|
|
997
998
|
return option;
|
|
998
999
|
}
|
|
999
|
-
|
|
1000
|
-
|
|
1000
|
+
const DOMUtilsContext = this;
|
|
1001
|
+
// eslint-disable-next-line prefer-rest-params
|
|
1002
|
+
const args = arguments;
|
|
1001
1003
|
if (typeof element === "string") {
|
|
1002
1004
|
element = DOMUtilsContext.selectorAll(element);
|
|
1003
1005
|
}
|
|
@@ -1059,14 +1061,14 @@ class PopsDOMUtilsEvent {
|
|
|
1059
1061
|
}
|
|
1060
1062
|
elementList.forEach((elementItem) => {
|
|
1061
1063
|
/* 获取对象上的事件 */
|
|
1062
|
-
|
|
1064
|
+
const elementEvents = Reflect.get(elementItem, SymbolEvents) || {};
|
|
1063
1065
|
eventTypeList.forEach((eventName) => {
|
|
1064
1066
|
let handlers = elementEvents[eventName] || [];
|
|
1065
1067
|
if (typeof filter === "function") {
|
|
1066
1068
|
handlers = handlers.filter(filter);
|
|
1067
1069
|
}
|
|
1068
1070
|
for (let index = 0; index < handlers.length; index++) {
|
|
1069
|
-
|
|
1071
|
+
const handler = handlers[index];
|
|
1070
1072
|
let flag = true;
|
|
1071
1073
|
if (flag && listenerCallBack && handler.originCallBack !== listenerCallBack) {
|
|
1072
1074
|
// callback不同
|
|
@@ -1126,10 +1128,10 @@ class PopsDOMUtilsEvent {
|
|
|
1126
1128
|
if (!__symbolEvents.toString().startsWith("Symbol(events_")) {
|
|
1127
1129
|
return;
|
|
1128
1130
|
}
|
|
1129
|
-
|
|
1130
|
-
|
|
1131
|
+
const elementEvents = elementItem[__symbolEvents] || {};
|
|
1132
|
+
const iterEventNameList = eventTypeList.length ? eventTypeList : Object.keys(elementEvents);
|
|
1131
1133
|
iterEventNameList.forEach((eventName) => {
|
|
1132
|
-
|
|
1134
|
+
const handlers = elementEvents[eventName];
|
|
1133
1135
|
if (!handlers) {
|
|
1134
1136
|
return;
|
|
1135
1137
|
}
|
|
@@ -1169,7 +1171,7 @@ class PopsDOMUtilsEvent {
|
|
|
1169
1171
|
return false;
|
|
1170
1172
|
}
|
|
1171
1173
|
}
|
|
1172
|
-
catch
|
|
1174
|
+
catch {
|
|
1173
1175
|
return false;
|
|
1174
1176
|
}
|
|
1175
1177
|
}
|
|
@@ -1180,7 +1182,7 @@ class PopsDOMUtilsEvent {
|
|
|
1180
1182
|
removeDomReadyListener();
|
|
1181
1183
|
callback();
|
|
1182
1184
|
}
|
|
1183
|
-
|
|
1185
|
+
const targetList = [
|
|
1184
1186
|
{
|
|
1185
1187
|
target: PopsCore.document,
|
|
1186
1188
|
eventType: "DOMContentLoaded",
|
|
@@ -1197,7 +1199,7 @@ class PopsDOMUtilsEvent {
|
|
|
1197
1199
|
*/
|
|
1198
1200
|
function addDomReadyListener() {
|
|
1199
1201
|
for (let index = 0; index < targetList.length; index++) {
|
|
1200
|
-
|
|
1202
|
+
const item = targetList[index];
|
|
1201
1203
|
that.on(item.target, item.eventType, item.callback);
|
|
1202
1204
|
}
|
|
1203
1205
|
}
|
|
@@ -1206,7 +1208,7 @@ class PopsDOMUtilsEvent {
|
|
|
1206
1208
|
*/
|
|
1207
1209
|
function removeDomReadyListener() {
|
|
1208
1210
|
for (let index = 0; index < targetList.length; index++) {
|
|
1209
|
-
|
|
1211
|
+
const item = targetList[index];
|
|
1210
1212
|
that.off(item.target, item.eventType, item.callback);
|
|
1211
1213
|
}
|
|
1212
1214
|
}
|
|
@@ -1257,7 +1259,7 @@ class PopsDOMUtilsEvent {
|
|
|
1257
1259
|
}
|
|
1258
1260
|
elementList.forEach((elementItem) => {
|
|
1259
1261
|
/* 获取对象上的事件 */
|
|
1260
|
-
|
|
1262
|
+
const events = elementItem[SymbolEvents] || {};
|
|
1261
1263
|
eventTypeList.forEach((_eventType_) => {
|
|
1262
1264
|
let event = null;
|
|
1263
1265
|
if (details && details instanceof Event) {
|
|
@@ -1297,7 +1299,7 @@ class PopsDOMUtilsEvent {
|
|
|
1297
1299
|
* })
|
|
1298
1300
|
* */
|
|
1299
1301
|
click(element, handler, details, useDispatchToTriggerEvent) {
|
|
1300
|
-
|
|
1302
|
+
const DOMUtilsContext = this;
|
|
1301
1303
|
if (typeof element === "string") {
|
|
1302
1304
|
element = PopsCore.document.querySelector(element);
|
|
1303
1305
|
}
|
|
@@ -1326,7 +1328,7 @@ class PopsDOMUtilsEvent {
|
|
|
1326
1328
|
* })
|
|
1327
1329
|
* */
|
|
1328
1330
|
blur(element, handler, details, useDispatchToTriggerEvent) {
|
|
1329
|
-
|
|
1331
|
+
const DOMUtilsContext = this;
|
|
1330
1332
|
if (typeof element === "string") {
|
|
1331
1333
|
element = PopsCore.document.querySelector(element);
|
|
1332
1334
|
}
|
|
@@ -1355,7 +1357,7 @@ class PopsDOMUtilsEvent {
|
|
|
1355
1357
|
* })
|
|
1356
1358
|
* */
|
|
1357
1359
|
focus(element, handler, details, useDispatchToTriggerEvent) {
|
|
1358
|
-
|
|
1360
|
+
const DOMUtilsContext = this;
|
|
1359
1361
|
if (typeof element === "string") {
|
|
1360
1362
|
element = PopsCore.document.querySelector(element);
|
|
1361
1363
|
}
|
|
@@ -1384,7 +1386,7 @@ class PopsDOMUtilsEvent {
|
|
|
1384
1386
|
* })
|
|
1385
1387
|
*/
|
|
1386
1388
|
hover(element, handler, option) {
|
|
1387
|
-
|
|
1389
|
+
const DOMUtilsContext = this;
|
|
1388
1390
|
if (typeof element === "string") {
|
|
1389
1391
|
element = PopsCore.document.querySelector(element);
|
|
1390
1392
|
}
|
|
@@ -1410,7 +1412,7 @@ class PopsDOMUtilsEvent {
|
|
|
1410
1412
|
* })
|
|
1411
1413
|
*/
|
|
1412
1414
|
keyup(target, handler, option) {
|
|
1413
|
-
|
|
1415
|
+
const DOMUtilsContext = this;
|
|
1414
1416
|
if (target == null) {
|
|
1415
1417
|
return;
|
|
1416
1418
|
}
|
|
@@ -1435,7 +1437,7 @@ class PopsDOMUtilsEvent {
|
|
|
1435
1437
|
* })
|
|
1436
1438
|
*/
|
|
1437
1439
|
keydown(target, handler, option) {
|
|
1438
|
-
|
|
1440
|
+
const DOMUtilsContext = this;
|
|
1439
1441
|
if (target == null) {
|
|
1440
1442
|
return;
|
|
1441
1443
|
}
|
|
@@ -1460,7 +1462,7 @@ class PopsDOMUtilsEvent {
|
|
|
1460
1462
|
* })
|
|
1461
1463
|
*/
|
|
1462
1464
|
keypress(target, handler, option) {
|
|
1463
|
-
|
|
1465
|
+
const DOMUtilsContext = this;
|
|
1464
1466
|
if (target == null) {
|
|
1465
1467
|
return;
|
|
1466
1468
|
}
|
|
@@ -1481,6 +1483,7 @@ class PopsDOMUtilsEvent {
|
|
|
1481
1483
|
}
|
|
1482
1484
|
if (arguments.length === 1) {
|
|
1483
1485
|
/* 直接阻止事件 */
|
|
1486
|
+
// eslint-disable-next-line prefer-rest-params
|
|
1484
1487
|
return stopEvent(arguments[0]);
|
|
1485
1488
|
}
|
|
1486
1489
|
else {
|
|
@@ -1505,32 +1508,28 @@ class PopsDOMUtilsEvent {
|
|
|
1505
1508
|
return $ele?.innerHTML?.trim() === "";
|
|
1506
1509
|
});
|
|
1507
1510
|
}
|
|
1508
|
-
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) ||
|
|
1509
|
-
selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1511
|
+
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) || selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1510
1512
|
// contains 语法
|
|
1511
|
-
|
|
1512
|
-
|
|
1513
|
+
const textMatch = selector.match(/:contains\(("|')(.*)("|')\)$/i);
|
|
1514
|
+
const text = textMatch[2];
|
|
1513
1515
|
selector = selector.replace(/:contains\(("|')(.*)("|')\)$/gi, "");
|
|
1514
1516
|
return Array.from(PopsCore.document.querySelectorAll(selector)).filter(($ele) => {
|
|
1515
|
-
// @ts-ignore
|
|
1516
1517
|
return ($ele?.textContent || $ele?.innerText)?.includes(text);
|
|
1517
1518
|
});
|
|
1518
1519
|
}
|
|
1519
|
-
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) ||
|
|
1520
|
-
selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1520
|
+
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) || selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1521
1521
|
// regexp 语法
|
|
1522
|
-
|
|
1522
|
+
const textMatch = selector.match(/:regexp\(("|')(.*)("|')\)$/i);
|
|
1523
1523
|
let pattern = textMatch[2];
|
|
1524
|
-
|
|
1524
|
+
const flagMatch = pattern.match(/("|'),[\s]*("|')([igm]{0,3})$/i);
|
|
1525
1525
|
let flags = "";
|
|
1526
1526
|
if (flagMatch) {
|
|
1527
1527
|
pattern = pattern.replace(/("|'),[\s]*("|')([igm]{0,3})$/gi, "");
|
|
1528
1528
|
flags = flagMatch[3];
|
|
1529
1529
|
}
|
|
1530
|
-
|
|
1530
|
+
const regexp = new RegExp(pattern, flags);
|
|
1531
1531
|
selector = selector.replace(/:regexp\(("|')(.*)("|')\)$/gi, "");
|
|
1532
1532
|
return Array.from(PopsCore.document.querySelectorAll(selector)).filter(($ele) => {
|
|
1533
|
-
// @ts-ignore
|
|
1534
1533
|
return Boolean(($ele?.textContent || $ele?.innerText)?.match(regexp));
|
|
1535
1534
|
});
|
|
1536
1535
|
}
|
|
@@ -1570,33 +1569,29 @@ class PopsDOMUtilsEvent {
|
|
|
1570
1569
|
selector = selector.replace(/:empty$/gi, "");
|
|
1571
1570
|
return $el.matches(selector) && $el?.innerHTML?.trim() === "";
|
|
1572
1571
|
}
|
|
1573
|
-
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) ||
|
|
1574
|
-
selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1572
|
+
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) || selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1575
1573
|
// contains 语法
|
|
1576
|
-
|
|
1577
|
-
|
|
1574
|
+
const textMatch = selector.match(/:contains\(("|')(.*)("|')\)$/i);
|
|
1575
|
+
const text = textMatch[2];
|
|
1578
1576
|
selector = selector.replace(/:contains\(("|')(.*)("|')\)$/gi, "");
|
|
1579
|
-
// @ts-ignore
|
|
1580
1577
|
let content = $el?.textContent || $el?.innerText;
|
|
1581
1578
|
if (typeof content !== "string") {
|
|
1582
1579
|
content = "";
|
|
1583
1580
|
}
|
|
1584
1581
|
return $el.matches(selector) && content?.includes(text);
|
|
1585
1582
|
}
|
|
1586
|
-
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) ||
|
|
1587
|
-
selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1583
|
+
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) || selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1588
1584
|
// regexp 语法
|
|
1589
|
-
|
|
1585
|
+
const textMatch = selector.match(/:regexp\(("|')(.*)("|')\)$/i);
|
|
1590
1586
|
let pattern = textMatch[2];
|
|
1591
|
-
|
|
1587
|
+
const flagMatch = pattern.match(/("|'),[\s]*("|')([igm]{0,3})$/i);
|
|
1592
1588
|
let flags = "";
|
|
1593
1589
|
if (flagMatch) {
|
|
1594
1590
|
pattern = pattern.replace(/("|'),[\s]*("|')([igm]{0,3})$/gi, "");
|
|
1595
1591
|
flags = flagMatch[3];
|
|
1596
1592
|
}
|
|
1597
|
-
|
|
1593
|
+
const regexp = new RegExp(pattern, flags);
|
|
1598
1594
|
selector = selector.replace(/:regexp\(("|')(.*)("|')\)$/gi, "");
|
|
1599
|
-
// @ts-ignore
|
|
1600
1595
|
let content = $el?.textContent || $el?.innerText;
|
|
1601
1596
|
if (typeof content !== "string") {
|
|
1602
1597
|
content = "";
|
|
@@ -1613,45 +1608,41 @@ class PopsDOMUtilsEvent {
|
|
|
1613
1608
|
if (selector.match(/[^\s]{1}:empty$/gi)) {
|
|
1614
1609
|
// empty 语法
|
|
1615
1610
|
selector = selector.replace(/:empty$/gi, "");
|
|
1616
|
-
|
|
1611
|
+
const $closest = $el?.closest(selector);
|
|
1617
1612
|
if ($closest && $closest?.innerHTML?.trim() === "") {
|
|
1618
1613
|
return $closest;
|
|
1619
1614
|
}
|
|
1620
1615
|
return null;
|
|
1621
1616
|
}
|
|
1622
|
-
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) ||
|
|
1623
|
-
selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1617
|
+
else if (selector.match(/[^\s]{1}:contains\("(.*)"\)$/i) || selector.match(/[^\s]{1}:contains\('(.*)'\)$/i)) {
|
|
1624
1618
|
// contains 语法
|
|
1625
|
-
|
|
1626
|
-
|
|
1619
|
+
const textMatch = selector.match(/:contains\(("|')(.*)("|')\)$/i);
|
|
1620
|
+
const text = textMatch[2];
|
|
1627
1621
|
selector = selector.replace(/:contains\(("|')(.*)("|')\)$/gi, "");
|
|
1628
|
-
|
|
1622
|
+
const $closest = $el?.closest(selector);
|
|
1629
1623
|
if ($closest) {
|
|
1630
|
-
|
|
1631
|
-
let content = $el?.textContent || $el?.innerText;
|
|
1624
|
+
const content = $el?.textContent || $el?.innerText;
|
|
1632
1625
|
if (typeof content === "string" && content.includes(text)) {
|
|
1633
1626
|
return $closest;
|
|
1634
1627
|
}
|
|
1635
1628
|
}
|
|
1636
1629
|
return null;
|
|
1637
1630
|
}
|
|
1638
|
-
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) ||
|
|
1639
|
-
selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1631
|
+
else if (selector.match(/[^\s]{1}:regexp\("(.*)"\)$/i) || selector.match(/[^\s]{1}:regexp\('(.*)'\)$/i)) {
|
|
1640
1632
|
// regexp 语法
|
|
1641
|
-
|
|
1633
|
+
const textMatch = selector.match(/:regexp\(("|')(.*)("|')\)$/i);
|
|
1642
1634
|
let pattern = textMatch[2];
|
|
1643
|
-
|
|
1635
|
+
const flagMatch = pattern.match(/("|'),[\s]*("|')([igm]{0,3})$/i);
|
|
1644
1636
|
let flags = "";
|
|
1645
1637
|
if (flagMatch) {
|
|
1646
1638
|
pattern = pattern.replace(/("|'),[\s]*("|')([igm]{0,3})$/gi, "");
|
|
1647
1639
|
flags = flagMatch[3];
|
|
1648
1640
|
}
|
|
1649
|
-
|
|
1641
|
+
const regexp = new RegExp(pattern, flags);
|
|
1650
1642
|
selector = selector.replace(/:regexp\(("|')(.*)("|')\)$/gi, "");
|
|
1651
|
-
|
|
1643
|
+
const $closest = $el?.closest(selector);
|
|
1652
1644
|
if ($closest) {
|
|
1653
|
-
|
|
1654
|
-
let content = $el?.textContent || $el?.innerText;
|
|
1645
|
+
const content = $el?.textContent || $el?.innerText;
|
|
1655
1646
|
if (typeof content === "string" && content.match(regexp)) {
|
|
1656
1647
|
return $closest;
|
|
1657
1648
|
}
|
|
@@ -1660,7 +1651,7 @@ class PopsDOMUtilsEvent {
|
|
|
1660
1651
|
}
|
|
1661
1652
|
else {
|
|
1662
1653
|
// 普通语法
|
|
1663
|
-
|
|
1654
|
+
const $closest = $el?.closest(selector);
|
|
1664
1655
|
return $closest;
|
|
1665
1656
|
}
|
|
1666
1657
|
}
|
|
@@ -1680,13 +1671,13 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1680
1671
|
* @param calcScroll 计算滚动距离
|
|
1681
1672
|
*/
|
|
1682
1673
|
offset(element, calcScroll = true) {
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1674
|
+
const rect = element.getBoundingClientRect();
|
|
1675
|
+
const win = element.ownerDocument.defaultView;
|
|
1676
|
+
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);
|
|
1686
1677
|
return resultRect;
|
|
1687
1678
|
}
|
|
1688
1679
|
width(element, isShow = false, parent) {
|
|
1689
|
-
|
|
1680
|
+
const DOMUtilsContext = this;
|
|
1690
1681
|
if (typeof element === "string") {
|
|
1691
1682
|
element = PopsCore.document.querySelector(element);
|
|
1692
1683
|
}
|
|
@@ -1711,11 +1702,11 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1711
1702
|
}
|
|
1712
1703
|
/* 如果从css里获取到的值不是大于0 可能是auto 则通过offsetWidth来进行计算 */
|
|
1713
1704
|
if (element.offsetWidth > 0) {
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1705
|
+
const borderLeftWidth = popsDOMUtils.getStyleValue(element, "borderLeftWidth");
|
|
1706
|
+
const borderRightWidth = popsDOMUtils.getStyleValue(element, "borderRightWidth");
|
|
1707
|
+
const paddingLeft = popsDOMUtils.getStyleValue(element, "paddingLeft");
|
|
1708
|
+
const paddingRight = popsDOMUtils.getStyleValue(element, "paddingRight");
|
|
1709
|
+
const backHeight = parseFloat(element.offsetWidth.toString()) -
|
|
1719
1710
|
parseFloat(borderLeftWidth.toString()) -
|
|
1720
1711
|
parseFloat(borderRightWidth.toString()) -
|
|
1721
1712
|
parseFloat(paddingLeft.toString()) -
|
|
@@ -1727,14 +1718,14 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1727
1718
|
else {
|
|
1728
1719
|
/* 未显示 */
|
|
1729
1720
|
element = element;
|
|
1730
|
-
|
|
1731
|
-
|
|
1721
|
+
const { cloneNode, recovery } = popsDOMUtils.showElement(element, parent);
|
|
1722
|
+
const width = DOMUtilsContext.width(cloneNode, true, parent);
|
|
1732
1723
|
recovery();
|
|
1733
1724
|
return width;
|
|
1734
1725
|
}
|
|
1735
1726
|
}
|
|
1736
1727
|
height(element, isShow = false, parent) {
|
|
1737
|
-
|
|
1728
|
+
const DOMUtilsContext = this;
|
|
1738
1729
|
if (popsUtils.isWin(element)) {
|
|
1739
1730
|
return PopsCore.window.document.documentElement.clientHeight;
|
|
1740
1731
|
}
|
|
@@ -1759,11 +1750,11 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1759
1750
|
}
|
|
1760
1751
|
/* 如果从css里获取到的值不是大于0 可能是auto 则通过offsetHeight来进行计算 */
|
|
1761
1752
|
if (element.offsetHeight > 0) {
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1753
|
+
const borderTopWidth = popsDOMUtils.getStyleValue(element, "borderTopWidth");
|
|
1754
|
+
const borderBottomWidth = popsDOMUtils.getStyleValue(element, "borderBottomWidth");
|
|
1755
|
+
const paddingTop = popsDOMUtils.getStyleValue(element, "paddingTop");
|
|
1756
|
+
const paddingBottom = popsDOMUtils.getStyleValue(element, "paddingBottom");
|
|
1757
|
+
const backHeight = parseFloat(element.offsetHeight.toString()) -
|
|
1767
1758
|
parseFloat(borderTopWidth.toString()) -
|
|
1768
1759
|
parseFloat(borderBottomWidth.toString()) -
|
|
1769
1760
|
parseFloat(paddingTop.toString()) -
|
|
@@ -1775,14 +1766,14 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1775
1766
|
else {
|
|
1776
1767
|
/* 未显示 */
|
|
1777
1768
|
element = element;
|
|
1778
|
-
|
|
1779
|
-
|
|
1769
|
+
const { cloneNode, recovery } = popsDOMUtils.showElement(element, parent);
|
|
1770
|
+
const height = DOMUtilsContext.height(cloneNode, true, parent);
|
|
1780
1771
|
recovery();
|
|
1781
1772
|
return height;
|
|
1782
1773
|
}
|
|
1783
1774
|
}
|
|
1784
1775
|
outerWidth(element, isShow = false, parent) {
|
|
1785
|
-
|
|
1776
|
+
const DOMUtilsContext = this;
|
|
1786
1777
|
if (popsUtils.isWin(element)) {
|
|
1787
1778
|
return PopsCore.window.innerWidth;
|
|
1788
1779
|
}
|
|
@@ -1794,40 +1785,36 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1794
1785
|
}
|
|
1795
1786
|
element = element;
|
|
1796
1787
|
if (isShow || (!isShow && popsDOMUtils.isShow(element))) {
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1788
|
+
const style = getComputedStyle(element, null);
|
|
1789
|
+
const marginLeft = popsDOMUtils.getStyleValue(style, "marginLeft");
|
|
1790
|
+
const marginRight = popsDOMUtils.getStyleValue(style, "marginRight");
|
|
1800
1791
|
return element.offsetWidth + marginLeft + marginRight;
|
|
1801
1792
|
}
|
|
1802
1793
|
else {
|
|
1803
|
-
|
|
1804
|
-
|
|
1794
|
+
const { cloneNode, recovery } = popsDOMUtils.showElement(element, parent);
|
|
1795
|
+
const outerWidth = DOMUtilsContext.outerWidth(cloneNode, true, parent);
|
|
1805
1796
|
recovery();
|
|
1806
1797
|
return outerWidth;
|
|
1807
1798
|
}
|
|
1808
1799
|
}
|
|
1809
1800
|
outerHeight(element, isShow = false, parent) {
|
|
1810
|
-
|
|
1801
|
+
const DOMUtilsContext = this;
|
|
1811
1802
|
if (popsUtils.isWin(element)) {
|
|
1812
1803
|
return PopsCore.window.innerHeight;
|
|
1813
1804
|
}
|
|
1814
1805
|
if (typeof element === "string") {
|
|
1815
1806
|
element = PopsCore.document.querySelector(element);
|
|
1816
1807
|
}
|
|
1817
|
-
if (element == null) {
|
|
1818
|
-
// @ts-ignore
|
|
1819
|
-
return;
|
|
1820
|
-
}
|
|
1821
1808
|
element = element;
|
|
1822
1809
|
if (isShow || (!isShow && popsDOMUtils.isShow(element))) {
|
|
1823
|
-
|
|
1824
|
-
|
|
1825
|
-
|
|
1810
|
+
const style = getComputedStyle(element, null);
|
|
1811
|
+
const marginTop = popsDOMUtils.getStyleValue(style, "marginTop");
|
|
1812
|
+
const marginBottom = popsDOMUtils.getStyleValue(style, "marginBottom");
|
|
1826
1813
|
return element.offsetHeight + marginTop + marginBottom;
|
|
1827
1814
|
}
|
|
1828
1815
|
else {
|
|
1829
|
-
|
|
1830
|
-
|
|
1816
|
+
const { cloneNode, recovery } = popsDOMUtils.showElement(element, parent);
|
|
1817
|
+
const outerHeight = DOMUtilsContext.outerHeight(cloneNode, true, parent);
|
|
1831
1818
|
recovery();
|
|
1832
1819
|
return outerHeight;
|
|
1833
1820
|
}
|
|
@@ -1890,13 +1877,11 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1890
1877
|
* 把纯数字没有px的加上
|
|
1891
1878
|
*/
|
|
1892
1879
|
function handlePixe(propertyName, propertyValue) {
|
|
1893
|
-
|
|
1880
|
+
const allowAddPixe = ["width", "height", "top", "left", "right", "bottom", "font-size"];
|
|
1894
1881
|
if (typeof propertyValue === "number") {
|
|
1895
1882
|
propertyValue = propertyValue.toString();
|
|
1896
1883
|
}
|
|
1897
|
-
if (typeof propertyValue === "string" &&
|
|
1898
|
-
allowAddPixe.includes(propertyName) &&
|
|
1899
|
-
propertyValue.match(/[0-9]$/gi)) {
|
|
1884
|
+
if (typeof propertyValue === "string" && allowAddPixe.includes(propertyName) && propertyValue.match(/[0-9]$/gi)) {
|
|
1900
1885
|
propertyValue = propertyValue + "px";
|
|
1901
1886
|
}
|
|
1902
1887
|
return propertyValue;
|
|
@@ -1907,7 +1892,7 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1907
1892
|
if (element == null) {
|
|
1908
1893
|
return;
|
|
1909
1894
|
}
|
|
1910
|
-
|
|
1895
|
+
const setStyleProperty = (propertyName, propertyValue) => {
|
|
1911
1896
|
if (typeof propertyValue === "string" && propertyValue.trim().endsWith("!important")) {
|
|
1912
1897
|
propertyValue = propertyValue
|
|
1913
1898
|
.trim()
|
|
@@ -1929,8 +1914,8 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1929
1914
|
}
|
|
1930
1915
|
}
|
|
1931
1916
|
else if (typeof property === "object") {
|
|
1932
|
-
for (
|
|
1933
|
-
|
|
1917
|
+
for (const prop in property) {
|
|
1918
|
+
const value = property[prop];
|
|
1934
1919
|
setStyleProperty(prop, value);
|
|
1935
1920
|
}
|
|
1936
1921
|
}
|
|
@@ -1960,7 +1945,7 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1960
1945
|
property,
|
|
1961
1946
|
/** 自定义属性 */
|
|
1962
1947
|
attributes) {
|
|
1963
|
-
|
|
1948
|
+
const tempElement = PopsCore.document.createElement(tagName);
|
|
1964
1949
|
if (typeof property === "string") {
|
|
1965
1950
|
PopsSafeUtils.setSafeHTML(tempElement, property);
|
|
1966
1951
|
return tempElement;
|
|
@@ -1972,13 +1957,12 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
1972
1957
|
attributes = {};
|
|
1973
1958
|
}
|
|
1974
1959
|
Object.keys(property).forEach((key) => {
|
|
1975
|
-
|
|
1960
|
+
const value = property[key];
|
|
1976
1961
|
if (key === "innerHTML") {
|
|
1977
1962
|
PopsSafeUtils.setSafeHTML(tempElement, value);
|
|
1978
1963
|
return;
|
|
1979
1964
|
}
|
|
1980
|
-
|
|
1981
|
-
tempElement[key] = value;
|
|
1965
|
+
Reflect.set(tempElement, key, value);
|
|
1982
1966
|
});
|
|
1983
1967
|
Object.keys(attributes).forEach((key) => {
|
|
1984
1968
|
let value = attributes[key];
|
|
@@ -2002,7 +1986,7 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2002
1986
|
parseTextToDOM(elementString) {
|
|
2003
1987
|
/* 去除前后的换行和空格 */
|
|
2004
1988
|
elementString = elementString.replace(/^[\n|\s]*/g, "").replace(/[\n|\s]*$/g, "");
|
|
2005
|
-
|
|
1989
|
+
const targetElement = this.createElement("div", {
|
|
2006
1990
|
innerHTML: elementString,
|
|
2007
1991
|
});
|
|
2008
1992
|
return targetElement.firstChild;
|
|
@@ -2040,16 +2024,21 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2040
2024
|
selectionEnd = Math.min(input.value.length, selectionEnd);
|
|
2041
2025
|
// If available (thus IE), use the createTextRange method
|
|
2042
2026
|
if (typeof input.createTextRange == "function") {
|
|
2043
|
-
|
|
2027
|
+
const range = input.createTextRange();
|
|
2044
2028
|
range.collapse(true);
|
|
2045
2029
|
range.moveStart("character", selectionStart);
|
|
2046
2030
|
range.moveEnd("character", selectionEnd - selectionStart);
|
|
2047
2031
|
return range.getBoundingClientRect();
|
|
2048
2032
|
}
|
|
2049
2033
|
// createTextRange is not supported, create a fake text range
|
|
2050
|
-
|
|
2034
|
+
const offset = getInputOffset();
|
|
2035
|
+
let topPos = offset.top;
|
|
2036
|
+
let leftPos = offset.left;
|
|
2037
|
+
const width = getInputCSS("width", true);
|
|
2038
|
+
const height = getInputCSS("height", true);
|
|
2051
2039
|
// Styles to simulate a node in an input field
|
|
2052
|
-
|
|
2040
|
+
let cssDefaultStyles = "white-space:pre;padding:0;margin:0;";
|
|
2041
|
+
const listOfModifiers = [
|
|
2053
2042
|
"direction",
|
|
2054
2043
|
"font-family",
|
|
2055
2044
|
"font-size",
|
|
@@ -2065,26 +2054,21 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2065
2054
|
"word-wrap",
|
|
2066
2055
|
"word-spacing",
|
|
2067
2056
|
];
|
|
2068
|
-
// @ts-ignore
|
|
2069
2057
|
topPos += getInputCSS("padding-top", true);
|
|
2070
|
-
// @ts-ignore
|
|
2071
2058
|
topPos += getInputCSS("border-top-width", true);
|
|
2072
|
-
// @ts-ignore
|
|
2073
2059
|
leftPos += getInputCSS("padding-left", true);
|
|
2074
|
-
// @ts-ignore
|
|
2075
2060
|
leftPos += getInputCSS("border-left-width", true);
|
|
2076
2061
|
leftPos += 1; //Seems to be necessary
|
|
2077
|
-
for (
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
cssDefaultStyles += property + ":" + getInputCSS(property) + ";";
|
|
2062
|
+
for (let i = 0; i < listOfModifiers.length; i++) {
|
|
2063
|
+
const property = listOfModifiers[i];
|
|
2064
|
+
cssDefaultStyles += property + ":" + getInputCSS(property, false) + ";";
|
|
2081
2065
|
}
|
|
2082
2066
|
// End of CSS variable checks
|
|
2083
2067
|
// 不能为空,不然获取不到高度
|
|
2084
|
-
|
|
2068
|
+
const text = input.value || "G", textLen = text.length, fakeClone = document.createElement("div");
|
|
2085
2069
|
if (selectionStart > 0)
|
|
2086
2070
|
appendPart(0, selectionStart);
|
|
2087
|
-
|
|
2071
|
+
const fakeRange = appendPart(selectionStart, selectionEnd);
|
|
2088
2072
|
if (textLen > selectionEnd)
|
|
2089
2073
|
appendPart(selectionEnd, textLen);
|
|
2090
2074
|
// Styles to inherit the font styles of the element
|
|
@@ -2096,7 +2080,7 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2096
2080
|
fakeClone.style.width = width + "px";
|
|
2097
2081
|
fakeClone.style.height = height + "px";
|
|
2098
2082
|
PopsCore.document.body.appendChild(fakeClone);
|
|
2099
|
-
|
|
2083
|
+
const returnValue = fakeRange.getBoundingClientRect(); //Get rect
|
|
2100
2084
|
if (!debug)
|
|
2101
2085
|
fakeClone.parentNode.removeChild(fakeClone); //Remove temp
|
|
2102
2086
|
return returnValue;
|
|
@@ -2107,7 +2091,7 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2107
2091
|
* @param end
|
|
2108
2092
|
*/
|
|
2109
2093
|
function appendPart(start, end) {
|
|
2110
|
-
|
|
2094
|
+
const span = document.createElement("span");
|
|
2111
2095
|
span.style.cssText = cssDefaultStyles; //Force styles to prevent unexpected results
|
|
2112
2096
|
span.textContent = text.substring(start, end);
|
|
2113
2097
|
fakeClone.appendChild(span);
|
|
@@ -2115,35 +2099,31 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2115
2099
|
}
|
|
2116
2100
|
// Computing offset position
|
|
2117
2101
|
function getInputOffset() {
|
|
2118
|
-
|
|
2102
|
+
const body = document.body, win = document.defaultView, docElem = document.documentElement, box = document.createElement("div");
|
|
2119
2103
|
box.style.paddingLeft = box.style.width = "1px";
|
|
2120
2104
|
body.appendChild(box);
|
|
2121
|
-
|
|
2105
|
+
const isBoxModel = box.offsetWidth == 2;
|
|
2122
2106
|
body.removeChild(box);
|
|
2123
|
-
|
|
2124
|
-
|
|
2125
|
-
var clientTop = docElem.clientTop || body.clientTop || 0, clientLeft = docElem.clientLeft || body.clientLeft || 0, scrollTop =
|
|
2126
|
-
// @ts-ignore
|
|
2127
|
-
win.pageYOffset || (isBoxModel && docElem.scrollTop) || body.scrollTop, scrollLeft =
|
|
2128
|
-
// @ts-ignore
|
|
2129
|
-
win.pageXOffset || (isBoxModel && docElem.scrollLeft) || body.scrollLeft;
|
|
2107
|
+
const boxRect = input.getBoundingClientRect();
|
|
2108
|
+
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;
|
|
2130
2109
|
return {
|
|
2131
|
-
|
|
2132
|
-
|
|
2133
|
-
// @ts-ignore
|
|
2134
|
-
left: box.left + scrollLeft - clientLeft,
|
|
2110
|
+
top: boxRect.top + scrollTop - clientTop,
|
|
2111
|
+
left: boxRect.left + scrollLeft - clientLeft,
|
|
2135
2112
|
};
|
|
2136
2113
|
}
|
|
2137
2114
|
/**
|
|
2138
2115
|
*
|
|
2139
2116
|
* @param prop
|
|
2140
2117
|
* @param isnumber
|
|
2141
|
-
* @returns
|
|
2142
2118
|
*/
|
|
2143
2119
|
function getInputCSS(prop, isnumber) {
|
|
2144
|
-
|
|
2145
|
-
|
|
2146
|
-
|
|
2120
|
+
const val = PopsCore.document.defaultView.getComputedStyle(input, null).getPropertyValue(prop);
|
|
2121
|
+
if (isnumber) {
|
|
2122
|
+
return parseFloat(val);
|
|
2123
|
+
}
|
|
2124
|
+
else {
|
|
2125
|
+
return val;
|
|
2126
|
+
}
|
|
2147
2127
|
}
|
|
2148
2128
|
}
|
|
2149
2129
|
/**
|
|
@@ -2175,7 +2155,7 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2175
2155
|
}
|
|
2176
2156
|
parseHTML(html, useParser = false, isComplete = false) {
|
|
2177
2157
|
function parseHTMLByDOMParser() {
|
|
2178
|
-
|
|
2158
|
+
const parser = new DOMParser();
|
|
2179
2159
|
if (isComplete) {
|
|
2180
2160
|
return parser.parseFromString(html, "text/html");
|
|
2181
2161
|
}
|
|
@@ -2184,7 +2164,7 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2184
2164
|
}
|
|
2185
2165
|
}
|
|
2186
2166
|
function parseHTMLByCreateDom() {
|
|
2187
|
-
|
|
2167
|
+
const tempDIV = PopsCore.document.createElement("div");
|
|
2188
2168
|
PopsSafeUtils.setSafeHTML(tempDIV, html);
|
|
2189
2169
|
if (isComplete) {
|
|
2190
2170
|
return tempDIV;
|
|
@@ -2226,7 +2206,7 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2226
2206
|
}
|
|
2227
2207
|
if (Array.isArray(content) || content instanceof NodeList) {
|
|
2228
2208
|
/* 数组 */
|
|
2229
|
-
|
|
2209
|
+
const fragment = PopsCore.document.createDocumentFragment();
|
|
2230
2210
|
content.forEach((ele) => {
|
|
2231
2211
|
if (typeof ele === "string") {
|
|
2232
2212
|
ele = this.parseHTML(ele, true, false);
|
|
@@ -2276,11 +2256,11 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2276
2256
|
*/
|
|
2277
2257
|
showElement($ele, ownParent) {
|
|
2278
2258
|
/** 克隆元素 */
|
|
2279
|
-
|
|
2259
|
+
const $cloneNode = $ele.cloneNode(true);
|
|
2280
2260
|
$cloneNode.setAttribute("style", "visibility: hidden !important;display:block !important;");
|
|
2281
2261
|
let $parent = PopsCore.document.documentElement;
|
|
2282
2262
|
// 这里需要的是先获取元素的父节点,把元素同样添加到父节点中
|
|
2283
|
-
|
|
2263
|
+
const $root = $ele.getRootNode();
|
|
2284
2264
|
if (ownParent == null) {
|
|
2285
2265
|
if ($root == $ele) {
|
|
2286
2266
|
// 未添加到任意节点中,那么直接添加到页面中去
|
|
@@ -2328,7 +2308,7 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2328
2308
|
}
|
|
2329
2309
|
styles = view.getComputedStyle(element);
|
|
2330
2310
|
}
|
|
2331
|
-
|
|
2311
|
+
const value = parseFloat(styles[styleName]);
|
|
2332
2312
|
if (isNaN(value)) {
|
|
2333
2313
|
return 0;
|
|
2334
2314
|
}
|
|
@@ -2388,10 +2368,9 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2388
2368
|
* @returns
|
|
2389
2369
|
*/
|
|
2390
2370
|
getKeyFrames(sheet) {
|
|
2391
|
-
|
|
2371
|
+
const result = {};
|
|
2392
2372
|
Object.keys(sheet.cssRules).forEach((key) => {
|
|
2393
|
-
if (sheet.cssRules[key].type === 7 &&
|
|
2394
|
-
sheet.cssRules[key].name.startsWith("pops-anim-")) {
|
|
2373
|
+
if (sheet.cssRules[key].type === 7 && sheet.cssRules[key].name.startsWith("pops-anim-")) {
|
|
2395
2374
|
result[sheet.cssRules[key].name] = sheet.cssRules[key];
|
|
2396
2375
|
}
|
|
2397
2376
|
});
|
|
@@ -2415,7 +2394,7 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2415
2394
|
*/
|
|
2416
2395
|
str) => {
|
|
2417
2396
|
let hexs = "";
|
|
2418
|
-
|
|
2397
|
+
const reg = /^#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/;
|
|
2419
2398
|
if (!reg.test(str)) {
|
|
2420
2399
|
console.warn("输入错误的hex");
|
|
2421
2400
|
return "";
|
|
@@ -2442,12 +2421,12 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2442
2421
|
* 蓝色
|
|
2443
2422
|
*/
|
|
2444
2423
|
b) => {
|
|
2445
|
-
|
|
2424
|
+
const reg = /^\d{1,3}$/;
|
|
2446
2425
|
if (!reg.test(r) || !reg.test(g) || !reg.test(b)) {
|
|
2447
2426
|
console.warn("输入错误的rgb颜色值");
|
|
2448
2427
|
return "";
|
|
2449
2428
|
}
|
|
2450
|
-
|
|
2429
|
+
const hexs = [r.toString(16), g.toString(16), b.toString(16)];
|
|
2451
2430
|
for (let i = 0; i < 3; i++)
|
|
2452
2431
|
if (hexs[i].length == 1)
|
|
2453
2432
|
hexs[i] = `0${hexs[i]}`;
|
|
@@ -2465,12 +2444,12 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2465
2444
|
* 加深的程度,限0-1之间
|
|
2466
2445
|
*/
|
|
2467
2446
|
level) => {
|
|
2468
|
-
|
|
2447
|
+
const reg = /^#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/;
|
|
2469
2448
|
if (!reg.test(color)) {
|
|
2470
2449
|
console.warn("输入错误的hex颜色值");
|
|
2471
2450
|
return "";
|
|
2472
2451
|
}
|
|
2473
|
-
|
|
2452
|
+
const rgb = useChangeColor().hexToRgb(color);
|
|
2474
2453
|
for (let i = 0; i < 3; i++)
|
|
2475
2454
|
rgb[i] = Math.floor(rgb[i] * (1 - level));
|
|
2476
2455
|
return useChangeColor().rgbToHex(rgb[0], rgb[1], rgb[2]);
|
|
@@ -2487,12 +2466,12 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2487
2466
|
* 加深的程度,限0-1之间
|
|
2488
2467
|
*/
|
|
2489
2468
|
level) => {
|
|
2490
|
-
|
|
2469
|
+
const reg = /^#(?:[0-9A-Fa-f]{3}|[0-9A-Fa-f]{6}|[0-9A-Fa-f]{8})$/;
|
|
2491
2470
|
if (!reg.test(color)) {
|
|
2492
2471
|
console.warn("输入错误的hex颜色值");
|
|
2493
2472
|
return "";
|
|
2494
2473
|
}
|
|
2495
|
-
|
|
2474
|
+
const rgb = useChangeColor().hexToRgb(color);
|
|
2496
2475
|
for (let i = 0; i < 3; i++)
|
|
2497
2476
|
rgb[i] = Math.floor((255 - rgb[i]) * level + rgb[i]);
|
|
2498
2477
|
return useChangeColor().rgbToHex(rgb[0], rgb[1], rgb[2]);
|
|
@@ -2513,9 +2492,11 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2513
2492
|
getTransform(element) {
|
|
2514
2493
|
let transform_left = 0;
|
|
2515
2494
|
let transform_top = 0;
|
|
2516
|
-
|
|
2495
|
+
const elementTransform = PopsCore.globalThis.getComputedStyle(element).transform;
|
|
2517
2496
|
if (elementTransform !== "none" && elementTransform != null && elementTransform !== "") {
|
|
2518
|
-
|
|
2497
|
+
const elementTransformMatch = elementTransform.match(/\((.+)\)/);
|
|
2498
|
+
// eslint-disable-next-line @typescript-eslint/no-non-null-asserted-optional-chain
|
|
2499
|
+
const elementTransformSplit = elementTransformMatch?.[1]?.split?.(",");
|
|
2519
2500
|
transform_left = Math.abs(parseInt(elementTransformSplit[4]));
|
|
2520
2501
|
transform_top = Math.abs(parseInt(elementTransformSplit[5]));
|
|
2521
2502
|
}
|
|
@@ -2529,15 +2510,15 @@ class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
2529
2510
|
*/
|
|
2530
2511
|
onInput($el, callback, option) {
|
|
2531
2512
|
let isComposite = false;
|
|
2532
|
-
|
|
2513
|
+
const __callback = async (event) => {
|
|
2533
2514
|
if (isComposite)
|
|
2534
2515
|
return;
|
|
2535
2516
|
await callback(event);
|
|
2536
2517
|
};
|
|
2537
|
-
|
|
2518
|
+
const __composition_start_callback = () => {
|
|
2538
2519
|
isComposite = true;
|
|
2539
2520
|
};
|
|
2540
|
-
|
|
2521
|
+
const __composition_end_callback = () => {
|
|
2541
2522
|
isComposite = false;
|
|
2542
2523
|
this.trigger($el, "input", {
|
|
2543
2524
|
isComposite,
|
|
@@ -2581,10 +2562,10 @@ const PopsElementHandler = {
|
|
|
2581
2562
|
* @param zIndex
|
|
2582
2563
|
*/
|
|
2583
2564
|
createAnim(guid, type, config, html = "", bottomBtnHTML = "", zIndex) {
|
|
2584
|
-
|
|
2565
|
+
const __config = config;
|
|
2585
2566
|
let popsAnimStyle = "";
|
|
2586
2567
|
let popsStyle = "";
|
|
2587
|
-
|
|
2568
|
+
const popsPosition = __config.position || "";
|
|
2588
2569
|
if (config.zIndex != null) {
|
|
2589
2570
|
popsAnimStyle += `z-index: ${zIndex};`;
|
|
2590
2571
|
popsStyle += `z-index: ${zIndex};`;
|
|
@@ -2595,7 +2576,7 @@ const PopsElementHandler = {
|
|
|
2595
2576
|
if (__config.height != null) {
|
|
2596
2577
|
popsStyle += `height: ${__config.height};`;
|
|
2597
2578
|
}
|
|
2598
|
-
|
|
2579
|
+
const hasBottomBtn = bottomBtnHTML.trim() === "" ? false : true;
|
|
2599
2580
|
return /*html*/ `
|
|
2600
2581
|
<div class="pops-anim" anim="${__config.animation || ""}" style="${popsAnimStyle}" data-guid="${guid}">${config.style != null ? `<style tyle="text/css">${config.style}</style>` : ""}
|
|
2601
2582
|
<div class="pops ${config.class || ""}" data-bottom-btn="${hasBottomBtn}" type-value="${type}" style="${popsStyle}" position="${popsPosition}" data-guid="${guid}">${html}</div>
|
|
@@ -2610,14 +2591,14 @@ const PopsElementHandler = {
|
|
|
2610
2591
|
if (!config.btn) {
|
|
2611
2592
|
return "";
|
|
2612
2593
|
}
|
|
2613
|
-
|
|
2594
|
+
const confirm_config = config;
|
|
2614
2595
|
if (type !== "iframe" && !confirm_config.btn?.close?.enable) {
|
|
2615
2596
|
return "";
|
|
2616
2597
|
}
|
|
2617
2598
|
let resultHTML = "";
|
|
2618
2599
|
// let btnStyle = "";
|
|
2619
2600
|
let closeHTML = "";
|
|
2620
|
-
|
|
2601
|
+
const iframe_config = config;
|
|
2621
2602
|
if (type === "iframe" && iframe_config.topRightButton?.trim() !== "") {
|
|
2622
2603
|
/* iframe的 */
|
|
2623
2604
|
let topRightButtonHTML = "";
|
|
@@ -2667,7 +2648,7 @@ const PopsElementHandler = {
|
|
|
2667
2648
|
// 未设置btn参数
|
|
2668
2649
|
return "";
|
|
2669
2650
|
}
|
|
2670
|
-
|
|
2651
|
+
const confirm_config = config;
|
|
2671
2652
|
if (!(config.btn?.ok?.enable || confirm_config.btn?.cancel?.enable || confirm_config.btn?.other?.enable)) {
|
|
2672
2653
|
// 确定、取消、其它按钮都未启用直接返回
|
|
2673
2654
|
return "";
|
|
@@ -2693,7 +2674,7 @@ const PopsElementHandler = {
|
|
|
2693
2674
|
okButtonSizeClassName = "pops-button-" + config.btn.ok.size;
|
|
2694
2675
|
}
|
|
2695
2676
|
let okIconHTML = "";
|
|
2696
|
-
|
|
2677
|
+
const okIcon = confirm_config.btn.ok.icon;
|
|
2697
2678
|
if (okIcon !== "") {
|
|
2698
2679
|
// 判断图标是否是svg库内的
|
|
2699
2680
|
let iconHTML = "";
|
|
@@ -2726,7 +2707,7 @@ const PopsElementHandler = {
|
|
|
2726
2707
|
cancelButtonSizeClassName = "pops-button-" + confirm_config.btn.cancel.size;
|
|
2727
2708
|
}
|
|
2728
2709
|
let cancelIconHTML = "";
|
|
2729
|
-
|
|
2710
|
+
const cancelIcon = confirm_config.btn.cancel.icon;
|
|
2730
2711
|
if (cancelIcon !== "") {
|
|
2731
2712
|
let iconHTML = "";
|
|
2732
2713
|
// 判断图标是否是svg库内的
|
|
@@ -2759,7 +2740,7 @@ const PopsElementHandler = {
|
|
|
2759
2740
|
otherButtonSizeClassName = "pops-button-" + confirm_config.btn.other.size;
|
|
2760
2741
|
}
|
|
2761
2742
|
let otherIconHTML = "";
|
|
2762
|
-
|
|
2743
|
+
const otherIcon = confirm_config.btn.other.icon;
|
|
2763
2744
|
if (otherIcon !== "") {
|
|
2764
2745
|
let iconHTML = "";
|
|
2765
2746
|
// 判断图标是否是svg库内的
|
|
@@ -2819,37 +2800,37 @@ const PopsElementHandler = {
|
|
|
2819
2800
|
},
|
|
2820
2801
|
};
|
|
2821
2802
|
|
|
2822
|
-
var indexCSS = "@charset \"utf-8\";\n.pops * {\n
|
|
2803
|
+
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";
|
|
2823
2804
|
|
|
2824
|
-
var ninePalaceGridPositionCSS = ".pops[position=\"top_left\"] {\n
|
|
2805
|
+
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";
|
|
2825
2806
|
|
|
2826
|
-
var scrollbarCSS = "/* ::-webkit-scrollbar 是非标准的css */\n/* https://caniuse.com/?search=%20%3A%3A-webkit-scrollbar */\n.pops ::-webkit-scrollbar {\n
|
|
2807
|
+
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";
|
|
2827
2808
|
|
|
2828
|
-
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";
|
|
2809
|
+
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";
|
|
2829
2810
|
|
|
2830
|
-
var commonCSS = ".pops-flex-items-center {\n
|
|
2811
|
+
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";
|
|
2831
2812
|
|
|
2832
|
-
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";
|
|
2813
|
+
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";
|
|
2833
2814
|
|
|
2834
2815
|
var alertCSS = "";
|
|
2835
2816
|
|
|
2836
2817
|
var confirmCSS = "";
|
|
2837
2818
|
|
|
2838
|
-
var promptCSS = ".pops[type-value=\"prompt\"] {\n
|
|
2819
|
+
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";
|
|
2839
2820
|
|
|
2840
|
-
var loadingCSS = ".pops[type-value=\"loading\"] {\n
|
|
2821
|
+
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";
|
|
2841
2822
|
|
|
2842
|
-
var iframeCSS = ".pops[type-value=\"iframe\"] {\n
|
|
2823
|
+
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";
|
|
2843
2824
|
|
|
2844
|
-
var tooltipCSS = ".pops-tip {\n
|
|
2825
|
+
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";
|
|
2845
2826
|
|
|
2846
|
-
var drawerCSS = ".pops[type-value=\"drawer\"] {\n
|
|
2827
|
+
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";
|
|
2847
2828
|
|
|
2848
|
-
var folderCSS = ".pops-folder-list {\n
|
|
2829
|
+
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";
|
|
2849
2830
|
|
|
2850
|
-
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";
|
|
2831
|
+
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";
|
|
2851
2832
|
|
|
2852
|
-
var rightClickMenuCSS = ".pops-rightClickMenu {\n
|
|
2833
|
+
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";
|
|
2853
2834
|
|
|
2854
2835
|
const PopsCSS = {
|
|
2855
2836
|
/** 主CSS */
|
|
@@ -2896,7 +2877,7 @@ const PopsAnimation = {
|
|
|
2896
2877
|
if (!this.$flag.isInit) {
|
|
2897
2878
|
this.$flag.isInit = true;
|
|
2898
2879
|
/* 处理获取当前所有的动画名 */
|
|
2899
|
-
|
|
2880
|
+
const animationStyle = document.createElement("style");
|
|
2900
2881
|
PopsSafeUtils.setSafeHTML(animationStyle, PopsCSS.anim);
|
|
2901
2882
|
popsDOMUtils.appendHead(animationStyle);
|
|
2902
2883
|
this.$data = null;
|
|
@@ -2910,7 +2891,7 @@ const PopsAnimation = {
|
|
|
2910
2891
|
* 判断是否存在某个动画名
|
|
2911
2892
|
*/
|
|
2912
2893
|
hasAnim(name) {
|
|
2913
|
-
return this.$data
|
|
2894
|
+
return Object.prototype.hasOwnProperty.call(this.$data, name);
|
|
2914
2895
|
},
|
|
2915
2896
|
};
|
|
2916
2897
|
|
|
@@ -2953,7 +2934,6 @@ const PopsInstanceUtils = {
|
|
|
2953
2934
|
// 当前页面最大的z-index
|
|
2954
2935
|
let zIndex = 0;
|
|
2955
2936
|
// 当前的最大z-index的元素,调试使用
|
|
2956
|
-
// @ts-ignore
|
|
2957
2937
|
let maxZIndexNode = null;
|
|
2958
2938
|
/**
|
|
2959
2939
|
* 元素是否可见
|
|
@@ -2969,7 +2949,7 @@ const PopsInstanceUtils = {
|
|
|
2969
2949
|
*/
|
|
2970
2950
|
function queryMaxZIndex($ele) {
|
|
2971
2951
|
if (typeof ignoreCallBack === "function") {
|
|
2972
|
-
|
|
2952
|
+
const ignoreResult = ignoreCallBack($ele);
|
|
2973
2953
|
if (typeof ignoreResult === "boolean" && !ignoreResult) {
|
|
2974
2954
|
return;
|
|
2975
2955
|
}
|
|
@@ -2978,7 +2958,7 @@ const PopsInstanceUtils = {
|
|
|
2978
2958
|
const nodeStyle = PopsCore.window.getComputedStyle($ele);
|
|
2979
2959
|
/* 不对position为static和display为none的元素进行获取它们的z-index */
|
|
2980
2960
|
if (isVisibleNode(nodeStyle)) {
|
|
2981
|
-
|
|
2961
|
+
const nodeZIndex = parseInt(nodeStyle.zIndex);
|
|
2982
2962
|
if (!isNaN(nodeZIndex)) {
|
|
2983
2963
|
if (nodeZIndex > zIndex) {
|
|
2984
2964
|
// 赋值到全局
|
|
@@ -2994,7 +2974,7 @@ const PopsInstanceUtils = {
|
|
|
2994
2974
|
}
|
|
2995
2975
|
}
|
|
2996
2976
|
}
|
|
2997
|
-
target.querySelectorAll("*").forEach(($ele
|
|
2977
|
+
target.querySelectorAll("*").forEach(($ele) => {
|
|
2998
2978
|
queryMaxZIndex($ele);
|
|
2999
2979
|
});
|
|
3000
2980
|
zIndex += deviation;
|
|
@@ -3029,13 +3009,13 @@ const PopsInstanceUtils = {
|
|
|
3029
3009
|
return $css.position !== "static" && $css.display !== "none";
|
|
3030
3010
|
}
|
|
3031
3011
|
Object.keys(PopsInstData).forEach((instKeyName) => {
|
|
3032
|
-
|
|
3012
|
+
const instData = PopsInstData[instKeyName];
|
|
3033
3013
|
for (let index = 0; index < instData.length; index++) {
|
|
3034
3014
|
const inst = instData[index];
|
|
3035
|
-
|
|
3015
|
+
const nodeStyle = window.getComputedStyle(inst.animElement);
|
|
3036
3016
|
/* 不对position为static和display为none的元素进行获取它们的z-index */
|
|
3037
3017
|
if (isVisibleNode(nodeStyle)) {
|
|
3038
|
-
|
|
3018
|
+
const nodeZIndex = parseInt(nodeStyle.zIndex);
|
|
3039
3019
|
if (!isNaN(nodeZIndex)) {
|
|
3040
3020
|
if (nodeZIndex > zIndex) {
|
|
3041
3021
|
zIndex = nodeZIndex;
|
|
@@ -3046,7 +3026,7 @@ const PopsInstanceUtils = {
|
|
|
3046
3026
|
}
|
|
3047
3027
|
});
|
|
3048
3028
|
zIndex += deviation;
|
|
3049
|
-
|
|
3029
|
+
const isOverMaxZIndex = zIndex >= maxZIndex;
|
|
3050
3030
|
if (isOverMaxZIndex) {
|
|
3051
3031
|
// 超出z-index最大值
|
|
3052
3032
|
zIndex = maxZIndex;
|
|
@@ -3091,9 +3071,9 @@ const PopsInstanceUtils = {
|
|
|
3091
3071
|
// 移除全部或者guid相同
|
|
3092
3072
|
if (isAll || instConfigItem["guid"] === guid) {
|
|
3093
3073
|
// 判断是否有动画
|
|
3094
|
-
|
|
3074
|
+
const animName = instConfigItem.animElement.getAttribute("anim");
|
|
3095
3075
|
if (PopsAnimation.hasAnim(animName)) {
|
|
3096
|
-
|
|
3076
|
+
const reverseAnimName = animName + "-reverse";
|
|
3097
3077
|
instConfigItem.animElement.style.width = "100%";
|
|
3098
3078
|
instConfigItem.animElement.style.height = "100%";
|
|
3099
3079
|
instConfigItem.animElement.style["animation-name"] = reverseAnimName;
|
|
@@ -3128,9 +3108,9 @@ const PopsInstanceUtils = {
|
|
|
3128
3108
|
*/
|
|
3129
3109
|
hide(popsType, instConfigList, guid, config, animElement, maskElement) {
|
|
3130
3110
|
return new Promise((resolve) => {
|
|
3131
|
-
|
|
3111
|
+
const popsElement = animElement.querySelector(".pops[type-value]");
|
|
3132
3112
|
if (popsType === "drawer") {
|
|
3133
|
-
|
|
3113
|
+
const drawerConfig = config;
|
|
3134
3114
|
popsUtils.setTimeout(() => {
|
|
3135
3115
|
maskElement.style.setProperty("display", "none");
|
|
3136
3116
|
if (["top", "bottom"].includes(drawerConfig.direction)) {
|
|
@@ -3146,18 +3126,14 @@ const PopsInstanceUtils = {
|
|
|
3146
3126
|
}, drawerConfig.closeDelay);
|
|
3147
3127
|
}
|
|
3148
3128
|
else {
|
|
3149
|
-
|
|
3129
|
+
const fintInst = instConfigList.find((instConfigItem) => instConfigItem.guid === guid);
|
|
3150
3130
|
if (fintInst) {
|
|
3151
3131
|
/* 存在动画 */
|
|
3152
|
-
|
|
3132
|
+
const instConfigItem = fintInst;
|
|
3153
3133
|
instConfigItem.animElement.style.width = "100%";
|
|
3154
3134
|
instConfigItem.animElement.style.height = "100%";
|
|
3155
|
-
|
|
3156
|
-
instConfigItem.animElement.style
|
|
3157
|
-
instConfigItem.animElement.getAttribute("anim") + "-reverse";
|
|
3158
|
-
if (PopsAnimation.hasAnim(
|
|
3159
|
-
// @ts-ignore
|
|
3160
|
-
instConfigItem.animElement.style["animation-name"])) {
|
|
3135
|
+
Reflect.set(instConfigItem.animElement.style, "animation-name", instConfigItem.animElement.getAttribute("anim") + "-reverse");
|
|
3136
|
+
if (PopsAnimation.hasAnim(Reflect.get(instConfigItem.animElement.style, "animation-name"))) {
|
|
3161
3137
|
/**
|
|
3162
3138
|
* 动画结束的回调
|
|
3163
3139
|
*/
|
|
@@ -3197,13 +3173,13 @@ const PopsInstanceUtils = {
|
|
|
3197
3173
|
*/
|
|
3198
3174
|
show(popsType, instConfigList, guid, config, animElement, maskElement) {
|
|
3199
3175
|
return new Promise((resolve) => {
|
|
3200
|
-
|
|
3176
|
+
const popsElement = animElement.querySelector(".pops[type-value]");
|
|
3201
3177
|
if (popsType === "drawer") {
|
|
3202
|
-
|
|
3178
|
+
const drawerConfig = config;
|
|
3203
3179
|
popsUtils.setTimeout(() => {
|
|
3204
3180
|
popsDOMUtils.css(maskElement, "display", "");
|
|
3205
|
-
|
|
3206
|
-
|
|
3181
|
+
const direction = drawerConfig.direction;
|
|
3182
|
+
const size = drawerConfig.size.toString();
|
|
3207
3183
|
if (["top", "bottom"].includes(direction)) {
|
|
3208
3184
|
popsElement.style.setProperty("height", size);
|
|
3209
3185
|
}
|
|
@@ -3217,18 +3193,13 @@ const PopsInstanceUtils = {
|
|
|
3217
3193
|
}, drawerConfig.openDelay ?? 0);
|
|
3218
3194
|
}
|
|
3219
3195
|
else {
|
|
3220
|
-
|
|
3196
|
+
const fintInst = instConfigList.find((instConfigItem) => instConfigItem.guid === guid);
|
|
3221
3197
|
if (fintInst) {
|
|
3222
|
-
|
|
3198
|
+
const instConfigItem = fintInst;
|
|
3223
3199
|
instConfigItem.animElement.style.width = "";
|
|
3224
3200
|
instConfigItem.animElement.style.height = "";
|
|
3225
|
-
|
|
3226
|
-
instConfigItem.animElement.style
|
|
3227
|
-
.animElement.getAttribute("anim")
|
|
3228
|
-
.replace("-reverse", "");
|
|
3229
|
-
if (PopsAnimation.hasAnim(
|
|
3230
|
-
// @ts-ignore
|
|
3231
|
-
instConfigItem.animElement.style["animation-name"])) {
|
|
3201
|
+
Reflect.set(instConfigItem.animElement.style, "animation-name", instConfigItem.animElement.getAttribute("anim").replace("-reverse", ""));
|
|
3202
|
+
if (PopsAnimation.hasAnim(Reflect.get(instConfigItem.animElement.style, "animation-name"))) {
|
|
3232
3203
|
/**
|
|
3233
3204
|
* 动画结束的回调
|
|
3234
3205
|
*/
|
|
@@ -3267,8 +3238,8 @@ const PopsInstanceUtils = {
|
|
|
3267
3238
|
*/
|
|
3268
3239
|
close(popsType, instConfigList, guid, config, animElement) {
|
|
3269
3240
|
return new Promise((resolve) => {
|
|
3270
|
-
|
|
3271
|
-
|
|
3241
|
+
const popsElement = animElement.querySelector(".pops[type-value]");
|
|
3242
|
+
const drawerConfig = config;
|
|
3272
3243
|
/**
|
|
3273
3244
|
* 动画结束事件
|
|
3274
3245
|
*/
|
|
@@ -3286,7 +3257,7 @@ const PopsInstanceUtils = {
|
|
|
3286
3257
|
}
|
|
3287
3258
|
/* 监听过渡结束 */
|
|
3288
3259
|
popsDOMUtils.on(popsElement, popsDOMUtils.getTransitionEndNameList(), closeCallBack);
|
|
3289
|
-
|
|
3260
|
+
const popsTransForm = getComputedStyle(popsElement).transform;
|
|
3290
3261
|
if (popsTransForm !== "none") {
|
|
3291
3262
|
popsDOMUtils.trigger(popsElement, popsDOMUtils.getTransitionEndNameList(), void 0, true);
|
|
3292
3263
|
return;
|
|
@@ -3338,8 +3309,8 @@ const PopsInstanceUtils = {
|
|
|
3338
3309
|
let clickElementLeftOffset = 0;
|
|
3339
3310
|
/* 点击元素,top偏移 */
|
|
3340
3311
|
let clickElementTopOffset = 0;
|
|
3341
|
-
|
|
3342
|
-
|
|
3312
|
+
const AnyTouch = popsUtils.AnyTouch();
|
|
3313
|
+
const anyTouchElement = new AnyTouch(options.dragElement, {
|
|
3343
3314
|
preventDefault(event) {
|
|
3344
3315
|
if (typeof options.preventEvent === "function") {
|
|
3345
3316
|
return options.preventEvent(event);
|
|
@@ -3357,7 +3328,7 @@ const PopsInstanceUtils = {
|
|
|
3357
3328
|
* 修改移动的元素的style
|
|
3358
3329
|
*/
|
|
3359
3330
|
function changeMoveElementStyle(element) {
|
|
3360
|
-
|
|
3331
|
+
const old_transitionDuration = element.style.transitionDuration;
|
|
3361
3332
|
if (globalThis.getComputedStyle(element).transitionDuration !== "0s") {
|
|
3362
3333
|
element.style.transitionDuration = "0s";
|
|
3363
3334
|
}
|
|
@@ -3387,7 +3358,7 @@ const PopsInstanceUtils = {
|
|
|
3387
3358
|
};
|
|
3388
3359
|
}
|
|
3389
3360
|
else {
|
|
3390
|
-
|
|
3361
|
+
const rect = container.getBoundingClientRect();
|
|
3391
3362
|
return {
|
|
3392
3363
|
left: rect.left,
|
|
3393
3364
|
top: rect.top,
|
|
@@ -3400,7 +3371,7 @@ const PopsInstanceUtils = {
|
|
|
3400
3371
|
anyTouchElement.on("pan", function (event) {
|
|
3401
3372
|
if (!isMove) {
|
|
3402
3373
|
isMove = true;
|
|
3403
|
-
|
|
3374
|
+
const rect = options.dragElement.getBoundingClientRect();
|
|
3404
3375
|
clickElementLeftOffset = event.x - rect.left;
|
|
3405
3376
|
clickElementTopOffset = event.y - rect.top;
|
|
3406
3377
|
transformInfo = popsDOMUtils.getTransform(moveElement);
|
|
@@ -3425,12 +3396,12 @@ const PopsInstanceUtils = {
|
|
|
3425
3396
|
if (options.limit) {
|
|
3426
3397
|
/* 限制在容器内移动 */
|
|
3427
3398
|
/* left偏移最大值 */
|
|
3428
|
-
|
|
3399
|
+
const maxLeftOffset = getContainerWidthOrHeight(options.container).width -
|
|
3429
3400
|
popsDOMUtils.width(moveElement) +
|
|
3430
3401
|
transformInfo.transformLeft;
|
|
3431
|
-
|
|
3402
|
+
const { left: minLeftOffset, top: minTopOffset } = getContainerTopOrLeft(options.container);
|
|
3432
3403
|
/* top偏移的最大值 */
|
|
3433
|
-
|
|
3404
|
+
const maxTopOffset = getContainerWidthOrHeight(options.container).height -
|
|
3434
3405
|
popsDOMUtils.height(moveElement) +
|
|
3435
3406
|
transformInfo.transformTop;
|
|
3436
3407
|
if (currentMoveLeftOffset > maxLeftOffset) {
|
|
@@ -3441,8 +3412,7 @@ const PopsInstanceUtils = {
|
|
|
3441
3412
|
/* 不允许超过容器的最大高度 */
|
|
3442
3413
|
currentMoveTopOffset = maxTopOffset;
|
|
3443
3414
|
}
|
|
3444
|
-
if (currentMoveLeftOffset - options.extraDistance * 2 <
|
|
3445
|
-
minLeftOffset + transformInfo.transformLeft) {
|
|
3415
|
+
if (currentMoveLeftOffset - options.extraDistance * 2 < minLeftOffset + transformInfo.transformLeft) {
|
|
3446
3416
|
/* 不允许left偏移小于容器最小值 */
|
|
3447
3417
|
currentMoveLeftOffset = minLeftOffset + transformInfo.transformLeft;
|
|
3448
3418
|
/* 最左边 +额外距离 */
|
|
@@ -3506,8 +3476,8 @@ const PopsInstanceUtils = {
|
|
|
3506
3476
|
throw new Error("获取前面的值或后面的值的方法不能为空");
|
|
3507
3477
|
}
|
|
3508
3478
|
return function (after_obj, before_obj) {
|
|
3509
|
-
|
|
3510
|
-
|
|
3479
|
+
const beforeValue = getBeforeValueFun(before_obj); /* 前 */
|
|
3480
|
+
const afterValue = getAfterValueFun(after_obj); /* 后 */
|
|
3511
3481
|
if (sortByDesc) {
|
|
3512
3482
|
if (afterValue > beforeValue) {
|
|
3513
3483
|
return -1;
|
|
@@ -3539,10 +3509,10 @@ const PopsHandler = {
|
|
|
3539
3509
|
* 创建shadow
|
|
3540
3510
|
*/
|
|
3541
3511
|
handlerShadow(config) {
|
|
3542
|
-
|
|
3512
|
+
const $shadowContainer = document.createElement("div");
|
|
3543
3513
|
$shadowContainer.className = "pops-shadow-container";
|
|
3544
3514
|
if (config.useShadowRoot) {
|
|
3545
|
-
|
|
3515
|
+
const $shadowRoot = $shadowContainer.attachShadow({ mode: "open" });
|
|
3546
3516
|
return {
|
|
3547
3517
|
$shadowContainer,
|
|
3548
3518
|
$shadowRoot,
|
|
@@ -3594,7 +3564,7 @@ const PopsHandler = {
|
|
|
3594
3564
|
});
|
|
3595
3565
|
}
|
|
3596
3566
|
for (const cssItem of css) {
|
|
3597
|
-
|
|
3567
|
+
const $css = popsDOMUtils.createElement("style", {}, {
|
|
3598
3568
|
"data-type": "PopsHandler.handleInit",
|
|
3599
3569
|
});
|
|
3600
3570
|
$css.textContent = cssItem.css;
|
|
@@ -3611,7 +3581,7 @@ const PopsHandler = {
|
|
|
3611
3581
|
* @param details 传递的配置
|
|
3612
3582
|
*/
|
|
3613
3583
|
handleMask(details = {}) {
|
|
3614
|
-
|
|
3584
|
+
const result = {
|
|
3615
3585
|
maskElement: popsDOMUtils.parseTextToDOM(details.maskHTML),
|
|
3616
3586
|
};
|
|
3617
3587
|
let isMaskClick = false;
|
|
@@ -3622,7 +3592,7 @@ const PopsHandler = {
|
|
|
3622
3592
|
function clickEvent(event) {
|
|
3623
3593
|
popsDOMUtils.preventEvent(event);
|
|
3624
3594
|
// 获取该类型实例存储列表
|
|
3625
|
-
|
|
3595
|
+
const targetInst = PopsInstData[details.type];
|
|
3626
3596
|
function originalRun() {
|
|
3627
3597
|
if (details.config.mask.clickEvent.toClose) {
|
|
3628
3598
|
/* 关闭 */
|
|
@@ -3656,12 +3626,12 @@ const PopsHandler = {
|
|
|
3656
3626
|
}
|
|
3657
3627
|
/* 判断按下的元素是否是pops-anim */
|
|
3658
3628
|
popsDOMUtils.on(details.animElement, ["touchstart", "mousedown"], void 0, (event) => {
|
|
3659
|
-
|
|
3629
|
+
const $click = event.composedPath()[0];
|
|
3660
3630
|
isMaskClick = isAnimElement($click);
|
|
3661
3631
|
});
|
|
3662
3632
|
/* 如果有动画层,在动画层上监听点击事件 */
|
|
3663
3633
|
popsDOMUtils.on(details.animElement, "click", void 0, (event) => {
|
|
3664
|
-
|
|
3634
|
+
const $click = event.composedPath()[0];
|
|
3665
3635
|
if (isAnimElement($click) && isMaskClick) {
|
|
3666
3636
|
return clickEvent(event);
|
|
3667
3637
|
}
|
|
@@ -3854,7 +3824,7 @@ const PopsHandler = {
|
|
|
3854
3824
|
* 处理返回的配置,针对popsHandler.handleEventDetails
|
|
3855
3825
|
*/
|
|
3856
3826
|
handleResultDetails(details) {
|
|
3857
|
-
|
|
3827
|
+
const resultDetails = Object.assign({}, details);
|
|
3858
3828
|
popsUtils.delete(resultDetails, "type");
|
|
3859
3829
|
popsUtils.delete(resultDetails, "function");
|
|
3860
3830
|
return resultDetails;
|
|
@@ -3868,7 +3838,7 @@ const PopsHandler = {
|
|
|
3868
3838
|
*/
|
|
3869
3839
|
handleClickEvent(type, $btn, eventDetails, callback) {
|
|
3870
3840
|
popsDOMUtils.on($btn, "click", (event) => {
|
|
3871
|
-
|
|
3841
|
+
const extraParam = {
|
|
3872
3842
|
type: type,
|
|
3873
3843
|
};
|
|
3874
3844
|
callback(Object.assign(eventDetails, extraParam), event);
|
|
@@ -3883,9 +3853,9 @@ const PopsHandler = {
|
|
|
3883
3853
|
* @param callback 回调函数
|
|
3884
3854
|
*/
|
|
3885
3855
|
handleKeyboardEvent(keyName, otherKeyList = [], callback) {
|
|
3886
|
-
|
|
3887
|
-
|
|
3888
|
-
|
|
3856
|
+
const keyboardEvent = function (event) {
|
|
3857
|
+
const _keyName = event.code || event.key;
|
|
3858
|
+
const _keyValue = event.charCode || event.keyCode || event.which;
|
|
3889
3859
|
if (otherKeyList.includes("ctrl") && !event.ctrlKey) {
|
|
3890
3860
|
return;
|
|
3891
3861
|
}
|
|
@@ -3927,7 +3897,7 @@ const PopsHandler = {
|
|
|
3927
3897
|
handlePromptClickEvent(type, inputElement, $btn, eventDetails, callback) {
|
|
3928
3898
|
popsDOMUtils.on($btn, "click", (event) => {
|
|
3929
3899
|
// 额外参数
|
|
3930
|
-
|
|
3900
|
+
const extraParam = {
|
|
3931
3901
|
type: type,
|
|
3932
3902
|
text: inputElement.value,
|
|
3933
3903
|
};
|
|
@@ -3960,7 +3930,7 @@ const PopsHandler = {
|
|
|
3960
3930
|
// .rightClickMenu
|
|
3961
3931
|
// 单独处理
|
|
3962
3932
|
if (type === "loading" || type === "tooltip" || type === "rightClickMenu") {
|
|
3963
|
-
|
|
3933
|
+
const inst = PopsInstData[type];
|
|
3964
3934
|
if (inst) {
|
|
3965
3935
|
PopsInstanceUtils.removeInstance([inst], "", true);
|
|
3966
3936
|
}
|
|
@@ -3980,7 +3950,7 @@ const PopsHandler = {
|
|
|
3980
3950
|
else {
|
|
3981
3951
|
// 对配置进行处理
|
|
3982
3952
|
// 选择配置的z-index和已有的pops实例的最大z-index值
|
|
3983
|
-
|
|
3953
|
+
const originZIndex = config.zIndex;
|
|
3984
3954
|
config.zIndex = () => {
|
|
3985
3955
|
const { zIndex: maxZIndex } = PopsInstanceUtils.getPopsMaxZIndex(PopsHandler.handleZIndex(originZIndex) + 100);
|
|
3986
3956
|
return maxZIndex;
|
|
@@ -4100,13 +4070,13 @@ const PopsAlert = {
|
|
|
4100
4070
|
},
|
|
4101
4071
|
]);
|
|
4102
4072
|
// 先把z-index提取出来
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4109
|
-
|
|
4073
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4074
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
4075
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
4076
|
+
const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
4077
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
4078
|
+
const { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(popsType, config);
|
|
4079
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
4110
4080
|
/*html*/ `
|
|
4111
4081
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
4112
4082
|
? config.title.text
|
|
@@ -4117,15 +4087,15 @@ const PopsAlert = {
|
|
|
4117
4087
|
/**
|
|
4118
4088
|
* 弹窗的主元素,包括动画层
|
|
4119
4089
|
*/
|
|
4120
|
-
|
|
4121
|
-
|
|
4090
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
4091
|
+
const { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, btnOkElement, titleElement: $title, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
4122
4092
|
/** 遮罩层元素 */
|
|
4123
4093
|
let $mask = null;
|
|
4124
4094
|
/** 已创建的元素列表 */
|
|
4125
|
-
|
|
4095
|
+
const elementList = [$anim];
|
|
4126
4096
|
/* 遮罩层元素 */
|
|
4127
4097
|
if (config.mask.enable) {
|
|
4128
|
-
|
|
4098
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
4129
4099
|
type: popsType,
|
|
4130
4100
|
guid: guid,
|
|
4131
4101
|
config: config,
|
|
@@ -4136,7 +4106,7 @@ const PopsAlert = {
|
|
|
4136
4106
|
elementList.push($mask);
|
|
4137
4107
|
}
|
|
4138
4108
|
/* 处理返回的配置 */
|
|
4139
|
-
|
|
4109
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
4140
4110
|
/* 为顶部右边的关闭按钮添加点击事件 */
|
|
4141
4111
|
PopsHandler.handleClickEvent("close", $headerCloseBtn, eventDetails, config.btn.close.callback);
|
|
4142
4112
|
/* 为底部ok按钮添加点击事件 */
|
|
@@ -4170,7 +4140,7 @@ const PopsAlert = {
|
|
|
4170
4140
|
endCallBack: config.dragEndCallBack,
|
|
4171
4141
|
});
|
|
4172
4142
|
}
|
|
4173
|
-
|
|
4143
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
4174
4144
|
return result;
|
|
4175
4145
|
},
|
|
4176
4146
|
};
|
|
@@ -4304,13 +4274,13 @@ const PopsConfirm = {
|
|
|
4304
4274
|
},
|
|
4305
4275
|
]);
|
|
4306
4276
|
// 先把z-index提取出来
|
|
4307
|
-
|
|
4308
|
-
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4313
|
-
|
|
4277
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4278
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
4279
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
4280
|
+
const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
4281
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
4282
|
+
const { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(popsType, config);
|
|
4283
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
4314
4284
|
/*html*/ `
|
|
4315
4285
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
4316
4286
|
? config.title.text
|
|
@@ -4321,8 +4291,8 @@ const PopsConfirm = {
|
|
|
4321
4291
|
/**
|
|
4322
4292
|
* 弹窗的主元素,包括动画层
|
|
4323
4293
|
*/
|
|
4324
|
-
|
|
4325
|
-
|
|
4294
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
4295
|
+
const { popsElement: $pops, titleElement: $title, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
4326
4296
|
/**
|
|
4327
4297
|
* 遮罩层元素
|
|
4328
4298
|
*/
|
|
@@ -4330,10 +4300,10 @@ const PopsConfirm = {
|
|
|
4330
4300
|
/**
|
|
4331
4301
|
* 已创建的元素列表
|
|
4332
4302
|
*/
|
|
4333
|
-
|
|
4303
|
+
const elementList = [$anim];
|
|
4334
4304
|
if (config.mask.enable) {
|
|
4335
4305
|
// 启用遮罩层
|
|
4336
|
-
|
|
4306
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
4337
4307
|
type: popsType,
|
|
4338
4308
|
guid: guid,
|
|
4339
4309
|
config: config,
|
|
@@ -4343,7 +4313,7 @@ const PopsConfirm = {
|
|
|
4343
4313
|
$mask = _handleMask_.maskElement;
|
|
4344
4314
|
elementList.push($mask);
|
|
4345
4315
|
}
|
|
4346
|
-
|
|
4316
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
4347
4317
|
PopsHandler.handleClickEvent("close", $btnClose, eventDetails, config.btn.close.callback);
|
|
4348
4318
|
PopsHandler.handleClickEvent("ok", $btnOk, eventDetails, config.btn.ok.callback);
|
|
4349
4319
|
PopsHandler.handleClickEvent("cancel", $btnCancel, eventDetails, config.btn.cancel.callback);
|
|
@@ -4375,7 +4345,7 @@ const PopsConfirm = {
|
|
|
4375
4345
|
endCallBack: config.dragEndCallBack,
|
|
4376
4346
|
});
|
|
4377
4347
|
}
|
|
4378
|
-
|
|
4348
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
4379
4349
|
return result;
|
|
4380
4350
|
},
|
|
4381
4351
|
};
|
|
@@ -4508,13 +4478,13 @@ const PopsDrawer = {
|
|
|
4508
4478
|
},
|
|
4509
4479
|
]);
|
|
4510
4480
|
// 先把z-index提取出来
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4481
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4482
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
4483
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
4484
|
+
const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
4485
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
4486
|
+
const { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(popsType, config);
|
|
4487
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
4518
4488
|
/*html*/ `
|
|
4519
4489
|
${config.title.enable
|
|
4520
4490
|
? /*html*/ `<div class="pops-title pops-${popsType}-title" style="${headerStyle}">${config.title.html
|
|
@@ -4527,13 +4497,13 @@ const PopsDrawer = {
|
|
|
4527
4497
|
/**
|
|
4528
4498
|
* 弹窗的主元素,包括动画层
|
|
4529
4499
|
*/
|
|
4530
|
-
|
|
4531
|
-
|
|
4532
|
-
|
|
4533
|
-
|
|
4534
|
-
|
|
4535
|
-
|
|
4536
|
-
|
|
4500
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
4501
|
+
const { popsElement, headerCloseBtnElement, btnCancelElement, btnOkElement, btnOtherElement } = PopsHandler.handleQueryElement($anim, popsType);
|
|
4502
|
+
const $pops = popsElement;
|
|
4503
|
+
const $headerCloseBtn = headerCloseBtnElement;
|
|
4504
|
+
const $btnCancel = btnCancelElement;
|
|
4505
|
+
const $btnOk = btnOkElement;
|
|
4506
|
+
const $btnOther = btnOtherElement;
|
|
4537
4507
|
/**
|
|
4538
4508
|
* 遮罩层元素
|
|
4539
4509
|
*/
|
|
@@ -4541,9 +4511,9 @@ const PopsDrawer = {
|
|
|
4541
4511
|
/**
|
|
4542
4512
|
* 已创建的元素列表
|
|
4543
4513
|
*/
|
|
4544
|
-
|
|
4514
|
+
const elementList = [$anim];
|
|
4545
4515
|
if (config.mask.enable) {
|
|
4546
|
-
|
|
4516
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
4547
4517
|
type: popsType,
|
|
4548
4518
|
guid: guid,
|
|
4549
4519
|
config: config,
|
|
@@ -4553,7 +4523,7 @@ const PopsDrawer = {
|
|
|
4553
4523
|
$mask = _handleMask_.maskElement;
|
|
4554
4524
|
elementList.push($mask);
|
|
4555
4525
|
}
|
|
4556
|
-
|
|
4526
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
4557
4527
|
/* 处理方向 */
|
|
4558
4528
|
$pops.setAttribute("direction", config.direction);
|
|
4559
4529
|
/* 处理border-radius */
|
|
@@ -4581,7 +4551,7 @@ const PopsDrawer = {
|
|
|
4581
4551
|
});
|
|
4582
4552
|
}
|
|
4583
4553
|
/* 待处理的点击事件列表 */
|
|
4584
|
-
|
|
4554
|
+
const needHandleClickEventList = [
|
|
4585
4555
|
{
|
|
4586
4556
|
type: "close",
|
|
4587
4557
|
ele: $headerCloseBtn,
|
|
@@ -4649,7 +4619,7 @@ const PopsDrawer = {
|
|
|
4649
4619
|
$shadowContainer: $shadowContainer,
|
|
4650
4620
|
$shadowRoot: $shadowRoot,
|
|
4651
4621
|
});
|
|
4652
|
-
|
|
4622
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
4653
4623
|
return result;
|
|
4654
4624
|
},
|
|
4655
4625
|
};
|
|
@@ -4687,14 +4657,14 @@ const PopsLoading = {
|
|
|
4687
4657
|
let config = PopsLoadingConfig();
|
|
4688
4658
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4689
4659
|
config = popsUtils.assign(config, details);
|
|
4690
|
-
|
|
4660
|
+
const guid = popsUtils.getRandomGUID();
|
|
4691
4661
|
const PopsType = "loading";
|
|
4692
4662
|
config = PopsHandler.handleOnly(PopsType, config);
|
|
4693
4663
|
// 先把z-index提取出来
|
|
4694
|
-
|
|
4695
|
-
|
|
4696
|
-
|
|
4697
|
-
|
|
4664
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4665
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
4666
|
+
const { contentPStyle } = PopsElementHandler.createContentStyle("loading", config);
|
|
4667
|
+
const animHTML = PopsElementHandler.createAnim(guid, PopsType, config,
|
|
4698
4668
|
/*html*/ `
|
|
4699
4669
|
<div class="pops-content pops-${PopsType}-content">${config.addIndexCSS
|
|
4700
4670
|
? /*html*/ `
|
|
@@ -4712,8 +4682,8 @@ const PopsLoading = {
|
|
|
4712
4682
|
/**
|
|
4713
4683
|
* 弹窗的主元素,包括动画层
|
|
4714
4684
|
*/
|
|
4715
|
-
|
|
4716
|
-
|
|
4685
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
4686
|
+
const { popsElement: $pops } = PopsHandler.handleQueryElement($anim, PopsType);
|
|
4717
4687
|
/**
|
|
4718
4688
|
* 遮罩层元素
|
|
4719
4689
|
*/
|
|
@@ -4721,10 +4691,10 @@ const PopsLoading = {
|
|
|
4721
4691
|
/**
|
|
4722
4692
|
* 已创建的元素列表
|
|
4723
4693
|
*/
|
|
4724
|
-
|
|
4694
|
+
const elementList = [$anim];
|
|
4725
4695
|
if (config.mask.enable) {
|
|
4726
4696
|
// 创建遮罩层
|
|
4727
|
-
|
|
4697
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
4728
4698
|
type: PopsType,
|
|
4729
4699
|
guid: guid,
|
|
4730
4700
|
config: config,
|
|
@@ -4734,7 +4704,7 @@ const PopsLoading = {
|
|
|
4734
4704
|
$mask = _handleMask_.maskElement;
|
|
4735
4705
|
elementList.push($mask);
|
|
4736
4706
|
}
|
|
4737
|
-
|
|
4707
|
+
const eventDetails = PopsHandler.handleLoadingEventDetails(guid, PopsType, $anim, $pops, $mask, config);
|
|
4738
4708
|
popsDOMUtils.append(config.parent, elementList);
|
|
4739
4709
|
if ($mask != null) {
|
|
4740
4710
|
$anim.after($mask);
|
|
@@ -4751,7 +4721,7 @@ const PopsLoading = {
|
|
|
4751
4721
|
popsDOMUtils.css($anim, "position", "absolute !important");
|
|
4752
4722
|
$mask && popsDOMUtils.css($mask, "position", "absolute !important");
|
|
4753
4723
|
}
|
|
4754
|
-
|
|
4724
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
4755
4725
|
return result;
|
|
4756
4726
|
},
|
|
4757
4727
|
};
|
|
@@ -4971,20 +4941,14 @@ const PopsFolder = {
|
|
|
4971
4941
|
},
|
|
4972
4942
|
]);
|
|
4973
4943
|
/* 办公几件套 */
|
|
4974
|
-
|
|
4975
|
-
Folder_ICON
|
|
4976
|
-
|
|
4977
|
-
Folder_ICON
|
|
4978
|
-
|
|
4979
|
-
Folder_ICON
|
|
4980
|
-
// @ts-ignore
|
|
4981
|
-
Folder_ICON.pptx = Folder_ICON.ppt;
|
|
4982
|
-
// @ts-ignore;
|
|
4983
|
-
Folder_ICON.dmg = Folder_ICON.ipa;
|
|
4984
|
-
// @ts-ignore
|
|
4985
|
-
Folder_ICON.json = Folder_ICON.js;
|
|
4944
|
+
Reflect.set(Folder_ICON, "docx", Folder_ICON.doc);
|
|
4945
|
+
Reflect.set(Folder_ICON, "rtf", Folder_ICON.doc);
|
|
4946
|
+
Reflect.set(Folder_ICON, "xlsx", Folder_ICON.xls);
|
|
4947
|
+
Reflect.set(Folder_ICON, "pptx", Folder_ICON.ppt);
|
|
4948
|
+
Reflect.set(Folder_ICON, "dmg", Folder_ICON.ipa);
|
|
4949
|
+
Reflect.set(Folder_ICON, "json", Folder_ICON.js);
|
|
4986
4950
|
/* 压缩包 */
|
|
4987
|
-
|
|
4951
|
+
const zipIconList = [
|
|
4988
4952
|
"rar",
|
|
4989
4953
|
"7z",
|
|
4990
4954
|
"arj",
|
|
@@ -5003,11 +4967,11 @@ const PopsFolder = {
|
|
|
5003
4967
|
"001",
|
|
5004
4968
|
];
|
|
5005
4969
|
/* 图片 */
|
|
5006
|
-
|
|
4970
|
+
const imageIconList = ["jpg", "jpeg", "ico", "webp"];
|
|
5007
4971
|
/* 代码语言 */
|
|
5008
|
-
|
|
4972
|
+
const codeLanguageIconList = ["htm", "py", "vue", "bat", "sh", "vbs", "java", "kt"];
|
|
5009
4973
|
/* Android安装包 */
|
|
5010
|
-
|
|
4974
|
+
const androidIconList = ["apk", "apkm", "xapk"];
|
|
5011
4975
|
zipIconList.forEach((keyName) => {
|
|
5012
4976
|
Folder_ICON[keyName] = Folder_ICON.zip;
|
|
5013
4977
|
});
|
|
@@ -5021,16 +4985,15 @@ const PopsFolder = {
|
|
|
5021
4985
|
Folder_ICON[keyName] = Folder_ICON.apk;
|
|
5022
4986
|
});
|
|
5023
4987
|
if (details?.folder) {
|
|
5024
|
-
|
|
5025
|
-
config.folder = details.folder;
|
|
4988
|
+
Reflect.set(config, "folder", details.folder);
|
|
5026
4989
|
}
|
|
5027
4990
|
// 先把z-index提取出来
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
4991
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4992
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
4993
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
4994
|
+
const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
4995
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
4996
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
5034
4997
|
/*html*/ `
|
|
5035
4998
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
5036
4999
|
? config.title.text
|
|
@@ -5132,8 +5095,8 @@ const PopsFolder = {
|
|
|
5132
5095
|
/**
|
|
5133
5096
|
* 弹窗的主元素,包括动画层
|
|
5134
5097
|
*/
|
|
5135
|
-
|
|
5136
|
-
|
|
5098
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
5099
|
+
const { popsElement: $pops, titleElement: $title, contentElement: $content,
|
|
5137
5100
|
// folderListElement,
|
|
5138
5101
|
// folderListHeaderElement,
|
|
5139
5102
|
// folderListHeaderRowElement,
|
|
@@ -5145,9 +5108,9 @@ const PopsFolder = {
|
|
|
5145
5108
|
/**
|
|
5146
5109
|
* 已创建的元素列表
|
|
5147
5110
|
*/
|
|
5148
|
-
|
|
5111
|
+
const elementList = [$anim];
|
|
5149
5112
|
if (config.mask.enable) {
|
|
5150
|
-
|
|
5113
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
5151
5114
|
type: popsType,
|
|
5152
5115
|
guid: guid,
|
|
5153
5116
|
config: config,
|
|
@@ -5158,7 +5121,7 @@ const PopsFolder = {
|
|
|
5158
5121
|
elementList.push($mask);
|
|
5159
5122
|
}
|
|
5160
5123
|
/* 事件 */
|
|
5161
|
-
|
|
5124
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
5162
5125
|
PopsHandler.handleClickEvent("close", $btnCloseBtn, eventDetails, config.btn.close.callback);
|
|
5163
5126
|
PopsHandler.handleClickEvent("ok", btnOkElement, eventDetails, config.btn.ok.callback);
|
|
5164
5127
|
PopsHandler.handleClickEvent("cancel", btnCancelElement, eventDetails, config.btn.cancel.callback);
|
|
@@ -5177,7 +5140,7 @@ const PopsFolder = {
|
|
|
5177
5140
|
config.folder.sort();
|
|
5178
5141
|
this.initFolderView(config.folder);
|
|
5179
5142
|
/* 将数据存到全部文件的属性_config_中 */
|
|
5180
|
-
|
|
5143
|
+
const allFilesElement = folderFileListBreadcrumbPrimaryElement.querySelector(".pops-folder-list .pops-folder-file-list-breadcrumb-allFiles:first-child");
|
|
5181
5144
|
Reflect.set(allFilesElement, "_config_", config.folder);
|
|
5182
5145
|
/* 设置点击顶部的全部文件事件 */
|
|
5183
5146
|
popsDOMUtils.on(allFilesElement, "click", (event) => {
|
|
@@ -5226,13 +5189,13 @@ const PopsFolder = {
|
|
|
5226
5189
|
* @param isFolder 是否是文件夹
|
|
5227
5190
|
*/
|
|
5228
5191
|
createFolderRowElement(fileName, latestTime = "-", fileSize = "-", isFolder = false) {
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5232
|
-
|
|
5233
|
-
|
|
5234
|
-
|
|
5235
|
-
|
|
5192
|
+
const origin_fileName = fileName;
|
|
5193
|
+
const origin_latestTime = latestTime;
|
|
5194
|
+
const origin_fileSize = fileSize;
|
|
5195
|
+
const folderElement = popsDOMUtils.createElement("tr");
|
|
5196
|
+
const fileNameElement = popsDOMUtils.createElement("td");
|
|
5197
|
+
const fileTimeElement = popsDOMUtils.createElement("td");
|
|
5198
|
+
const fileFormatSize = popsDOMUtils.createElement("td");
|
|
5236
5199
|
let fileType = "";
|
|
5237
5200
|
let fileIcon = Folder_ICON.folder;
|
|
5238
5201
|
if (isFolder) {
|
|
@@ -5249,14 +5212,14 @@ const PopsFolder = {
|
|
|
5249
5212
|
if (typeof fileSize === "number") {
|
|
5250
5213
|
fileSize = popsUtils.formatByteToSize(fileSize);
|
|
5251
5214
|
}
|
|
5252
|
-
for (
|
|
5215
|
+
for (const keyName in Folder_ICON) {
|
|
5253
5216
|
if (fileName.toLowerCase().endsWith("." + keyName)) {
|
|
5254
5217
|
fileType = keyName;
|
|
5255
5218
|
fileIcon = Folder_ICON[keyName];
|
|
5256
5219
|
break;
|
|
5257
5220
|
}
|
|
5258
5221
|
}
|
|
5259
|
-
if (!
|
|
5222
|
+
if (!fileIcon) {
|
|
5260
5223
|
fileType = "Null";
|
|
5261
5224
|
fileIcon = Folder_ICON.Null;
|
|
5262
5225
|
}
|
|
@@ -5289,7 +5252,7 @@ const PopsFolder = {
|
|
|
5289
5252
|
</div>
|
|
5290
5253
|
`);
|
|
5291
5254
|
/* 存储原来的值 */
|
|
5292
|
-
|
|
5255
|
+
const __value__ = {
|
|
5293
5256
|
fileName: origin_fileName,
|
|
5294
5257
|
latestTime: origin_latestTime,
|
|
5295
5258
|
fileSize: origin_fileSize,
|
|
@@ -5317,11 +5280,11 @@ const PopsFolder = {
|
|
|
5317
5280
|
* @param isFolder 是否是文件夹
|
|
5318
5281
|
*/
|
|
5319
5282
|
createFolderRowElementByMobile(fileName, latestTime = "-", fileSize = "-", isFolder = false) {
|
|
5320
|
-
|
|
5321
|
-
|
|
5322
|
-
|
|
5323
|
-
|
|
5324
|
-
|
|
5283
|
+
const origin_fileName = fileName;
|
|
5284
|
+
const origin_latestTime = latestTime;
|
|
5285
|
+
const origin_fileSize = fileSize;
|
|
5286
|
+
const folderElement = popsDOMUtils.createElement("tr");
|
|
5287
|
+
const fileNameElement = popsDOMUtils.createElement("td");
|
|
5325
5288
|
let fileType = "";
|
|
5326
5289
|
let fileIcon = Folder_ICON.folder;
|
|
5327
5290
|
if (isFolder) {
|
|
@@ -5338,14 +5301,14 @@ const PopsFolder = {
|
|
|
5338
5301
|
if (typeof fileSize === "number") {
|
|
5339
5302
|
fileSize = popsUtils.formatByteToSize(fileSize);
|
|
5340
5303
|
}
|
|
5341
|
-
for (
|
|
5304
|
+
for (const keyName in Folder_ICON) {
|
|
5342
5305
|
if (fileName.toLowerCase().endsWith("." + keyName)) {
|
|
5343
5306
|
fileType = keyName;
|
|
5344
5307
|
fileIcon = Folder_ICON[keyName];
|
|
5345
5308
|
break;
|
|
5346
5309
|
}
|
|
5347
5310
|
}
|
|
5348
|
-
if (!
|
|
5311
|
+
if (!fileIcon) {
|
|
5349
5312
|
fileType = "Null";
|
|
5350
5313
|
fileIcon = Folder_ICON.Null;
|
|
5351
5314
|
}
|
|
@@ -5363,7 +5326,7 @@ const PopsFolder = {
|
|
|
5363
5326
|
</div>
|
|
5364
5327
|
`);
|
|
5365
5328
|
/* 存储原来的值 */
|
|
5366
|
-
|
|
5329
|
+
const __value__ = {
|
|
5367
5330
|
fileName: origin_fileName,
|
|
5368
5331
|
latestTime: origin_latestTime,
|
|
5369
5332
|
fileSize: origin_fileSize,
|
|
@@ -5387,7 +5350,7 @@ const PopsFolder = {
|
|
|
5387
5350
|
* 创建顶部导航的箭头图标
|
|
5388
5351
|
*/
|
|
5389
5352
|
createHeaderArrowIcon() {
|
|
5390
|
-
|
|
5353
|
+
const $arrowIcon = popsDOMUtils.createElement("div", {
|
|
5391
5354
|
className: "iconArrow",
|
|
5392
5355
|
});
|
|
5393
5356
|
return $arrowIcon;
|
|
@@ -5398,7 +5361,7 @@ const PopsFolder = {
|
|
|
5398
5361
|
* @param folderDataConfig 文件夹配置
|
|
5399
5362
|
*/
|
|
5400
5363
|
createBreadcrumb(folderName, folderDataConfig) {
|
|
5401
|
-
|
|
5364
|
+
const $breadcrumb = popsDOMUtils.createElement("span", {
|
|
5402
5365
|
className: "pops-folder-file-list-breadcrumb-allFiles cursor-p",
|
|
5403
5366
|
innerHTML: `<a>${folderName}</a>`,
|
|
5404
5367
|
_config_: folderDataConfig,
|
|
@@ -5416,8 +5379,8 @@ const PopsFolder = {
|
|
|
5416
5379
|
setBreadcrumbClickEvent(clickEvent, isTop, dataConfigList) {
|
|
5417
5380
|
this.clearFolderInfoView();
|
|
5418
5381
|
/* 获取当前的导航元素 */
|
|
5419
|
-
|
|
5420
|
-
|
|
5382
|
+
const $click = clickEvent.target;
|
|
5383
|
+
const currentBreadcrumb = $click.closest("span.pops-folder-file-list-breadcrumb-allFiles");
|
|
5421
5384
|
if (currentBreadcrumb) {
|
|
5422
5385
|
while (currentBreadcrumb.nextElementSibling) {
|
|
5423
5386
|
currentBreadcrumb.nextElementSibling.remove();
|
|
@@ -5426,7 +5389,7 @@ const PopsFolder = {
|
|
|
5426
5389
|
else {
|
|
5427
5390
|
console.error("获取导航按钮失败");
|
|
5428
5391
|
}
|
|
5429
|
-
|
|
5392
|
+
const loadingMask = PopsLoading.init({
|
|
5430
5393
|
parent: $content,
|
|
5431
5394
|
content: {
|
|
5432
5395
|
text: "获取文件列表中...",
|
|
@@ -5452,7 +5415,7 @@ const PopsFolder = {
|
|
|
5452
5415
|
*/
|
|
5453
5416
|
async enterFolder(clickEvent, dataConfig) {
|
|
5454
5417
|
this.clearFolderInfoView();
|
|
5455
|
-
|
|
5418
|
+
const loadingMask = PopsLoading.init({
|
|
5456
5419
|
parent: $content,
|
|
5457
5420
|
content: {
|
|
5458
5421
|
text: "获取文件列表中...",
|
|
@@ -5463,11 +5426,11 @@ const PopsFolder = {
|
|
|
5463
5426
|
addIndexCSS: false,
|
|
5464
5427
|
});
|
|
5465
5428
|
if (typeof dataConfig.clickEvent === "function") {
|
|
5466
|
-
|
|
5429
|
+
const childConfig = await dataConfig.clickEvent(clickEvent, dataConfig);
|
|
5467
5430
|
/* 添加顶部导航的箭头 */
|
|
5468
5431
|
folderFileListBreadcrumbPrimaryElement.appendChild(this.createHeaderArrowIcon());
|
|
5469
5432
|
/* 添加顶部导航的链接文字 */
|
|
5470
|
-
|
|
5433
|
+
const breadcrumbAllFilesElement = this.createBreadcrumb(dataConfig.fileName, childConfig);
|
|
5471
5434
|
folderFileListBreadcrumbPrimaryElement.appendChild(breadcrumbAllFilesElement);
|
|
5472
5435
|
/* 设置顶部导航点击事件 */
|
|
5473
5436
|
popsDOMUtils.on(breadcrumbAllFilesElement, "click", (event) => {
|
|
@@ -5484,9 +5447,9 @@ const PopsFolder = {
|
|
|
5484
5447
|
*/
|
|
5485
5448
|
async downloadFile(clickEvent, $row, dataConfig) {
|
|
5486
5449
|
popsDOMUtils.preventEvent(clickEvent);
|
|
5487
|
-
|
|
5450
|
+
const $link = $row.querySelector("a");
|
|
5488
5451
|
if (typeof dataConfig.clickEvent === "function") {
|
|
5489
|
-
|
|
5452
|
+
const downloadInfo = await dataConfig.clickEvent(clickEvent, dataConfig);
|
|
5490
5453
|
if (downloadInfo != null &&
|
|
5491
5454
|
typeof downloadInfo === "object" &&
|
|
5492
5455
|
!Array.isArray(downloadInfo) &&
|
|
@@ -5501,7 +5464,7 @@ const PopsFolder = {
|
|
|
5501
5464
|
}
|
|
5502
5465
|
if (downloadInfo.mode === "a" || downloadInfo.mode === "aBlank") {
|
|
5503
5466
|
/* a标签下载 */
|
|
5504
|
-
|
|
5467
|
+
const downloadLinkElement = document.createElement("a");
|
|
5505
5468
|
if (downloadInfo.mode === "aBlank") {
|
|
5506
5469
|
downloadLinkElement.setAttribute("target", "_blank");
|
|
5507
5470
|
}
|
|
@@ -5519,7 +5482,7 @@ const PopsFolder = {
|
|
|
5519
5482
|
}
|
|
5520
5483
|
else if (downloadInfo.mode === "iframe") {
|
|
5521
5484
|
/* iframe下载 */
|
|
5522
|
-
|
|
5485
|
+
const downloadIframeLinkElement = document.createElement("iframe");
|
|
5523
5486
|
downloadIframeLinkElement.src = downloadInfo.url;
|
|
5524
5487
|
downloadIframeLinkElement.onload = function () {
|
|
5525
5488
|
popsUtils.setTimeout(() => {
|
|
@@ -5547,16 +5510,16 @@ const PopsFolder = {
|
|
|
5547
5510
|
sortFolderConfig(folderDataConfigList, sortName = "fileName", isDesc = false) {
|
|
5548
5511
|
if (sortName === "fileName") {
|
|
5549
5512
|
// 如果是以文件名排序,文件夹优先放前面
|
|
5550
|
-
|
|
5513
|
+
const onlyFolderDataConfigList = folderDataConfigList.filter((value) => {
|
|
5551
5514
|
return value.isFolder;
|
|
5552
5515
|
});
|
|
5553
|
-
|
|
5516
|
+
const onlyFileDataConfigList = folderDataConfigList.filter((value) => {
|
|
5554
5517
|
return !value.isFolder;
|
|
5555
5518
|
});
|
|
5556
5519
|
// 文件夹排序
|
|
5557
5520
|
onlyFolderDataConfigList.sort((leftConfig, rightConfig) => {
|
|
5558
|
-
|
|
5559
|
-
|
|
5521
|
+
const beforeVal = leftConfig[sortName].toString();
|
|
5522
|
+
const afterVal = rightConfig[sortName].toString();
|
|
5560
5523
|
let compareVal = beforeVal.localeCompare(afterVal);
|
|
5561
5524
|
if (isDesc) {
|
|
5562
5525
|
/* 降序 */
|
|
@@ -5571,8 +5534,8 @@ const PopsFolder = {
|
|
|
5571
5534
|
});
|
|
5572
5535
|
// 文件名排序
|
|
5573
5536
|
onlyFileDataConfigList.sort((leftConfig, rightConfig) => {
|
|
5574
|
-
|
|
5575
|
-
|
|
5537
|
+
const beforeVal = leftConfig[sortName].toString();
|
|
5538
|
+
const afterVal = rightConfig[sortName].toString();
|
|
5576
5539
|
let compareVal = beforeVal.localeCompare(afterVal);
|
|
5577
5540
|
if (isDesc) {
|
|
5578
5541
|
/* 降序 */
|
|
@@ -5642,7 +5605,7 @@ const PopsFolder = {
|
|
|
5642
5605
|
this.sortFolderConfig(dataConfig, config.sort.name, config.sort.isDesc);
|
|
5643
5606
|
dataConfig.forEach((item) => {
|
|
5644
5607
|
if (item.isFolder) {
|
|
5645
|
-
|
|
5608
|
+
const { folderElement, fileNameElement } = popsUtils.isPhone()
|
|
5646
5609
|
? this.createFolderRowElementByMobile(item.fileName, "", "", true)
|
|
5647
5610
|
: this.createFolderRowElement(item.fileName, "", "", true);
|
|
5648
5611
|
// 文件夹 - 点击事件
|
|
@@ -5653,7 +5616,7 @@ const PopsFolder = {
|
|
|
5653
5616
|
folderListBodyElement.appendChild(folderElement);
|
|
5654
5617
|
}
|
|
5655
5618
|
else {
|
|
5656
|
-
|
|
5619
|
+
const { folderElement, fileNameElement } = popsUtils.isPhone()
|
|
5657
5620
|
? this.createFolderRowElementByMobile(item.fileName, item.latestTime, item.fileSize, false)
|
|
5658
5621
|
: this.createFolderRowElement(item.fileName, item.latestTime, item.fileSize, false);
|
|
5659
5622
|
// 文件 - 点击事件
|
|
@@ -5699,20 +5662,20 @@ const PopsFolder = {
|
|
|
5699
5662
|
config.sort.name = sortName;
|
|
5700
5663
|
config.sort.isDesc = !config.sort.isDesc;
|
|
5701
5664
|
}
|
|
5702
|
-
|
|
5703
|
-
|
|
5665
|
+
const arrowUp = target.querySelector(".pops-folder-icon-arrow-up");
|
|
5666
|
+
const arrowDown = target.querySelector(".pops-folder-icon-arrow-down");
|
|
5704
5667
|
this.changeArrowActive(arrowUp, arrowDown, config.sort.isDesc);
|
|
5705
5668
|
if (typeof config.sort.callback === "function" &&
|
|
5706
5669
|
config.sort.callback(target, event, config.sort.name, config.sort.isDesc)) {
|
|
5707
5670
|
return;
|
|
5708
5671
|
}
|
|
5709
|
-
|
|
5672
|
+
const childrenList = [];
|
|
5710
5673
|
Array.from(folderListBodyElement.children).forEach((trElement) => {
|
|
5711
|
-
|
|
5674
|
+
const __value__ = Reflect.get(trElement, "__value__");
|
|
5712
5675
|
Reflect.set(__value__, "target", trElement);
|
|
5713
5676
|
childrenList.push(__value__);
|
|
5714
5677
|
});
|
|
5715
|
-
|
|
5678
|
+
const sortedConfigList = this.sortFolderConfig(childrenList, config.sort.name, config.sort.isDesc);
|
|
5716
5679
|
sortedConfigList.forEach((item) => {
|
|
5717
5680
|
folderListBodyElement.appendChild(item.target);
|
|
5718
5681
|
});
|
|
@@ -5739,7 +5702,7 @@ const PopsFolder = {
|
|
|
5739
5702
|
$shadowContainer: $shadowContainer,
|
|
5740
5703
|
$shadowRoot: $shadowRoot,
|
|
5741
5704
|
});
|
|
5742
|
-
|
|
5705
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
5743
5706
|
return result;
|
|
5744
5707
|
},
|
|
5745
5708
|
};
|
|
@@ -5841,17 +5804,15 @@ const PopsIframe = {
|
|
|
5841
5804
|
css: PopsCSS.iframeCSS,
|
|
5842
5805
|
},
|
|
5843
5806
|
]);
|
|
5844
|
-
|
|
5845
|
-
// @ts-ignore
|
|
5846
|
-
config.animation != null && config.animation != "" ? "position:absolute;" : "";
|
|
5807
|
+
const maskExtraStyle = config.animation != null && config.animation != "" ? "position:absolute;" : "";
|
|
5847
5808
|
// 先把z-index提取出来
|
|
5848
|
-
|
|
5849
|
-
|
|
5850
|
-
|
|
5851
|
-
|
|
5852
|
-
|
|
5853
|
-
|
|
5854
|
-
|
|
5809
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
5810
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex, maskExtraStyle);
|
|
5811
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
5812
|
+
const iframeLoadingHTML = '<div class="pops-loading"></div>';
|
|
5813
|
+
const titleText = config.title.text.trim() !== "" ? config.title.text : config.url;
|
|
5814
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
5815
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
5855
5816
|
/*html*/ `
|
|
5856
5817
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
5857
5818
|
? titleText
|
|
@@ -5864,14 +5825,14 @@ const PopsIframe = {
|
|
|
5864
5825
|
/**
|
|
5865
5826
|
* 弹窗的主元素,包括动画层
|
|
5866
5827
|
*/
|
|
5867
|
-
|
|
5868
|
-
|
|
5828
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
5829
|
+
const { popsElement: $pops, headerCloseBtnElement, headerControlsElement, titleElement: $title, iframeElement: $iframe, loadingElement, contentLoadingElement: $contentLoading, headerMinBtnElement, headerMaxBtnElement, headerMiseBtnElement, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
5869
5830
|
let $iframeContainer = PopsCore.document.querySelector(".pops-iframe-container");
|
|
5870
5831
|
if (!$iframeContainer) {
|
|
5871
5832
|
$iframeContainer = PopsCore.document.createElement("div");
|
|
5872
5833
|
$iframeContainer.className = "pops-iframe-container";
|
|
5873
5834
|
$iframeContainer.style.cssText =
|
|
5874
|
-
"display: flex;position: fixed;bottom: 0px;flex-flow: wrap-reverse
|
|
5835
|
+
"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;";
|
|
5875
5836
|
popsDOMUtils.appendBody($iframeContainer);
|
|
5876
5837
|
}
|
|
5877
5838
|
/**
|
|
@@ -5881,9 +5842,9 @@ const PopsIframe = {
|
|
|
5881
5842
|
/**
|
|
5882
5843
|
* 已创建的元素列表
|
|
5883
5844
|
*/
|
|
5884
|
-
|
|
5845
|
+
const elementList = [$anim];
|
|
5885
5846
|
if (config.mask.enable) {
|
|
5886
|
-
|
|
5847
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
5887
5848
|
type: popsType,
|
|
5888
5849
|
guid: guid,
|
|
5889
5850
|
config: config,
|
|
@@ -5893,7 +5854,7 @@ const PopsIframe = {
|
|
|
5893
5854
|
$mask = _handleMask_.maskElement;
|
|
5894
5855
|
elementList.push($mask);
|
|
5895
5856
|
}
|
|
5896
|
-
|
|
5857
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
5897
5858
|
eventDetails["iframeElement"] = $iframe;
|
|
5898
5859
|
popsDOMUtils.on($anim, popsDOMUtils.getAnimationEndNameList(), function () {
|
|
5899
5860
|
/* 动画加载完毕 */
|
|
@@ -6044,7 +6005,7 @@ const PopsIframe = {
|
|
|
6044
6005
|
$shadowContainer: $shadowContainer,
|
|
6045
6006
|
$shadowRoot: $shadowRoot,
|
|
6046
6007
|
});
|
|
6047
|
-
|
|
6008
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
6048
6009
|
return result;
|
|
6049
6010
|
},
|
|
6050
6011
|
};
|
|
@@ -6315,7 +6276,7 @@ const PopsPanelConfig = () => {
|
|
|
6315
6276
|
text: "单选3",
|
|
6316
6277
|
isHTML: false,
|
|
6317
6278
|
disable(value, allSelectedInfo) {
|
|
6318
|
-
return
|
|
6279
|
+
return allSelectedInfo.findIndex((it) => ["select-2", "select-5"].includes(it.value)) !== -1;
|
|
6319
6280
|
},
|
|
6320
6281
|
},
|
|
6321
6282
|
{
|
|
@@ -6323,7 +6284,7 @@ const PopsPanelConfig = () => {
|
|
|
6323
6284
|
text: "单选4",
|
|
6324
6285
|
isHTML: false,
|
|
6325
6286
|
disable(value, allSelectedInfo) {
|
|
6326
|
-
return
|
|
6287
|
+
return allSelectedInfo.findIndex((it) => ["select-3", "select-5"].includes(it.value)) !== -1;
|
|
6327
6288
|
},
|
|
6328
6289
|
},
|
|
6329
6290
|
{
|
|
@@ -6505,7 +6466,7 @@ const PopsPanelConfig = () => {
|
|
|
6505
6466
|
// @ts-ignore
|
|
6506
6467
|
props: {},
|
|
6507
6468
|
forms: [],
|
|
6508
|
-
clickFirstCallback: function (
|
|
6469
|
+
clickFirstCallback: function () {
|
|
6509
6470
|
return false;
|
|
6510
6471
|
},
|
|
6511
6472
|
},
|
|
@@ -6522,7 +6483,7 @@ const PopsPanelConfig = () => {
|
|
|
6522
6483
|
// @ts-ignore
|
|
6523
6484
|
props: {},
|
|
6524
6485
|
forms: [],
|
|
6525
|
-
clickFirstCallback: function (
|
|
6486
|
+
clickFirstCallback: function () {
|
|
6526
6487
|
return false;
|
|
6527
6488
|
},
|
|
6528
6489
|
},
|
|
@@ -6579,20 +6540,20 @@ const PopsMathFloatUtils = {
|
|
|
6579
6540
|
* @param number2
|
|
6580
6541
|
*/
|
|
6581
6542
|
add(number1, number2) {
|
|
6582
|
-
let number1length, number2length
|
|
6543
|
+
let number1length, number2length;
|
|
6583
6544
|
try {
|
|
6584
6545
|
number1length = number1.toString().split(".")[1].length;
|
|
6585
6546
|
}
|
|
6586
|
-
catch
|
|
6547
|
+
catch {
|
|
6587
6548
|
number1length = 0;
|
|
6588
6549
|
}
|
|
6589
6550
|
try {
|
|
6590
6551
|
number2length = number2.toString().split(".")[1].length;
|
|
6591
6552
|
}
|
|
6592
|
-
catch
|
|
6553
|
+
catch {
|
|
6593
6554
|
number2length = 0;
|
|
6594
6555
|
}
|
|
6595
|
-
powValue = Math.pow(10, Math.max(number1length, number2length));
|
|
6556
|
+
const powValue = Math.pow(10, Math.max(number1length, number2length));
|
|
6596
6557
|
return Math.round(number1 * powValue + number2 * powValue) / powValue;
|
|
6597
6558
|
},
|
|
6598
6559
|
/**
|
|
@@ -6601,21 +6562,21 @@ const PopsMathFloatUtils = {
|
|
|
6601
6562
|
* @param number2
|
|
6602
6563
|
*/
|
|
6603
6564
|
sub(number1, number2) {
|
|
6604
|
-
let number1length, number2length
|
|
6565
|
+
let number1length, number2length;
|
|
6605
6566
|
try {
|
|
6606
6567
|
number1length = number1.toString().split(".")[1].length;
|
|
6607
6568
|
}
|
|
6608
|
-
catch
|
|
6569
|
+
catch {
|
|
6609
6570
|
number1length = 0;
|
|
6610
6571
|
}
|
|
6611
6572
|
try {
|
|
6612
6573
|
number2length = number2.toString().split(".")[1].length;
|
|
6613
6574
|
}
|
|
6614
|
-
catch
|
|
6575
|
+
catch {
|
|
6615
6576
|
number2length = 0;
|
|
6616
6577
|
}
|
|
6617
|
-
powValue = Math.pow(10, Math.max(number1length, number2length));
|
|
6618
|
-
|
|
6578
|
+
const powValue = Math.pow(10, Math.max(number1length, number2length));
|
|
6579
|
+
const fixedValue = number1length >= number2length ? number1length : number2length;
|
|
6619
6580
|
return (Math.round(number1 * powValue - number2 * powValue) / powValue).toFixed(fixedValue);
|
|
6620
6581
|
},
|
|
6621
6582
|
/**
|
|
@@ -6624,21 +6585,21 @@ const PopsMathFloatUtils = {
|
|
|
6624
6585
|
* @param number2
|
|
6625
6586
|
*/
|
|
6626
6587
|
division(number1, number2) {
|
|
6627
|
-
let number1length, number2length
|
|
6588
|
+
let number1length, number2length;
|
|
6628
6589
|
try {
|
|
6629
6590
|
number1length = number1.toString().split(".")[1].length;
|
|
6630
6591
|
}
|
|
6631
|
-
catch
|
|
6592
|
+
catch {
|
|
6632
6593
|
number1length = 0;
|
|
6633
6594
|
}
|
|
6634
6595
|
try {
|
|
6635
6596
|
number2length = number2.toString().split(".")[1].length;
|
|
6636
6597
|
}
|
|
6637
|
-
catch
|
|
6598
|
+
catch {
|
|
6638
6599
|
number2length = 0;
|
|
6639
6600
|
}
|
|
6640
|
-
number1ReplaceValue = Number(number1.toString().replace(".", ""));
|
|
6641
|
-
number2ReplaceValue = Number(number2.toString().replace(".", ""));
|
|
6601
|
+
const number1ReplaceValue = Number(number1.toString().replace(".", ""));
|
|
6602
|
+
const number2ReplaceValue = Number(number2.toString().replace(".", ""));
|
|
6642
6603
|
return (number1ReplaceValue / number2ReplaceValue) * Math.pow(10, number2length - number1length);
|
|
6643
6604
|
},
|
|
6644
6605
|
};
|
|
@@ -6703,7 +6664,7 @@ class ToolTip {
|
|
|
6703
6664
|
this.init();
|
|
6704
6665
|
}
|
|
6705
6666
|
init() {
|
|
6706
|
-
|
|
6667
|
+
const toolTipInfo = this.createToolTip();
|
|
6707
6668
|
this.$el.$toolTip = toolTipInfo.$toolTipContainer;
|
|
6708
6669
|
this.$el.$content = toolTipInfo.$toolTipContent;
|
|
6709
6670
|
this.$el.$arrow = toolTipInfo.$toolTipArrow;
|
|
@@ -6719,7 +6680,7 @@ class ToolTip {
|
|
|
6719
6680
|
* 创建提示元素
|
|
6720
6681
|
*/
|
|
6721
6682
|
createToolTip() {
|
|
6722
|
-
|
|
6683
|
+
const $toolTipContainer = popsDOMUtils.createElement("div", {
|
|
6723
6684
|
className: "pops-tip",
|
|
6724
6685
|
innerHTML: /*html*/ `
|
|
6725
6686
|
<div class="pops-tip-content" style="text-align: center;"></div>
|
|
@@ -6730,9 +6691,9 @@ class ToolTip {
|
|
|
6730
6691
|
"data-guid": this.$data.guid,
|
|
6731
6692
|
});
|
|
6732
6693
|
/** 内容 */
|
|
6733
|
-
|
|
6694
|
+
const $toolTipContent = $toolTipContainer.querySelector(".pops-tip-content");
|
|
6734
6695
|
/** 箭头 */
|
|
6735
|
-
|
|
6696
|
+
const $toolTipArrow = $toolTipContainer.querySelector(".pops-tip-arrow");
|
|
6736
6697
|
// 处理className
|
|
6737
6698
|
if (typeof this.$data.config.className === "string" && this.$data.config.className.trim() !== "") {
|
|
6738
6699
|
popsDOMUtils.addClassName($toolTipContainer, this.$data.config.className);
|
|
@@ -6741,7 +6702,7 @@ class ToolTip {
|
|
|
6741
6702
|
$toolTipContainer.style.zIndex = PopsHandler.handleZIndex(this.$data.config.zIndex).toString();
|
|
6742
6703
|
if (this.$data.config.style != null) {
|
|
6743
6704
|
/* 添加自定义style */
|
|
6744
|
-
|
|
6705
|
+
const cssNode = popsDOMUtils.createElement("style", {
|
|
6745
6706
|
type: "text/css",
|
|
6746
6707
|
innerHTML: this.$data.config.style,
|
|
6747
6708
|
});
|
|
@@ -6761,9 +6722,7 @@ class ToolTip {
|
|
|
6761
6722
|
* 获取提示的内容
|
|
6762
6723
|
*/
|
|
6763
6724
|
getContent() {
|
|
6764
|
-
return typeof this.$data.config.content === "function"
|
|
6765
|
-
? this.$data.config.content()
|
|
6766
|
-
: this.$data.config.content;
|
|
6725
|
+
return typeof this.$data.config.content === "function" ? this.$data.config.content() : this.$data.config.content;
|
|
6767
6726
|
}
|
|
6768
6727
|
/**
|
|
6769
6728
|
* 修改提示的内容
|
|
@@ -6774,17 +6733,15 @@ class ToolTip {
|
|
|
6774
6733
|
text = this.getContent();
|
|
6775
6734
|
}
|
|
6776
6735
|
if (this.$data.config.isDiffContent) {
|
|
6777
|
-
|
|
6778
|
-
|
|
6779
|
-
let originContentText = this.$el.$content[contentPropKey];
|
|
6736
|
+
const contentPropKey = "data-content";
|
|
6737
|
+
const originContentText = Reflect.get(this.$el.$content, contentPropKey);
|
|
6780
6738
|
if (typeof originContentText === "string") {
|
|
6781
6739
|
if (originContentText === text) {
|
|
6782
6740
|
// 内容未改变,不修改避免渲染
|
|
6783
6741
|
return;
|
|
6784
6742
|
}
|
|
6785
6743
|
}
|
|
6786
|
-
|
|
6787
|
-
this.$el.$content[contentPropKey] = text;
|
|
6744
|
+
Reflect.set(this.$el.$content, contentPropKey, text);
|
|
6788
6745
|
}
|
|
6789
6746
|
PopsSafeUtils.setSafeHTML(this.$el.$content, text);
|
|
6790
6747
|
}
|
|
@@ -6810,23 +6767,23 @@ class ToolTip {
|
|
|
6810
6767
|
* @param otherDistance 其它位置的偏移
|
|
6811
6768
|
*/
|
|
6812
6769
|
calcToolTipPosition(targetElement, arrowDistance, otherDistance, event) {
|
|
6813
|
-
|
|
6770
|
+
const offsetInfo = popsDOMUtils.offset(targetElement, !this.$data.config.isFixed);
|
|
6814
6771
|
// 目标 宽
|
|
6815
|
-
|
|
6772
|
+
const targetElement_width = offsetInfo.width;
|
|
6816
6773
|
// 目标 高
|
|
6817
|
-
|
|
6774
|
+
const targetElement_height = offsetInfo.height;
|
|
6818
6775
|
// 目标 顶部距离
|
|
6819
|
-
|
|
6776
|
+
const targetElement_top = offsetInfo.top;
|
|
6820
6777
|
// let targetElement_bottom = offsetInfo.bottom;
|
|
6821
6778
|
// 目标 左边距离
|
|
6822
|
-
|
|
6779
|
+
const targetElement_left = offsetInfo.left;
|
|
6823
6780
|
// let targetElement_right = offsetInfo.right;
|
|
6824
|
-
|
|
6825
|
-
|
|
6781
|
+
const toolTipElement_width = popsDOMUtils.outerWidth(this.$el.$toolTip);
|
|
6782
|
+
const toolTipElement_height = popsDOMUtils.outerHeight(this.$el.$toolTip);
|
|
6826
6783
|
/* 目标元素的x轴的中间位置 */
|
|
6827
|
-
|
|
6784
|
+
const targetElement_X_center_pos = targetElement_left + targetElement_width / 2 - toolTipElement_width / 2;
|
|
6828
6785
|
/* 目标元素的Y轴的中间位置 */
|
|
6829
|
-
|
|
6786
|
+
const targetElement_Y_center_pos = targetElement_top + targetElement_height / 2 - toolTipElement_height / 2;
|
|
6830
6787
|
let mouseX = 0;
|
|
6831
6788
|
let mouseY = 0;
|
|
6832
6789
|
if (event != null) {
|
|
@@ -6835,19 +6792,15 @@ class ToolTip {
|
|
|
6835
6792
|
mouseY = event.y;
|
|
6836
6793
|
}
|
|
6837
6794
|
else if (event instanceof TouchEvent) {
|
|
6838
|
-
|
|
6795
|
+
const touchEvent = event.touches[0];
|
|
6839
6796
|
mouseX = touchEvent.pageX;
|
|
6840
6797
|
mouseY = touchEvent.pageY;
|
|
6841
6798
|
}
|
|
6842
6799
|
else {
|
|
6843
|
-
// @ts-ignore
|
|
6844
6800
|
if (typeof event.clientX === "number") {
|
|
6845
|
-
// @ts-ignore
|
|
6846
6801
|
mouseX = event.clientX;
|
|
6847
6802
|
}
|
|
6848
|
-
// @ts-ignore
|
|
6849
6803
|
if (typeof event.clientY === "number") {
|
|
6850
|
-
// @ts-ignore
|
|
6851
6804
|
mouseY = event.clientY;
|
|
6852
6805
|
}
|
|
6853
6806
|
}
|
|
@@ -6889,9 +6842,9 @@ class ToolTip {
|
|
|
6889
6842
|
* 动态修改tooltip的位置
|
|
6890
6843
|
*/
|
|
6891
6844
|
changePosition(event) {
|
|
6892
|
-
|
|
6893
|
-
|
|
6894
|
-
|
|
6845
|
+
const positionInfo = this.calcToolTipPosition(this.$data.config.target, this.$data.config.arrowDistance, this.$data.config.otherDistance, event);
|
|
6846
|
+
const positionKey = this.$data.config.position.toUpperCase();
|
|
6847
|
+
const positionDetail = positionInfo[positionKey];
|
|
6895
6848
|
if (positionDetail) {
|
|
6896
6849
|
this.$el.$toolTip.style.left = positionDetail.left + "px";
|
|
6897
6850
|
this.$el.$toolTip.style.top = positionDetail.top + "px";
|
|
@@ -6941,7 +6894,7 @@ class ToolTip {
|
|
|
6941
6894
|
* @param type 事件类型
|
|
6942
6895
|
*/
|
|
6943
6896
|
clearCloseTimeoutId(type, timeId) {
|
|
6944
|
-
|
|
6897
|
+
const timeIdList = type === "MouseEvent" ? this.$data.timeId_close_MouseEvent : this.$data.timeId_close_TouchEvent;
|
|
6945
6898
|
for (let index = 0; index < timeIdList.length; index++) {
|
|
6946
6899
|
const currentTimeId = timeIdList[index];
|
|
6947
6900
|
if (typeof timeId === "number") {
|
|
@@ -6963,11 +6916,11 @@ class ToolTip {
|
|
|
6963
6916
|
* 显示提示框
|
|
6964
6917
|
*/
|
|
6965
6918
|
show(...args) {
|
|
6966
|
-
|
|
6967
|
-
|
|
6919
|
+
const event = args[0];
|
|
6920
|
+
const eventType = event instanceof MouseEvent ? "MouseEvent" : "TouchEvent";
|
|
6968
6921
|
this.clearCloseTimeoutId(eventType);
|
|
6969
6922
|
if (typeof this.$data.config.showBeforeCallBack === "function") {
|
|
6970
|
-
|
|
6923
|
+
const result = this.$data.config.showBeforeCallBack(this.$el.$toolTip);
|
|
6971
6924
|
if (typeof result === "boolean" && !result) {
|
|
6972
6925
|
return;
|
|
6973
6926
|
}
|
|
@@ -7010,19 +6963,19 @@ class ToolTip {
|
|
|
7010
6963
|
* 关闭提示框
|
|
7011
6964
|
*/
|
|
7012
6965
|
close(...args) {
|
|
7013
|
-
|
|
7014
|
-
|
|
6966
|
+
const event = args[0];
|
|
6967
|
+
const eventType = event instanceof MouseEvent ? "MouseEvent" : "TouchEvent";
|
|
7015
6968
|
// 只判断鼠标事件
|
|
7016
6969
|
// 其它的如Touch事件不做处理
|
|
7017
6970
|
if (event && event instanceof MouseEvent) {
|
|
7018
|
-
|
|
6971
|
+
const $target = event.composedPath()[0];
|
|
7019
6972
|
// 如果是目标元素的子元素/tooltip元素的子元素触发的话,那就不管
|
|
7020
6973
|
if ($target != this.$data.config.target && $target != this.$el.$toolTip) {
|
|
7021
6974
|
return;
|
|
7022
6975
|
}
|
|
7023
6976
|
}
|
|
7024
6977
|
if (typeof this.$data.config.closeBeforeCallBack === "function") {
|
|
7025
|
-
|
|
6978
|
+
const result = this.$data.config.closeBeforeCallBack(this.$el.$toolTip);
|
|
7026
6979
|
if (typeof result === "boolean" && !result) {
|
|
7027
6980
|
return;
|
|
7028
6981
|
}
|
|
@@ -7031,14 +6984,14 @@ class ToolTip {
|
|
|
7031
6984
|
(typeof this.$data.config.delayCloseTime === "number" && this.$data.config.delayCloseTime <= 0)) {
|
|
7032
6985
|
this.$data.config.delayCloseTime = 100;
|
|
7033
6986
|
}
|
|
7034
|
-
|
|
6987
|
+
const timeId = popsUtils.setTimeout(() => {
|
|
7035
6988
|
// 设置属性触发关闭动画
|
|
7036
6989
|
this.clearCloseTimeoutId(eventType, timeId);
|
|
7037
6990
|
if (this.$el.$toolTip == null) {
|
|
7038
6991
|
// 已清除了
|
|
7039
6992
|
return;
|
|
7040
6993
|
}
|
|
7041
|
-
|
|
6994
|
+
const motion = this.$el.$toolTip.getAttribute("data-motion");
|
|
7042
6995
|
if (motion == null || motion.trim() === "") {
|
|
7043
6996
|
// 没有动画
|
|
7044
6997
|
this.toolTipAnimationFinishEvent();
|
|
@@ -7182,7 +7135,7 @@ const PopsTooltip = {
|
|
|
7182
7135
|
css: PopsCSS.tooltipCSS,
|
|
7183
7136
|
},
|
|
7184
7137
|
]);
|
|
7185
|
-
|
|
7138
|
+
const toolTip = new ToolTip(config, guid, {
|
|
7186
7139
|
$shadowContainer,
|
|
7187
7140
|
$shadowRoot,
|
|
7188
7141
|
});
|
|
@@ -7250,8 +7203,7 @@ const PanelHandlerComponents = () => {
|
|
|
7250
7203
|
this.$config = details.config;
|
|
7251
7204
|
this.asideULElement = this.$el.$contentAside.querySelector(`ul.pops-${PopsType}-aside-top-container`);
|
|
7252
7205
|
this.asideBottomULElement = this.$el.$contentAside.querySelector(`ul.pops-${PopsType}-aside-bottom-container`);
|
|
7253
|
-
this.sectionContainerHeaderULElement =
|
|
7254
|
-
this.$el.$contentSectionContainer.querySelector(`ul.pops-${PopsType}-container-header-ul`);
|
|
7206
|
+
this.sectionContainerHeaderULElement = this.$el.$contentSectionContainer.querySelector(`ul.pops-${PopsType}-container-header-ul`);
|
|
7255
7207
|
this.sectionContainerULElement = this.$el.$contentSectionContainer.querySelector(`ul.pops-${PopsType}-container-main-ul`);
|
|
7256
7208
|
/**
|
|
7257
7209
|
* 默认点击的左侧容器项
|
|
@@ -7261,12 +7213,10 @@ const PanelHandlerComponents = () => {
|
|
|
7261
7213
|
let isScrollToDefaultView = false;
|
|
7262
7214
|
// 初始化配置
|
|
7263
7215
|
details.config.content.forEach((asideItemConfig) => {
|
|
7264
|
-
|
|
7216
|
+
const $asideLiElement = this.createAsideItem(asideItemConfig);
|
|
7265
7217
|
this.setAsideItemClickEvent($asideLiElement, asideItemConfig);
|
|
7266
7218
|
// 是否处于底部
|
|
7267
|
-
|
|
7268
|
-
? asideItemConfig.isBottom()
|
|
7269
|
-
: asideItemConfig.isBottom;
|
|
7219
|
+
const isBottom = typeof asideItemConfig.isBottom === "function" ? asideItemConfig.isBottom() : asideItemConfig.isBottom;
|
|
7270
7220
|
if (isBottom) {
|
|
7271
7221
|
this.asideBottomULElement.appendChild($asideLiElement);
|
|
7272
7222
|
}
|
|
@@ -7372,7 +7322,7 @@ const PanelHandlerComponents = () => {
|
|
|
7372
7322
|
return;
|
|
7373
7323
|
}
|
|
7374
7324
|
Object.keys(props).forEach((propName) => {
|
|
7375
|
-
|
|
7325
|
+
const value = props[propName];
|
|
7376
7326
|
if (propName === "innerHTML") {
|
|
7377
7327
|
PopsSafeUtils.setSafeHTML(element, value);
|
|
7378
7328
|
return;
|
|
@@ -7393,7 +7343,7 @@ const PanelHandlerComponents = () => {
|
|
|
7393
7343
|
className = className();
|
|
7394
7344
|
}
|
|
7395
7345
|
if (typeof className === "string") {
|
|
7396
|
-
|
|
7346
|
+
const splitClassName = className.split(" ");
|
|
7397
7347
|
splitClassName.forEach((classNameStr) => {
|
|
7398
7348
|
element.classList.add(classNameStr);
|
|
7399
7349
|
});
|
|
@@ -7409,10 +7359,10 @@ const PanelHandlerComponents = () => {
|
|
|
7409
7359
|
* @param asideConfig
|
|
7410
7360
|
*/
|
|
7411
7361
|
createAsideItem(asideConfig) {
|
|
7412
|
-
|
|
7362
|
+
const $li = document.createElement("li");
|
|
7413
7363
|
$li.id = asideConfig.id;
|
|
7414
7364
|
Reflect.set($li, "__forms__", asideConfig.forms);
|
|
7415
|
-
|
|
7365
|
+
const title = typeof asideConfig.title === "function" ? asideConfig.title() : asideConfig.title;
|
|
7416
7366
|
PopsSafeUtils.setSafeHTML($li, title);
|
|
7417
7367
|
/* 处理className */
|
|
7418
7368
|
this.setElementClassName($li, "pops-panel-aside-item");
|
|
@@ -7422,7 +7372,7 @@ const PanelHandlerComponents = () => {
|
|
|
7422
7372
|
/** 禁用左侧项的hover的CSS样式的类名 */
|
|
7423
7373
|
const disableAsideItemHoverCSSClassName = "pops-panel-disabled-aside-hover-css";
|
|
7424
7374
|
/** 是否禁用左侧项的hover的CSS样式 */
|
|
7425
|
-
|
|
7375
|
+
const disableAsideItemHoverCSS = typeof asideConfig.disableAsideItemHoverCSS === "function"
|
|
7426
7376
|
? asideConfig.disableAsideItemHoverCSS()
|
|
7427
7377
|
: asideConfig.disableAsideItemHoverCSS;
|
|
7428
7378
|
if (disableAsideItemHoverCSS) {
|
|
@@ -7439,14 +7389,14 @@ const PanelHandlerComponents = () => {
|
|
|
7439
7389
|
* @param formConfig
|
|
7440
7390
|
*/
|
|
7441
7391
|
createSectionContainerItem_switch(formConfig) {
|
|
7442
|
-
|
|
7392
|
+
const $li = document.createElement("li");
|
|
7443
7393
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
7444
7394
|
this.setElementClassName($li, formConfig.className);
|
|
7445
7395
|
this.setElementAttributes($li, formConfig.attributes);
|
|
7446
7396
|
this.setElementProps($li, formConfig.props);
|
|
7447
7397
|
/* 左边底部的描述的文字 */
|
|
7448
7398
|
let leftDescriptionText = "";
|
|
7449
|
-
if (
|
|
7399
|
+
if (formConfig.description) {
|
|
7450
7400
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
7451
7401
|
}
|
|
7452
7402
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -7473,7 +7423,7 @@ const PanelHandlerComponents = () => {
|
|
|
7473
7423
|
},
|
|
7474
7424
|
init() {
|
|
7475
7425
|
this.setStatus(this.$data.value);
|
|
7476
|
-
|
|
7426
|
+
const disabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
7477
7427
|
if (disabled) {
|
|
7478
7428
|
this.disable();
|
|
7479
7429
|
}
|
|
@@ -7483,7 +7433,7 @@ const PanelHandlerComponents = () => {
|
|
|
7483
7433
|
* 设置点击事件
|
|
7484
7434
|
*/
|
|
7485
7435
|
setClickEvent() {
|
|
7486
|
-
|
|
7436
|
+
const that = this;
|
|
7487
7437
|
popsDOMUtils.on(this.$ele.core, "click", function (event) {
|
|
7488
7438
|
if (that.$ele.input.disabled || that.$ele.switch.hasAttribute("data-disabled")) {
|
|
7489
7439
|
return;
|
|
@@ -7545,14 +7495,14 @@ const PanelHandlerComponents = () => {
|
|
|
7545
7495
|
* @param formConfig
|
|
7546
7496
|
*/
|
|
7547
7497
|
createSectionContainerItem_slider(formConfig) {
|
|
7548
|
-
|
|
7498
|
+
const $li = document.createElement("li");
|
|
7549
7499
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
7550
7500
|
this.setElementClassName($li, formConfig.className);
|
|
7551
7501
|
this.setElementAttributes($li, formConfig.attributes);
|
|
7552
7502
|
this.setElementProps($li, formConfig.props);
|
|
7553
7503
|
/* 左边底部的描述的文字 */
|
|
7554
7504
|
let leftDescriptionText = "";
|
|
7555
|
-
if (
|
|
7505
|
+
if (formConfig.description) {
|
|
7556
7506
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
7557
7507
|
}
|
|
7558
7508
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -7563,7 +7513,7 @@ const PanelHandlerComponents = () => {
|
|
|
7563
7513
|
<input type="range" min="${formConfig.min}" max="${formConfig.max}">
|
|
7564
7514
|
</div>
|
|
7565
7515
|
`);
|
|
7566
|
-
|
|
7516
|
+
const $rangeInput = $li.querySelector(".pops-panel-slider input[type=range]");
|
|
7567
7517
|
if (formConfig.step) {
|
|
7568
7518
|
$rangeInput.setAttribute("step", formConfig.step.toString());
|
|
7569
7519
|
}
|
|
@@ -7572,7 +7522,7 @@ const PanelHandlerComponents = () => {
|
|
|
7572
7522
|
* 获取提示的内容
|
|
7573
7523
|
* @param value
|
|
7574
7524
|
*/
|
|
7575
|
-
|
|
7525
|
+
const getToolTipContent = function (value) {
|
|
7576
7526
|
if (typeof formConfig.getToolTipContent === "function") {
|
|
7577
7527
|
return formConfig.getToolTipContent(value);
|
|
7578
7528
|
}
|
|
@@ -7580,7 +7530,7 @@ const PanelHandlerComponents = () => {
|
|
|
7580
7530
|
return value;
|
|
7581
7531
|
}
|
|
7582
7532
|
};
|
|
7583
|
-
|
|
7533
|
+
const tooltip = PopsTooltip.init({
|
|
7584
7534
|
target: $rangeInput.parentElement,
|
|
7585
7535
|
content: () => {
|
|
7586
7536
|
return getToolTipContent($rangeInput.value);
|
|
@@ -7608,14 +7558,14 @@ const PanelHandlerComponents = () => {
|
|
|
7608
7558
|
* @param formConfig
|
|
7609
7559
|
*/
|
|
7610
7560
|
createSectionContainerItem_slider_new(formConfig) {
|
|
7611
|
-
|
|
7561
|
+
const $li = document.createElement("li");
|
|
7612
7562
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
7613
7563
|
this.setElementClassName($li, formConfig.className);
|
|
7614
7564
|
this.setElementAttributes($li, formConfig.attributes);
|
|
7615
7565
|
this.setElementProps($li, formConfig.props);
|
|
7616
7566
|
/* 左边底部的描述的文字 */
|
|
7617
7567
|
let leftDescriptionText = "";
|
|
7618
|
-
if (
|
|
7568
|
+
if (formConfig.description) {
|
|
7619
7569
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
7620
7570
|
}
|
|
7621
7571
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -7726,9 +7676,9 @@ const PanelHandlerComponents = () => {
|
|
|
7726
7676
|
}
|
|
7727
7677
|
this.$interval.isCheck = true;
|
|
7728
7678
|
let isSuccess = false;
|
|
7729
|
-
|
|
7679
|
+
const oldTotalWidth = this.$data.totalWidth;
|
|
7730
7680
|
let timer = void 0;
|
|
7731
|
-
|
|
7681
|
+
const interval = setInterval(() => {
|
|
7732
7682
|
if (isSuccess) {
|
|
7733
7683
|
this.$interval.isCheck = false;
|
|
7734
7684
|
clearTimeout(timer);
|
|
@@ -7781,12 +7731,12 @@ const PanelHandlerComponents = () => {
|
|
|
7781
7731
|
initStepMap() {
|
|
7782
7732
|
let index = 0;
|
|
7783
7733
|
// 计算出份数
|
|
7784
|
-
|
|
7734
|
+
const blockNums = (this.max - this.min) / this.step;
|
|
7785
7735
|
// 计算出每一份占据的px
|
|
7786
7736
|
this.$data.stepPx = this.$data.totalWidth / blockNums;
|
|
7787
7737
|
let widthPx = 0;
|
|
7788
7738
|
for (let stepValue = this.min; stepValue <= this.max; stepValue += this.step) {
|
|
7789
|
-
|
|
7739
|
+
const value = this.formatValue(stepValue);
|
|
7790
7740
|
let info;
|
|
7791
7741
|
if (value === this.min) {
|
|
7792
7742
|
/* 起始 */
|
|
@@ -7824,12 +7774,12 @@ const PanelHandlerComponents = () => {
|
|
|
7824
7774
|
initFloatStepMap() {
|
|
7825
7775
|
let index = 0;
|
|
7826
7776
|
// 计算出份数
|
|
7827
|
-
|
|
7777
|
+
const blockNums = (this.max - this.min) / this.step;
|
|
7828
7778
|
// 计算出每一份占据的px
|
|
7829
7779
|
this.$data.stepPx = this.$data.totalWidth / blockNums;
|
|
7830
7780
|
let widthPx = 0;
|
|
7831
7781
|
for (let stepValue = this.min; stepValue <= this.max; stepValue = PopsMathFloatUtils.add(stepValue, this.step)) {
|
|
7832
|
-
|
|
7782
|
+
const value = this.formatValue(stepValue);
|
|
7833
7783
|
let info;
|
|
7834
7784
|
if (value === this.min) {
|
|
7835
7785
|
/* 起始 */
|
|
@@ -7969,7 +7919,7 @@ const PanelHandlerComponents = () => {
|
|
|
7969
7919
|
* 判断当前滑块是否被禁用(配置中判断)
|
|
7970
7920
|
*/
|
|
7971
7921
|
isFormConfigDisabledDrag() {
|
|
7972
|
-
|
|
7922
|
+
const isDisabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
7973
7923
|
if (typeof isDisabled === "boolean") {
|
|
7974
7924
|
return isDisabled;
|
|
7975
7925
|
}
|
|
@@ -7985,8 +7935,8 @@ const PanelHandlerComponents = () => {
|
|
|
7985
7935
|
if (event.target !== this.$ele.runAway && event.target !== this.$ele.bar) {
|
|
7986
7936
|
return;
|
|
7987
7937
|
}
|
|
7988
|
-
|
|
7989
|
-
|
|
7938
|
+
const clickX = parseFloat(event.offsetX.toString());
|
|
7939
|
+
const dragStartResult = this.dragStartCallBack();
|
|
7990
7940
|
if (!dragStartResult) {
|
|
7991
7941
|
return;
|
|
7992
7942
|
}
|
|
@@ -8078,7 +8028,7 @@ const PanelHandlerComponents = () => {
|
|
|
8078
8028
|
if (!this.dragStartCallBack()) {
|
|
8079
8029
|
return;
|
|
8080
8030
|
}
|
|
8081
|
-
|
|
8031
|
+
const oldValue = this.value;
|
|
8082
8032
|
const runAwayRect = this.$ele.runAway.getBoundingClientRect();
|
|
8083
8033
|
let displacementX = event.x - (runAwayRect.left + globalThis.screenX);
|
|
8084
8034
|
if (displacementX <= 0) {
|
|
@@ -8092,7 +8042,7 @@ const PanelHandlerComponents = () => {
|
|
|
8092
8042
|
this.dragMoveCallBack(event, currentDragX, oldValue);
|
|
8093
8043
|
});
|
|
8094
8044
|
/* 监听触点离开,处理某些情况下,拖拽松开,但是未触发pan事件,可以通过设置这个来关闭tooltip */
|
|
8095
|
-
this.$tooltip.on("at:end", (
|
|
8045
|
+
this.$tooltip.on("at:end", () => {
|
|
8096
8046
|
this.dragEndCallBack(currentDragX);
|
|
8097
8047
|
});
|
|
8098
8048
|
},
|
|
@@ -8116,7 +8066,7 @@ const PanelHandlerComponents = () => {
|
|
|
8116
8066
|
return;
|
|
8117
8067
|
}
|
|
8118
8068
|
this.$data.isCheckingStopDragMove = true;
|
|
8119
|
-
|
|
8069
|
+
const interval = setInterval(() => {
|
|
8120
8070
|
if (!this.$data.isMove) {
|
|
8121
8071
|
this.$data.isCheckingStopDragMove = false;
|
|
8122
8072
|
this.closeToolTip();
|
|
@@ -8143,7 +8093,7 @@ const PanelHandlerComponents = () => {
|
|
|
8143
8093
|
return PopsPanelSlider.value.toString();
|
|
8144
8094
|
}
|
|
8145
8095
|
}
|
|
8146
|
-
|
|
8096
|
+
const tooltip = PopsTooltip.init({
|
|
8147
8097
|
target: this.$ele.button,
|
|
8148
8098
|
content: getToolTipContent,
|
|
8149
8099
|
zIndex: () => {
|
|
@@ -8157,7 +8107,7 @@ const PanelHandlerComponents = () => {
|
|
|
8157
8107
|
passive: true,
|
|
8158
8108
|
},
|
|
8159
8109
|
showBeforeCallBack: () => {
|
|
8160
|
-
|
|
8110
|
+
const isShowHoverTip = typeof formConfig.isShowHoverTip === "function"
|
|
8161
8111
|
? formConfig.isShowHoverTip()
|
|
8162
8112
|
: typeof formConfig.isShowHoverTip === "boolean"
|
|
8163
8113
|
? formConfig.isShowHoverTip
|
|
@@ -8167,7 +8117,7 @@ const PanelHandlerComponents = () => {
|
|
|
8167
8117
|
}
|
|
8168
8118
|
this.intervalInit();
|
|
8169
8119
|
},
|
|
8170
|
-
showAfterCallBack: (
|
|
8120
|
+
showAfterCallBack: () => {
|
|
8171
8121
|
tooltip.toolTip.changeContent(getToolTipContent());
|
|
8172
8122
|
},
|
|
8173
8123
|
closeBeforeCallBack: () => {
|
|
@@ -8193,7 +8143,7 @@ const PanelHandlerComponents = () => {
|
|
|
8193
8143
|
* @param formConfig
|
|
8194
8144
|
*/
|
|
8195
8145
|
createSectionContainerItem_input(formConfig) {
|
|
8196
|
-
|
|
8146
|
+
const $li = document.createElement("li");
|
|
8197
8147
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
8198
8148
|
this.setElementClassName($li, formConfig.className);
|
|
8199
8149
|
this.setElementAttributes($li, formConfig.attributes);
|
|
@@ -8207,7 +8157,7 @@ const PanelHandlerComponents = () => {
|
|
|
8207
8157
|
}
|
|
8208
8158
|
/* 左边底部的描述的文字 */
|
|
8209
8159
|
let leftDescriptionText = "";
|
|
8210
|
-
if (
|
|
8160
|
+
if (formConfig.description) {
|
|
8211
8161
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8212
8162
|
}
|
|
8213
8163
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -8249,7 +8199,7 @@ const PanelHandlerComponents = () => {
|
|
|
8249
8199
|
}
|
|
8250
8200
|
this.setInputChangeEvent();
|
|
8251
8201
|
// 是否禁用复选框
|
|
8252
|
-
|
|
8202
|
+
const disabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
8253
8203
|
if (disabled) {
|
|
8254
8204
|
this.disable();
|
|
8255
8205
|
}
|
|
@@ -8398,14 +8348,14 @@ const PanelHandlerComponents = () => {
|
|
|
8398
8348
|
* @param formConfig
|
|
8399
8349
|
*/
|
|
8400
8350
|
createSectionContainerItem_textarea(formConfig) {
|
|
8401
|
-
|
|
8351
|
+
const $li = document.createElement("li");
|
|
8402
8352
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
8403
8353
|
this.setElementClassName($li, formConfig.className);
|
|
8404
8354
|
this.setElementAttributes($li, formConfig.attributes);
|
|
8405
8355
|
this.setElementProps($li, formConfig.props);
|
|
8406
8356
|
/* 左边底部的描述的文字 */
|
|
8407
8357
|
let leftDescriptionText = "";
|
|
8408
|
-
if (
|
|
8358
|
+
if (formConfig.description) {
|
|
8409
8359
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8410
8360
|
}
|
|
8411
8361
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -8429,7 +8379,7 @@ const PanelHandlerComponents = () => {
|
|
|
8429
8379
|
init() {
|
|
8430
8380
|
this.setValue(this.$data.value);
|
|
8431
8381
|
this.setChangeEvent();
|
|
8432
|
-
|
|
8382
|
+
const disabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
8433
8383
|
if (disabled) {
|
|
8434
8384
|
this.disable();
|
|
8435
8385
|
}
|
|
@@ -8456,7 +8406,7 @@ const PanelHandlerComponents = () => {
|
|
|
8456
8406
|
*/
|
|
8457
8407
|
setChangeEvent() {
|
|
8458
8408
|
popsDOMUtils.on(this.$ele.textarea, ["input", "propertychange"], (event) => {
|
|
8459
|
-
|
|
8409
|
+
const value = this.$ele.textarea.value;
|
|
8460
8410
|
this.$data.value = value;
|
|
8461
8411
|
if (typeof formConfig.callback === "function") {
|
|
8462
8412
|
formConfig.callback(event, value);
|
|
@@ -8475,14 +8425,14 @@ const PanelHandlerComponents = () => {
|
|
|
8475
8425
|
*/
|
|
8476
8426
|
createSectionContainerItem_select(formConfig) {
|
|
8477
8427
|
const that = this;
|
|
8478
|
-
|
|
8428
|
+
const $li = document.createElement("li");
|
|
8479
8429
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
8480
8430
|
this.setElementClassName($li, formConfig.className);
|
|
8481
8431
|
this.setElementAttributes($li, formConfig.attributes);
|
|
8482
8432
|
this.setElementProps($li, formConfig.props);
|
|
8483
8433
|
/* 左边底部的描述的文字 */
|
|
8484
8434
|
let leftDescriptionText = "";
|
|
8485
|
-
if (
|
|
8435
|
+
if (formConfig.description) {
|
|
8486
8436
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8487
8437
|
}
|
|
8488
8438
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -8513,7 +8463,7 @@ const PanelHandlerComponents = () => {
|
|
|
8513
8463
|
this.initOption();
|
|
8514
8464
|
this.setChangeEvent();
|
|
8515
8465
|
this.setClickEvent();
|
|
8516
|
-
|
|
8466
|
+
const disabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
8517
8467
|
if (disabled) {
|
|
8518
8468
|
this.disable();
|
|
8519
8469
|
}
|
|
@@ -8565,7 +8515,7 @@ const PanelHandlerComponents = () => {
|
|
|
8565
8515
|
initOption() {
|
|
8566
8516
|
formConfig.data.forEach((dataItem) => {
|
|
8567
8517
|
// 初始化默认选中
|
|
8568
|
-
|
|
8518
|
+
const optionElement = document.createElement("option");
|
|
8569
8519
|
this.setNodeValue(optionElement, this.$eleKey.value, dataItem.value);
|
|
8570
8520
|
this.setNodeValue(optionElement, this.$eleKey.disable, dataItem.disable);
|
|
8571
8521
|
this.setNodeValue(optionElement, this.$eleKey.forms, dataItem.forms);
|
|
@@ -8593,9 +8543,9 @@ const PanelHandlerComponents = () => {
|
|
|
8593
8543
|
/** 设置禁用状态 */
|
|
8594
8544
|
setOptionDisableStatus(optionElement) {
|
|
8595
8545
|
let disable = false;
|
|
8596
|
-
|
|
8546
|
+
const optionDisableAttr = this.getNodeValue(optionElement, this.$eleKey.disable);
|
|
8597
8547
|
if (optionDisableAttr === "function") {
|
|
8598
|
-
|
|
8548
|
+
const value = this.getNodeValue(optionElement, this.$eleKey.value);
|
|
8599
8549
|
disable = Boolean(optionDisableAttr(value));
|
|
8600
8550
|
}
|
|
8601
8551
|
if (disable) {
|
|
@@ -8607,9 +8557,9 @@ const PanelHandlerComponents = () => {
|
|
|
8607
8557
|
},
|
|
8608
8558
|
/** 获取option上的信息 */
|
|
8609
8559
|
getSelectOptionInfo($option) {
|
|
8610
|
-
|
|
8611
|
-
|
|
8612
|
-
|
|
8560
|
+
const optionValue = this.getNodeValue($option, this.$eleKey.value);
|
|
8561
|
+
const optionText = $option.innerText || $option.textContent;
|
|
8562
|
+
const optionForms = this.getNodeValue($option, this.$eleKey.forms);
|
|
8613
8563
|
return {
|
|
8614
8564
|
value: optionValue,
|
|
8615
8565
|
text: optionText,
|
|
@@ -8622,16 +8572,16 @@ const PanelHandlerComponents = () => {
|
|
|
8622
8572
|
*/
|
|
8623
8573
|
setChangeEvent() {
|
|
8624
8574
|
popsDOMUtils.on(this.$ele.select, "change", void 0, (event) => {
|
|
8625
|
-
|
|
8626
|
-
|
|
8575
|
+
const $isSelectedElement = this.$ele.select[this.$ele.select.selectedIndex];
|
|
8576
|
+
const selectInfo = this.getSelectOptionInfo($isSelectedElement);
|
|
8627
8577
|
this.setSelectOptionsDisableStatus();
|
|
8628
8578
|
if (typeof formConfig.callback === "function") {
|
|
8629
8579
|
formConfig.callback(event, selectInfo.value, selectInfo.text);
|
|
8630
8580
|
}
|
|
8631
|
-
|
|
8581
|
+
const forms = typeof selectInfo.forms === "function" ? selectInfo.forms() : selectInfo.forms;
|
|
8632
8582
|
if (Array.isArray(forms)) {
|
|
8633
8583
|
/* 如果成功创建,加入到中间容器中 */
|
|
8634
|
-
|
|
8584
|
+
const childUListClassName = "pops-panel-select-child-forms";
|
|
8635
8585
|
// 移除旧的元素
|
|
8636
8586
|
while ($li.nextElementSibling) {
|
|
8637
8587
|
if ($li.nextElementSibling.classList.contains(childUListClassName)) {
|
|
@@ -8641,7 +8591,7 @@ const PanelHandlerComponents = () => {
|
|
|
8641
8591
|
break;
|
|
8642
8592
|
}
|
|
8643
8593
|
}
|
|
8644
|
-
|
|
8594
|
+
const $childUList = document.createElement("ul");
|
|
8645
8595
|
$childUList.className = childUListClassName;
|
|
8646
8596
|
popsDOMUtils.after($li, $childUList);
|
|
8647
8597
|
that.uListContainerAddItem(formConfig, {
|
|
@@ -8672,14 +8622,14 @@ const PanelHandlerComponents = () => {
|
|
|
8672
8622
|
* @param formConfig
|
|
8673
8623
|
*/
|
|
8674
8624
|
createSectionContainerItem_select_multiple_new(formConfig) {
|
|
8675
|
-
|
|
8625
|
+
const $li = document.createElement("li");
|
|
8676
8626
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
8677
8627
|
this.setElementClassName($li, formConfig.className);
|
|
8678
8628
|
this.setElementAttributes($li, formConfig.attributes);
|
|
8679
8629
|
this.setElementProps($li, formConfig.props);
|
|
8680
8630
|
/* 左边底部的描述的文字 */
|
|
8681
8631
|
let leftDescriptionText = "";
|
|
8682
|
-
if (
|
|
8632
|
+
if (formConfig.description) {
|
|
8683
8633
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
8684
8634
|
}
|
|
8685
8635
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -8742,7 +8692,7 @@ const PanelHandlerComponents = () => {
|
|
|
8742
8692
|
this.initPlaceHolder();
|
|
8743
8693
|
this.initTagElement();
|
|
8744
8694
|
this.setSelectContainerClickEvent();
|
|
8745
|
-
|
|
8695
|
+
const disabled = typeof formConfig.disabled === "function" ? formConfig.disabled() : formConfig.disabled;
|
|
8746
8696
|
if (disabled) {
|
|
8747
8697
|
this.disable();
|
|
8748
8698
|
}
|
|
@@ -8780,12 +8730,12 @@ const PanelHandlerComponents = () => {
|
|
|
8780
8730
|
placeholder = formConfig.placeholder;
|
|
8781
8731
|
}
|
|
8782
8732
|
else if (typeof formConfig.placeholder === "function") {
|
|
8783
|
-
|
|
8733
|
+
const placeholderResult = formConfig.placeholder();
|
|
8784
8734
|
if (typeof placeholderResult === "string") {
|
|
8785
8735
|
placeholder = placeholderResult;
|
|
8786
8736
|
}
|
|
8787
8737
|
}
|
|
8788
|
-
|
|
8738
|
+
const $placeholder = popsDOMUtils.createElement("span", {
|
|
8789
8739
|
innerText: placeholder,
|
|
8790
8740
|
});
|
|
8791
8741
|
this.$el.$selectedPlaceHolderWrapper.appendChild($placeholder);
|
|
@@ -8794,10 +8744,10 @@ const PanelHandlerComponents = () => {
|
|
|
8794
8744
|
initTagElement() {
|
|
8795
8745
|
// 遍历数据,寻找对应的值
|
|
8796
8746
|
formConfig.data.forEach((dataItem) => {
|
|
8797
|
-
|
|
8747
|
+
const findValue = this.$data.selectInfo.find((item) => item.value === dataItem.value);
|
|
8798
8748
|
if (findValue) {
|
|
8799
8749
|
// 存在对应的值
|
|
8800
|
-
|
|
8750
|
+
const selectedInfo = this.createSelectedTagItem(dataItem);
|
|
8801
8751
|
this.addSelectedTagItem(selectedInfo.$tag);
|
|
8802
8752
|
this.setSelectedItemCloseIconClickEvent({
|
|
8803
8753
|
$tag: selectedInfo.$tag,
|
|
@@ -8834,7 +8784,7 @@ const PanelHandlerComponents = () => {
|
|
|
8834
8784
|
const $tagText = $selectedItem.querySelector(".el-select__tags-text");
|
|
8835
8785
|
/** 关闭图标 */
|
|
8836
8786
|
const $closeIcon = $selectedItem.querySelector(".el-icon.el-tag__close");
|
|
8837
|
-
|
|
8787
|
+
const text = typeof data.text === "function" ? data.text(data, this.$data.selectInfo) : data.text;
|
|
8838
8788
|
if (data.isHTML) {
|
|
8839
8789
|
PopsSafeUtils.setSafeHTML($tagText, text);
|
|
8840
8790
|
}
|
|
@@ -8856,7 +8806,7 @@ const PanelHandlerComponents = () => {
|
|
|
8856
8806
|
// 去除前面的空白
|
|
8857
8807
|
this.setSectionIsNear();
|
|
8858
8808
|
if (this.$el.$section.contains(this.$el.$selectedInputWrapper)) {
|
|
8859
|
-
|
|
8809
|
+
const $prev = this.$el.$selectedInputWrapper.previousElementSibling;
|
|
8860
8810
|
if ($prev) {
|
|
8861
8811
|
// 存在前一个元素,添加到前面的元素的后面
|
|
8862
8812
|
popsDOMUtils.after($prev, $tag);
|
|
@@ -8867,7 +8817,7 @@ const PanelHandlerComponents = () => {
|
|
|
8867
8817
|
}
|
|
8868
8818
|
}
|
|
8869
8819
|
else if (this.$el.$section.contains(this.$el.$selectedPlaceHolderWrapper)) {
|
|
8870
|
-
|
|
8820
|
+
const $prev = this.$el.$selectedPlaceHolderWrapper.previousElementSibling;
|
|
8871
8821
|
if ($prev) {
|
|
8872
8822
|
// 存在前一个元素,添加到前面的元素的后面
|
|
8873
8823
|
popsDOMUtils.after($prev, $tag);
|
|
@@ -8927,7 +8877,7 @@ const PanelHandlerComponents = () => {
|
|
|
8927
8877
|
this.removeSelectItemDisabled($select);
|
|
8928
8878
|
}
|
|
8929
8879
|
// 更新选中状态
|
|
8930
|
-
|
|
8880
|
+
const findValue = this.$data.selectInfo.find((it) => it.value === data.value);
|
|
8931
8881
|
if (findValue) {
|
|
8932
8882
|
this.setSelectItemSelected($select);
|
|
8933
8883
|
}
|
|
@@ -8965,8 +8915,8 @@ const PanelHandlerComponents = () => {
|
|
|
8965
8915
|
* @param $select 选项元素
|
|
8966
8916
|
*/
|
|
8967
8917
|
addSelectedItemInfo(dataList, $select) {
|
|
8968
|
-
|
|
8969
|
-
|
|
8918
|
+
const info = this.getSelectedItemInfo($select);
|
|
8919
|
+
const findValue = dataList.find((item) => item.value === info.value);
|
|
8970
8920
|
if (!findValue) {
|
|
8971
8921
|
dataList.push({
|
|
8972
8922
|
value: info.value,
|
|
@@ -8990,8 +8940,8 @@ const PanelHandlerComponents = () => {
|
|
|
8990
8940
|
* @param $select 选项元素
|
|
8991
8941
|
*/
|
|
8992
8942
|
removeSelectedItemInfo(dataList, $select) {
|
|
8993
|
-
|
|
8994
|
-
|
|
8943
|
+
const info = this.getSelectedItemInfo($select);
|
|
8944
|
+
const findIndex = dataList.findIndex((item) => item.value === info.value);
|
|
8995
8945
|
if (findIndex !== -1) {
|
|
8996
8946
|
dataList.splice(findIndex, 1);
|
|
8997
8947
|
}
|
|
@@ -9006,8 +8956,8 @@ const PanelHandlerComponents = () => {
|
|
|
9006
8956
|
getAllSelectItemInfo(onlySelected = true) {
|
|
9007
8957
|
return Array.from(this.$el.$selectContainer?.querySelectorAll(".select-item") ?? [])
|
|
9008
8958
|
.map(($select) => {
|
|
9009
|
-
|
|
9010
|
-
|
|
8959
|
+
const data = this.getSelectedItemInfo($select);
|
|
8960
|
+
const result = {
|
|
9011
8961
|
/** 选项信息数据 */
|
|
9012
8962
|
data: data,
|
|
9013
8963
|
/** 选项元素 */
|
|
@@ -9015,7 +8965,7 @@ const PanelHandlerComponents = () => {
|
|
|
9015
8965
|
};
|
|
9016
8966
|
if (onlySelected) {
|
|
9017
8967
|
// 仅选中
|
|
9018
|
-
|
|
8968
|
+
const isSelected = this.isSelectItemSelected($select);
|
|
9019
8969
|
if (isSelected) {
|
|
9020
8970
|
return result;
|
|
9021
8971
|
}
|
|
@@ -9034,7 +8984,7 @@ const PanelHandlerComponents = () => {
|
|
|
9034
8984
|
* @param data 选择项的数据
|
|
9035
8985
|
*/
|
|
9036
8986
|
createSelectItemElement(data) {
|
|
9037
|
-
|
|
8987
|
+
const $select = popsDOMUtils.createElement("li", {
|
|
9038
8988
|
className: "select-item",
|
|
9039
8989
|
innerHTML: /*html*/ `
|
|
9040
8990
|
<span class="select-item-text"></span>
|
|
@@ -9050,8 +9000,8 @@ const PanelHandlerComponents = () => {
|
|
|
9050
9000
|
* @param $select 选择项元素
|
|
9051
9001
|
*/
|
|
9052
9002
|
setSelectItemText(data, $select) {
|
|
9053
|
-
|
|
9054
|
-
|
|
9003
|
+
const text = typeof data.text === "function" ? data.text(data.value, this.$data.selectInfo) : data.text;
|
|
9004
|
+
const $selectSpan = $select.querySelector(".select-item-text");
|
|
9055
9005
|
if (data.isHTML) {
|
|
9056
9006
|
PopsSafeUtils.setSafeHTML($selectSpan, text);
|
|
9057
9007
|
}
|
|
@@ -9094,8 +9044,8 @@ const PanelHandlerComponents = () => {
|
|
|
9094
9044
|
return;
|
|
9095
9045
|
}
|
|
9096
9046
|
if (typeof formConfig.clickCallBack === "function") {
|
|
9097
|
-
|
|
9098
|
-
|
|
9047
|
+
const allSelectedInfo = this.getAllSelectItemInfo().map((it) => it.data);
|
|
9048
|
+
const clickResult = formConfig.clickCallBack(event, allSelectedInfo);
|
|
9099
9049
|
if (typeof clickResult === "boolean" && !clickResult) {
|
|
9100
9050
|
return;
|
|
9101
9051
|
}
|
|
@@ -9116,14 +9066,14 @@ const PanelHandlerComponents = () => {
|
|
|
9116
9066
|
*/
|
|
9117
9067
|
setSelectContainerClickEvent() {
|
|
9118
9068
|
const that = this;
|
|
9119
|
-
popsDOMUtils.on(this.$el.$container, "click", (
|
|
9069
|
+
popsDOMUtils.on(this.$el.$container, "click", () => {
|
|
9120
9070
|
if (this.isDisabled()) {
|
|
9121
9071
|
return;
|
|
9122
9072
|
}
|
|
9123
9073
|
/** 弹窗的选中的值 */
|
|
9124
|
-
|
|
9125
|
-
|
|
9126
|
-
|
|
9074
|
+
const selectedInfo = that.$data.selectInfo;
|
|
9075
|
+
const { style, ...userConfirmDetails } = formConfig.selectConfirmDialogDetails || {};
|
|
9076
|
+
const confirmDetails = popsUtils.assign({
|
|
9127
9077
|
title: {
|
|
9128
9078
|
text: "请勾选需要选择的选项",
|
|
9129
9079
|
position: "center",
|
|
@@ -9140,7 +9090,7 @@ const PanelHandlerComponents = () => {
|
|
|
9140
9090
|
},
|
|
9141
9091
|
close: {
|
|
9142
9092
|
enable: true,
|
|
9143
|
-
callback(details
|
|
9093
|
+
callback(details) {
|
|
9144
9094
|
that.$data.selectInfo = [...selectedInfo];
|
|
9145
9095
|
that.updateSelectTagItem();
|
|
9146
9096
|
that.$el.$selectContainer = null;
|
|
@@ -9150,7 +9100,7 @@ const PanelHandlerComponents = () => {
|
|
|
9150
9100
|
},
|
|
9151
9101
|
mask: {
|
|
9152
9102
|
enable: true,
|
|
9153
|
-
clickCallBack(originalRun
|
|
9103
|
+
clickCallBack(originalRun) {
|
|
9154
9104
|
originalRun();
|
|
9155
9105
|
that.$data.selectInfo = [...selectedInfo];
|
|
9156
9106
|
that.updateSelectTagItem();
|
|
@@ -9229,12 +9179,12 @@ const PanelHandlerComponents = () => {
|
|
|
9229
9179
|
${style || ""}
|
|
9230
9180
|
`,
|
|
9231
9181
|
}, userConfirmDetails);
|
|
9232
|
-
|
|
9233
|
-
|
|
9182
|
+
const $dialog = PopsAlert.init(confirmDetails);
|
|
9183
|
+
const $selectContainer = $dialog.$shadowRoot.querySelector(".select-container");
|
|
9234
9184
|
this.$el.$selectContainer = $selectContainer;
|
|
9235
9185
|
// 配置选项元素
|
|
9236
9186
|
formConfig.data.forEach((item) => {
|
|
9237
|
-
|
|
9187
|
+
const $select = this.createSelectItemElement(item);
|
|
9238
9188
|
// 添加到confirm中
|
|
9239
9189
|
$selectContainer.appendChild($select);
|
|
9240
9190
|
// 设置每一项的点击事件
|
|
@@ -9255,7 +9205,7 @@ const PanelHandlerComponents = () => {
|
|
|
9255
9205
|
return;
|
|
9256
9206
|
}
|
|
9257
9207
|
if (typeof formConfig.closeIconClickCallBack === "function") {
|
|
9258
|
-
|
|
9208
|
+
const result = formConfig.closeIconClickCallBack(event, {
|
|
9259
9209
|
$tag: data.$tag,
|
|
9260
9210
|
$closeIcon: data.$closeIcon,
|
|
9261
9211
|
value: data.value,
|
|
@@ -9364,14 +9314,14 @@ const PanelHandlerComponents = () => {
|
|
|
9364
9314
|
* @param formConfig
|
|
9365
9315
|
*/
|
|
9366
9316
|
createSectionContainerItem_button(formConfig) {
|
|
9367
|
-
|
|
9317
|
+
const $li = document.createElement("li");
|
|
9368
9318
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
9369
9319
|
this.setElementClassName($li, formConfig.className);
|
|
9370
9320
|
this.setElementAttributes($li, formConfig.attributes);
|
|
9371
9321
|
this.setElementProps($li, formConfig.props);
|
|
9372
9322
|
/* 左边底部的描述的文字 */
|
|
9373
9323
|
let leftDescriptionText = "";
|
|
9374
|
-
if (
|
|
9324
|
+
if (formConfig.description) {
|
|
9375
9325
|
leftDescriptionText = /*html*/ `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
9376
9326
|
}
|
|
9377
9327
|
PopsSafeUtils.setSafeHTML($li,
|
|
@@ -9512,8 +9462,8 @@ const PanelHandlerComponents = () => {
|
|
|
9512
9462
|
* @param formConfig
|
|
9513
9463
|
*/
|
|
9514
9464
|
createSectionContainerItem_deepMenu(formConfig) {
|
|
9515
|
-
|
|
9516
|
-
|
|
9465
|
+
const that = this;
|
|
9466
|
+
const $li = document.createElement("li");
|
|
9517
9467
|
popsDOMUtils.addClassName($li, "pops-panel-deepMenu-nav-item");
|
|
9518
9468
|
Reflect.set($li, "__formConfig__", formConfig);
|
|
9519
9469
|
this.setElementClassName($li, formConfig.className);
|
|
@@ -9523,12 +9473,12 @@ const PanelHandlerComponents = () => {
|
|
|
9523
9473
|
this.setElementProps($li, formConfig.props);
|
|
9524
9474
|
/* 左边底部的描述的文字 */
|
|
9525
9475
|
let leftDescriptionText = "";
|
|
9526
|
-
if (
|
|
9476
|
+
if (formConfig.description) {
|
|
9527
9477
|
// 设置描述
|
|
9528
9478
|
leftDescriptionText = `<p class="pops-panel-item-left-desc-text">${formConfig.description}</p>`;
|
|
9529
9479
|
}
|
|
9530
9480
|
// 箭头图标
|
|
9531
|
-
|
|
9481
|
+
const arrowRightIcon = typeof formConfig.arrowRightIcon === "boolean" ? formConfig.arrowRightIcon : true;
|
|
9532
9482
|
let arrowRightIconHTML = "";
|
|
9533
9483
|
if (arrowRightIcon) {
|
|
9534
9484
|
arrowRightIconHTML = `<i class="pops-panel-deepMenu-arrowRight-icon">${PopsIcon.getIcon("arrowRight")}</i>`;
|
|
@@ -9559,17 +9509,17 @@ const PanelHandlerComponents = () => {
|
|
|
9559
9509
|
* @param formItemConfig
|
|
9560
9510
|
*/
|
|
9561
9511
|
initFormItem($container, formItemConfig) {
|
|
9562
|
-
|
|
9512
|
+
const formConfig_forms = formItemConfig;
|
|
9563
9513
|
if (formConfig_forms.type === "forms") {
|
|
9564
|
-
|
|
9514
|
+
const childForms = formConfig_forms["forms"];
|
|
9565
9515
|
/* 每一项<li>元素 */
|
|
9566
|
-
|
|
9516
|
+
const formContainerListElement = document.createElement("li");
|
|
9567
9517
|
/* 每一项<li>内的子<ul>元素 */
|
|
9568
|
-
|
|
9518
|
+
const formContainerULElement = document.createElement("ul");
|
|
9569
9519
|
formContainerULElement.classList.add("pops-panel-forms-container-item-formlist");
|
|
9570
9520
|
formContainerListElement.classList.add("pops-panel-forms-container-item");
|
|
9571
9521
|
/* 区域头部的文字 */
|
|
9572
|
-
|
|
9522
|
+
const formHeaderDivElement = popsDOMUtils.createElement("div", {
|
|
9573
9523
|
className: "pops-panel-forms-container-item-header-text",
|
|
9574
9524
|
});
|
|
9575
9525
|
PopsSafeUtils.setSafeHTML(formHeaderDivElement, formConfig_forms["text"]);
|
|
@@ -9586,7 +9536,7 @@ const PanelHandlerComponents = () => {
|
|
|
9586
9536
|
</i>
|
|
9587
9537
|
`);
|
|
9588
9538
|
// 添加点击事件
|
|
9589
|
-
popsDOMUtils.on(formHeaderDivElement, "click", (
|
|
9539
|
+
popsDOMUtils.on(formHeaderDivElement, "click", () => {
|
|
9590
9540
|
if (formContainerListElement.hasAttribute("data-fold-enable")) {
|
|
9591
9541
|
formContainerListElement.removeAttribute("data-fold-enable");
|
|
9592
9542
|
}
|
|
@@ -9641,26 +9591,26 @@ const PanelHandlerComponents = () => {
|
|
|
9641
9591
|
*/
|
|
9642
9592
|
async gotoDeepMenu(event, liElement) {
|
|
9643
9593
|
/** 当前所在的容器 */
|
|
9644
|
-
|
|
9594
|
+
const $currentSection = liElement.closest("section.pops-panel-container");
|
|
9645
9595
|
// 子菜单的容器
|
|
9646
|
-
|
|
9596
|
+
const $deepMenuSection = popsDOMUtils.createElement("section", {
|
|
9647
9597
|
className: "pops-panel-container pops-panel-deepMenu-container",
|
|
9648
9598
|
});
|
|
9649
9599
|
Reflect.set($deepMenuSection, "__formConfig__", formConfig);
|
|
9650
|
-
|
|
9600
|
+
const $deepMenuHeaderUL = popsDOMUtils.createElement("ul", {
|
|
9651
9601
|
className: "pops-panel-container-header-ul pops-panel-deepMenu-container-header-ul",
|
|
9652
9602
|
});
|
|
9653
|
-
|
|
9603
|
+
const $deepMenuMain = popsDOMUtils.createElement("ul", {
|
|
9654
9604
|
className: "pops-panel-container-main-ul",
|
|
9655
9605
|
});
|
|
9656
9606
|
// 标题文字
|
|
9657
|
-
|
|
9658
|
-
|
|
9607
|
+
const headerTitleText = formConfig.headerTitle ?? formConfig.text;
|
|
9608
|
+
const $header = popsDOMUtils.createElement("li", {
|
|
9659
9609
|
className: "pops-panel-container-header-title-text pops-panel-deepMenu-container-header",
|
|
9660
9610
|
innerHTML: /*html*/ `<p class="pops-panel-deepMenu-container-header-title-text">${headerTitleText}</p>`,
|
|
9661
9611
|
});
|
|
9662
9612
|
// 返回箭头
|
|
9663
|
-
|
|
9613
|
+
const $headerLeftArrow = popsDOMUtils.createElement("i", {
|
|
9664
9614
|
className: "pops-panel-deepMenu-container-left-arrow-icon",
|
|
9665
9615
|
innerHTML: PopsIcon.getIcon("arrowLeft"),
|
|
9666
9616
|
});
|
|
@@ -9725,7 +9675,7 @@ const PanelHandlerComponents = () => {
|
|
|
9725
9675
|
$deepMenuSection.appendChild($deepMenuMain);
|
|
9726
9676
|
if (formConfig.forms && Array.isArray(formConfig.forms)) {
|
|
9727
9677
|
for (let index = 0; index < formConfig.forms.length; index++) {
|
|
9728
|
-
|
|
9678
|
+
const formItemConfig = formConfig.forms[index];
|
|
9729
9679
|
this.initFormItem($deepMenuMain, formItemConfig);
|
|
9730
9680
|
}
|
|
9731
9681
|
}
|
|
@@ -9763,7 +9713,7 @@ const PanelHandlerComponents = () => {
|
|
|
9763
9713
|
setLiClickEvent() {
|
|
9764
9714
|
popsDOMUtils.on($li, "click", void 0, async (event) => {
|
|
9765
9715
|
if (typeof formConfig.clickCallBack === "function") {
|
|
9766
|
-
|
|
9716
|
+
const result = await formConfig.clickCallBack(event, formConfig);
|
|
9767
9717
|
if (result) {
|
|
9768
9718
|
return;
|
|
9769
9719
|
}
|
|
@@ -9796,7 +9746,7 @@ const PanelHandlerComponents = () => {
|
|
|
9796
9746
|
*/
|
|
9797
9747
|
createSectionContainerItem(formConfig) {
|
|
9798
9748
|
/** 配置项的类型 */
|
|
9799
|
-
|
|
9749
|
+
const formType = formConfig.type;
|
|
9800
9750
|
if (formType === "switch") {
|
|
9801
9751
|
return this.createSectionContainerItem_switch(formConfig);
|
|
9802
9752
|
}
|
|
@@ -9834,18 +9784,18 @@ const PanelHandlerComponents = () => {
|
|
|
9834
9784
|
* @param formConfig
|
|
9835
9785
|
*/
|
|
9836
9786
|
createSectionContainerItem_forms(formConfig) {
|
|
9837
|
-
|
|
9838
|
-
|
|
9787
|
+
const that = this;
|
|
9788
|
+
const formConfig_forms = formConfig;
|
|
9839
9789
|
if (formConfig_forms.type === "forms") {
|
|
9840
|
-
|
|
9790
|
+
const childForms = formConfig["forms"];
|
|
9841
9791
|
/* 每一项<li>元素 */
|
|
9842
|
-
|
|
9792
|
+
const formContainerListElement = document.createElement("li");
|
|
9843
9793
|
/* 每一项<li>内的子<ul>元素 */
|
|
9844
|
-
|
|
9794
|
+
const formContainerULElement = document.createElement("ul");
|
|
9845
9795
|
formContainerListElement.classList.add("pops-panel-forms-container-item");
|
|
9846
9796
|
formContainerULElement.classList.add("pops-panel-forms-container-item-formlist");
|
|
9847
9797
|
/* 区域头部的文字 */
|
|
9848
|
-
|
|
9798
|
+
const formHeaderDivElement = popsDOMUtils.createElement("div", {
|
|
9849
9799
|
className: "pops-panel-forms-container-item-header-text",
|
|
9850
9800
|
});
|
|
9851
9801
|
PopsSafeUtils.setSafeHTML(formHeaderDivElement, formConfig_forms["text"]);
|
|
@@ -9861,7 +9811,7 @@ const PanelHandlerComponents = () => {
|
|
|
9861
9811
|
</i>
|
|
9862
9812
|
`);
|
|
9863
9813
|
// 添加点击事件
|
|
9864
|
-
popsDOMUtils.on(formHeaderDivElement, "click", (
|
|
9814
|
+
popsDOMUtils.on(formHeaderDivElement, "click", () => {
|
|
9865
9815
|
if (formContainerListElement.hasAttribute("data-fold-enable")) {
|
|
9866
9816
|
formContainerListElement.removeAttribute("data-fold-enable");
|
|
9867
9817
|
}
|
|
@@ -9913,7 +9863,7 @@ const PanelHandlerComponents = () => {
|
|
|
9913
9863
|
* 触发触发渲染右侧容器的事件
|
|
9914
9864
|
*/
|
|
9915
9865
|
triggerRenderRightContainer($container) {
|
|
9916
|
-
|
|
9866
|
+
const __formConfig__ = Reflect.get($container, "__formConfig__");
|
|
9917
9867
|
this.$el.$pops.dispatchEvent(new CustomEvent("pops:renderRightContainer", {
|
|
9918
9868
|
detail: {
|
|
9919
9869
|
formConfig: __formConfig__,
|
|
@@ -9926,7 +9876,7 @@ const PanelHandlerComponents = () => {
|
|
|
9926
9876
|
* @param containerOptions
|
|
9927
9877
|
*/
|
|
9928
9878
|
uListContainerAddItem(formConfig, containerOptions) {
|
|
9929
|
-
|
|
9879
|
+
const itemLiElement = this.createSectionContainerItem(formConfig);
|
|
9930
9880
|
if (itemLiElement) {
|
|
9931
9881
|
containerOptions["ulElement"].appendChild(itemLiElement);
|
|
9932
9882
|
}
|
|
@@ -9945,23 +9895,23 @@ const PanelHandlerComponents = () => {
|
|
|
9945
9895
|
setAsideItemClickEvent(asideLiElement, asideConfig) {
|
|
9946
9896
|
popsDOMUtils.on(asideLiElement, "click", async (event) => {
|
|
9947
9897
|
if (typeof asideConfig.clickFirstCallback === "function") {
|
|
9948
|
-
|
|
9898
|
+
const clickFirstCallbackResult = await asideConfig.clickFirstCallback(event, this.sectionContainerHeaderULElement, this.sectionContainerULElement);
|
|
9949
9899
|
if (typeof clickFirstCallbackResult === "boolean" && !clickFirstCallbackResult) {
|
|
9950
9900
|
return;
|
|
9951
9901
|
}
|
|
9952
9902
|
}
|
|
9953
9903
|
this.clearContainer();
|
|
9954
|
-
|
|
9904
|
+
const rightContainerFormConfig = Reflect.get(asideLiElement, "__forms__");
|
|
9955
9905
|
Reflect.set(this.$el.$contentSectionContainer, "__formConfig__", rightContainerFormConfig);
|
|
9956
9906
|
popsDOMUtils.cssShow(this.$el.$contentSectionContainer);
|
|
9957
9907
|
this.clearAsideItemIsVisited();
|
|
9958
9908
|
this.setAsideItemIsVisited(asideLiElement);
|
|
9959
9909
|
/* 顶部标题栏,存在就设置 */
|
|
9960
|
-
|
|
9910
|
+
const title = typeof asideConfig.title === "function" ? asideConfig.title() : asideConfig.title;
|
|
9961
9911
|
let headerTitleText = typeof asideConfig.headerTitle === "function" ? asideConfig.headerTitle() : asideConfig.headerTitle;
|
|
9962
9912
|
headerTitleText = headerTitleText ?? title;
|
|
9963
9913
|
if (typeof headerTitleText === "string" && headerTitleText.trim() !== "") {
|
|
9964
|
-
|
|
9914
|
+
const $containerHeaderTitle = document.createElement("li");
|
|
9965
9915
|
$containerHeaderTitle.classList.add("pops-panel-container-header-title-text");
|
|
9966
9916
|
Reflect.set($containerHeaderTitle, "__asideConfig__", asideConfig);
|
|
9967
9917
|
PopsSafeUtils.setSafeHTML($containerHeaderTitle, headerTitleText);
|
|
@@ -9972,7 +9922,7 @@ const PanelHandlerComponents = () => {
|
|
|
9972
9922
|
});
|
|
9973
9923
|
if (typeof asideConfig.clickCallback === "function") {
|
|
9974
9924
|
/* 执行回调 */
|
|
9975
|
-
|
|
9925
|
+
const asideClickCallbackResult = await asideConfig.clickCallback(event, this.sectionContainerHeaderULElement, this.sectionContainerULElement);
|
|
9976
9926
|
if (typeof asideClickCallbackResult === "boolean" && !asideClickCallbackResult) {
|
|
9977
9927
|
return;
|
|
9978
9928
|
}
|
|
@@ -10027,11 +9977,11 @@ const PopsPanel = {
|
|
|
10027
9977
|
},
|
|
10028
9978
|
]);
|
|
10029
9979
|
// 先把z-index提取出来
|
|
10030
|
-
|
|
10031
|
-
|
|
10032
|
-
|
|
10033
|
-
|
|
10034
|
-
|
|
9980
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
9981
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
9982
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
9983
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
9984
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
10035
9985
|
/*html*/ `
|
|
10036
9986
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
10037
9987
|
? config.title.text
|
|
@@ -10051,9 +10001,9 @@ const PopsPanel = {
|
|
|
10051
10001
|
/**
|
|
10052
10002
|
* 弹窗的主元素,包括动画层
|
|
10053
10003
|
*/
|
|
10054
|
-
|
|
10004
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
10055
10005
|
/* 结构元素 */
|
|
10056
|
-
|
|
10006
|
+
const { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, titleElement: $title, contentElement: $content, panelSectionWrapper: $panelSectionWrapper, contentAsideElement: $contentAside, contentSectionContainerElement: $contentSectionContainer, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
10057
10007
|
if (config.isMobile || popsUtils.isPhone()) {
|
|
10058
10008
|
popsDOMUtils.addClassName($pops, config.mobileClassName);
|
|
10059
10009
|
}
|
|
@@ -10064,10 +10014,10 @@ const PopsPanel = {
|
|
|
10064
10014
|
/**
|
|
10065
10015
|
* 已创建的元素列表
|
|
10066
10016
|
*/
|
|
10067
|
-
|
|
10017
|
+
const isCreatedElementList = [$anim];
|
|
10068
10018
|
/* 遮罩层元素 */
|
|
10069
10019
|
if (config.mask.enable) {
|
|
10070
|
-
|
|
10020
|
+
const { maskElement } = PopsHandler.handleMask({
|
|
10071
10021
|
type: popsType,
|
|
10072
10022
|
guid: guid,
|
|
10073
10023
|
config: config,
|
|
@@ -10078,7 +10028,7 @@ const PopsPanel = {
|
|
|
10078
10028
|
isCreatedElementList.push($mask);
|
|
10079
10029
|
}
|
|
10080
10030
|
/* 处理返回的配置 */
|
|
10081
|
-
|
|
10031
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
10082
10032
|
/* 为顶部右边的关闭按钮添加点击事件 */
|
|
10083
10033
|
PopsHandler.handleClickEvent("close", $headerCloseBtn, eventDetails, config.btn.close.callback);
|
|
10084
10034
|
/* 创建到页面中 */
|
|
@@ -10091,7 +10041,7 @@ const PopsPanel = {
|
|
|
10091
10041
|
if ($mask != null) {
|
|
10092
10042
|
$anim.after($mask);
|
|
10093
10043
|
}
|
|
10094
|
-
|
|
10044
|
+
const panelHandlerComponents = PanelHandlerComponents();
|
|
10095
10045
|
/**
|
|
10096
10046
|
* 处理内部配置
|
|
10097
10047
|
*/
|
|
@@ -10123,7 +10073,7 @@ const PopsPanel = {
|
|
|
10123
10073
|
endCallBack: config.dragEndCallBack,
|
|
10124
10074
|
});
|
|
10125
10075
|
}
|
|
10126
|
-
|
|
10076
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
10127
10077
|
return {
|
|
10128
10078
|
...result,
|
|
10129
10079
|
addEventListener: (event, listener, options) => {
|
|
@@ -10269,13 +10219,13 @@ const PopsPrompt = {
|
|
|
10269
10219
|
},
|
|
10270
10220
|
]);
|
|
10271
10221
|
// 先把z-index提取出来
|
|
10272
|
-
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
|
|
10222
|
+
const zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
10223
|
+
const maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
10224
|
+
const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
10225
|
+
const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
10226
|
+
const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
|
|
10227
|
+
const { contentPStyle } = PopsElementHandler.createContentStyle(popsType, config);
|
|
10228
|
+
const animHTML = PopsElementHandler.createAnim(guid, popsType, config,
|
|
10279
10229
|
/*html*/ `
|
|
10280
10230
|
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
10281
10231
|
? config.title.text
|
|
@@ -10292,8 +10242,8 @@ const PopsPrompt = {
|
|
|
10292
10242
|
/**
|
|
10293
10243
|
* 弹窗的主元素,包括动画层
|
|
10294
10244
|
*/
|
|
10295
|
-
|
|
10296
|
-
|
|
10245
|
+
const $anim = PopsElementHandler.parseElement(animHTML);
|
|
10246
|
+
const { popsElement: $pops, inputElement: $input, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, titleElement: $title, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
10297
10247
|
/**
|
|
10298
10248
|
* 遮罩层元素
|
|
10299
10249
|
*/
|
|
@@ -10301,10 +10251,10 @@ const PopsPrompt = {
|
|
|
10301
10251
|
/**
|
|
10302
10252
|
* 已创建的元素列表
|
|
10303
10253
|
*/
|
|
10304
|
-
|
|
10254
|
+
const elementList = [$anim];
|
|
10305
10255
|
if (config.mask.enable) {
|
|
10306
10256
|
// 启用遮罩层
|
|
10307
|
-
|
|
10257
|
+
const _handleMask_ = PopsHandler.handleMask({
|
|
10308
10258
|
type: popsType,
|
|
10309
10259
|
guid: guid,
|
|
10310
10260
|
config: config,
|
|
@@ -10314,7 +10264,7 @@ const PopsPrompt = {
|
|
|
10314
10264
|
$mask = _handleMask_.maskElement;
|
|
10315
10265
|
elementList.push($mask);
|
|
10316
10266
|
}
|
|
10317
|
-
|
|
10267
|
+
const eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
10318
10268
|
/* 输入框赋值初始值 */
|
|
10319
10269
|
$input.value = config.content.text;
|
|
10320
10270
|
PopsHandler.handlePromptClickEvent("close", $input, $btnClose, eventDetails, config.btn.close.callback);
|
|
@@ -10356,7 +10306,7 @@ const PopsPrompt = {
|
|
|
10356
10306
|
if (config.content.select) {
|
|
10357
10307
|
$input.select();
|
|
10358
10308
|
}
|
|
10359
|
-
|
|
10309
|
+
const result = PopsHandler.handleResultDetails(eventDetails);
|
|
10360
10310
|
return result;
|
|
10361
10311
|
},
|
|
10362
10312
|
};
|
|
@@ -10470,8 +10420,7 @@ const PopsRightClickMenu = {
|
|
|
10470
10420
|
throw new Error("config.target 不能为空");
|
|
10471
10421
|
}
|
|
10472
10422
|
if (details.data) {
|
|
10473
|
-
|
|
10474
|
-
config.data = details.data;
|
|
10423
|
+
Reflect.set(config, "data", details.data);
|
|
10475
10424
|
}
|
|
10476
10425
|
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
10477
10426
|
PopsHandler.handleInit($shadowRoot, [
|
|
@@ -10493,7 +10442,7 @@ const PopsRightClickMenu = {
|
|
|
10493
10442
|
},
|
|
10494
10443
|
]);
|
|
10495
10444
|
if (config.style != null) {
|
|
10496
|
-
|
|
10445
|
+
const cssNode = popsDOMUtils.createElement("style", {
|
|
10497
10446
|
innerHTML: config.style,
|
|
10498
10447
|
}, {
|
|
10499
10448
|
type: "text/css",
|
|
@@ -10513,7 +10462,7 @@ const PopsRightClickMenu = {
|
|
|
10513
10462
|
if (!PopsContextMenu.rootElement) {
|
|
10514
10463
|
return;
|
|
10515
10464
|
}
|
|
10516
|
-
|
|
10465
|
+
const $click = event.target;
|
|
10517
10466
|
if ($click.closest(`.pops-${popsType}`)) {
|
|
10518
10467
|
return;
|
|
10519
10468
|
}
|
|
@@ -10530,7 +10479,7 @@ const PopsRightClickMenu = {
|
|
|
10530
10479
|
if (!PopsContextMenu.rootElement) {
|
|
10531
10480
|
return;
|
|
10532
10481
|
}
|
|
10533
|
-
|
|
10482
|
+
const $click = event.target;
|
|
10534
10483
|
if ($click.closest(`.pops-${popsType}`)) {
|
|
10535
10484
|
return;
|
|
10536
10485
|
}
|
|
@@ -10581,7 +10530,7 @@ const PopsRightClickMenu = {
|
|
|
10581
10530
|
if (PopsContextMenu.rootElement) {
|
|
10582
10531
|
PopsContextMenu.closeAllMenu(PopsContextMenu.rootElement);
|
|
10583
10532
|
}
|
|
10584
|
-
|
|
10533
|
+
const rootElement = PopsContextMenu.showMenu(event, config.data, selectorTarget);
|
|
10585
10534
|
PopsContextMenu.rootElement = rootElement;
|
|
10586
10535
|
if (config.only) {
|
|
10587
10536
|
PopsHandler.handlePush(popsType, {
|
|
@@ -10620,7 +10569,8 @@ const PopsRightClickMenu = {
|
|
|
10620
10569
|
/**
|
|
10621
10570
|
* 动画结束触发的事件
|
|
10622
10571
|
*/
|
|
10623
|
-
|
|
10572
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
10573
|
+
const transitionEndEvent = (event) => {
|
|
10624
10574
|
popsDOMUtils.off($menu, popsDOMUtils.getTransitionEndNameList(), transitionEndEvent, {
|
|
10625
10575
|
capture: true,
|
|
10626
10576
|
});
|
|
@@ -10660,7 +10610,7 @@ const PopsRightClickMenu = {
|
|
|
10660
10610
|
if (rootElementMenuData?.root) {
|
|
10661
10611
|
rootElement = rootElementMenuData.root;
|
|
10662
10612
|
}
|
|
10663
|
-
|
|
10613
|
+
const childMenuList = rootElementMenuData.child;
|
|
10664
10614
|
childMenuList.forEach((childMenuElement) => {
|
|
10665
10615
|
this.animationCloseMenu(childMenuElement);
|
|
10666
10616
|
});
|
|
@@ -10672,11 +10622,11 @@ const PopsRightClickMenu = {
|
|
|
10672
10622
|
* @param isChildren 是否是rightClickMenu的某一项的子菜单
|
|
10673
10623
|
*/
|
|
10674
10624
|
createMenuContainerElement(isChildren) {
|
|
10675
|
-
|
|
10625
|
+
const $menu = popsDOMUtils.createElement("div", {
|
|
10676
10626
|
className: `pops-${popsType}`,
|
|
10677
10627
|
innerHTML: /*html*/ `<ul class="pops-${popsType}-wrapper"></ul>`,
|
|
10678
10628
|
});
|
|
10679
|
-
|
|
10629
|
+
const zIndex = this.getMenuZIndex();
|
|
10680
10630
|
if (zIndex > 10000) {
|
|
10681
10631
|
$menu.style.zIndex = zIndex.toString();
|
|
10682
10632
|
}
|
|
@@ -10707,26 +10657,26 @@ const PopsRightClickMenu = {
|
|
|
10707
10657
|
* @param isMainMenu 是否是主菜单
|
|
10708
10658
|
*/
|
|
10709
10659
|
getOffset(menuElement, mousePosition, parentInfo) {
|
|
10710
|
-
|
|
10660
|
+
const result = {
|
|
10711
10661
|
top: 0,
|
|
10712
10662
|
right: 0,
|
|
10713
10663
|
bottom: 0,
|
|
10714
10664
|
left: 0,
|
|
10715
10665
|
};
|
|
10716
|
-
|
|
10717
|
-
|
|
10666
|
+
const menuElementWidth = popsDOMUtils.width(menuElement);
|
|
10667
|
+
const menuElementHeight = popsDOMUtils.height(menuElement);
|
|
10718
10668
|
/**
|
|
10719
10669
|
* 限制的间隙距离
|
|
10720
10670
|
*/
|
|
10721
|
-
|
|
10722
|
-
|
|
10723
|
-
|
|
10671
|
+
const limitDistance = 1;
|
|
10672
|
+
const maxPageLeftOffset = popsDOMUtils.width(globalThis) - limitDistance;
|
|
10673
|
+
const maxPageTopOffset = popsDOMUtils.height(globalThis) - limitDistance;
|
|
10724
10674
|
/* left最大偏移 */
|
|
10725
|
-
|
|
10675
|
+
const maxLeftOffset = maxPageLeftOffset - menuElementWidth;
|
|
10726
10676
|
/* top最大偏移 */
|
|
10727
|
-
|
|
10728
|
-
|
|
10729
|
-
|
|
10677
|
+
const maxTopOffset = maxPageTopOffset - menuElementHeight;
|
|
10678
|
+
const chileMenuLeftOrRightDistance = config.chileMenuLeftOrRightDistance;
|
|
10679
|
+
const childMenuTopOrBottomDistance = config.childMenuTopOrBottomDistance;
|
|
10730
10680
|
let currentLeftOffset = mousePosition.x;
|
|
10731
10681
|
let currentTopOffset = mousePosition.y;
|
|
10732
10682
|
currentLeftOffset = currentLeftOffset < 0 ? 0 : currentLeftOffset;
|
|
@@ -10736,9 +10686,8 @@ const PopsRightClickMenu = {
|
|
|
10736
10686
|
// 偏移计算方式就是父菜单的右偏移+父菜单的宽度
|
|
10737
10687
|
if (parentInfo) {
|
|
10738
10688
|
// 子菜单
|
|
10739
|
-
|
|
10740
|
-
currentLeftOffset =
|
|
10741
|
-
maxPageLeftOffset - mainMenuOffset.left - chileMenuLeftOrRightDistance + limitDistance;
|
|
10689
|
+
const mainMenuOffset = popsDOMUtils.offset(parentInfo.$menu);
|
|
10690
|
+
currentLeftOffset = maxPageLeftOffset - mainMenuOffset.left - chileMenuLeftOrRightDistance + limitDistance;
|
|
10742
10691
|
}
|
|
10743
10692
|
else {
|
|
10744
10693
|
// 主菜单 默认的
|
|
@@ -10766,7 +10715,7 @@ const PopsRightClickMenu = {
|
|
|
10766
10715
|
// 超过,那么子菜单将会在放在上面
|
|
10767
10716
|
if (parentInfo) {
|
|
10768
10717
|
// 以项的top偏移为基准
|
|
10769
|
-
|
|
10718
|
+
const parentItemOffset = popsDOMUtils.offset(parentInfo.$parentItem, false);
|
|
10770
10719
|
currentTopOffset =
|
|
10771
10720
|
maxPageTopOffset - parentItemOffset.bottom - childMenuTopOrBottomDistance + limitDistance;
|
|
10772
10721
|
}
|
|
@@ -10797,7 +10746,7 @@ const PopsRightClickMenu = {
|
|
|
10797
10746
|
* @param menuListenerRootNode 右键菜单监听的元素
|
|
10798
10747
|
*/
|
|
10799
10748
|
showMenu(menuEvent, _config_, menuListenerRootNode) {
|
|
10800
|
-
|
|
10749
|
+
const menuElement = this.createMenuContainerElement(false);
|
|
10801
10750
|
Reflect.set(menuElement, "__menuData__", {
|
|
10802
10751
|
child: [],
|
|
10803
10752
|
});
|
|
@@ -10825,19 +10774,19 @@ const PopsRightClickMenu = {
|
|
|
10825
10774
|
* @param menuListenerRootNode 右键菜单监听的元素
|
|
10826
10775
|
*/
|
|
10827
10776
|
showClildMenu(menuEvent, posInfo, _config_, rootElement, targetLiElement, menuListenerRootNode) {
|
|
10828
|
-
|
|
10777
|
+
const menuElement = this.createMenuContainerElement(true);
|
|
10829
10778
|
Reflect.set(menuElement, "__menuData__", {
|
|
10830
10779
|
parent: targetLiElement,
|
|
10831
10780
|
root: rootElement,
|
|
10832
10781
|
});
|
|
10833
10782
|
// 根菜单数据
|
|
10834
|
-
|
|
10783
|
+
const rootElementMenuData = Reflect.get(rootElement, "__menuData__");
|
|
10835
10784
|
rootElementMenuData.child.push(menuElement);
|
|
10836
10785
|
// 添加子元素
|
|
10837
10786
|
PopsContextMenu.addMenuLiELement(menuEvent, rootElement, menuElement, _config_, menuListenerRootNode);
|
|
10838
10787
|
// 添加到页面
|
|
10839
10788
|
popsDOMUtils.append($shadowRoot, menuElement);
|
|
10840
|
-
|
|
10789
|
+
const $parentMenu = targetLiElement.closest(".pops-rightClickMenu");
|
|
10841
10790
|
this.handlerShowMenuCSS(menuElement, posInfo, {
|
|
10842
10791
|
$menu: $parentMenu,
|
|
10843
10792
|
$parentItem: targetLiElement,
|
|
@@ -10851,7 +10800,7 @@ const PopsRightClickMenu = {
|
|
|
10851
10800
|
* @param parentInfo 配置子菜单的父级信息
|
|
10852
10801
|
*/
|
|
10853
10802
|
handlerShowMenuCSS($menu, posInfo, parentInfo) {
|
|
10854
|
-
|
|
10803
|
+
const offset = this.getOffset($menu, {
|
|
10855
10804
|
x: posInfo.clientX,
|
|
10856
10805
|
y: posInfo.clientY,
|
|
10857
10806
|
}, parentInfo);
|
|
@@ -10877,14 +10826,14 @@ const PopsRightClickMenu = {
|
|
|
10877
10826
|
* @param menuListenerRootNode 右键菜单监听的元素
|
|
10878
10827
|
*/
|
|
10879
10828
|
addMenuLiELement(menuEvent, rootElement, menuElement, _config_, menuListenerRootNode) {
|
|
10880
|
-
|
|
10881
|
-
|
|
10829
|
+
const menuEventTarget = menuEvent.target;
|
|
10830
|
+
const menuULElement = menuElement.querySelector("ul");
|
|
10882
10831
|
_config_.forEach((item) => {
|
|
10883
|
-
|
|
10832
|
+
const menuLiElement = popsDOMUtils.parseTextToDOM(`<li></li>`);
|
|
10884
10833
|
/* 判断有无图标,有就添加进去 */
|
|
10885
10834
|
if (typeof item.icon === "string" && item.icon.trim() !== "") {
|
|
10886
|
-
|
|
10887
|
-
|
|
10835
|
+
const iconSVGHTML = PopsIcon.getIcon(item.icon) ?? item.icon;
|
|
10836
|
+
const iconElement = popsDOMUtils.parseTextToDOM(
|
|
10888
10837
|
/*html*/ `<i class="pops-${popsType}-icon" is-loading="${item.iconIsLoading ?? false}">${iconSVGHTML}</i>`);
|
|
10889
10838
|
menuLiElement.appendChild(iconElement);
|
|
10890
10839
|
}
|
|
@@ -10909,13 +10858,13 @@ const PopsRightClickMenu = {
|
|
|
10909
10858
|
}
|
|
10910
10859
|
Array.from(menuULElement.children).forEach((liElement) => {
|
|
10911
10860
|
popsDOMUtils.removeClassName(liElement, `pops-${popsType}-is-visited`);
|
|
10912
|
-
|
|
10861
|
+
const li_menuData = Reflect.get(liElement, "__menuData__");
|
|
10913
10862
|
if (!li_menuData) {
|
|
10914
10863
|
return;
|
|
10915
10864
|
}
|
|
10916
10865
|
function removeElement(element) {
|
|
10917
10866
|
element.querySelectorAll("ul li").forEach(($ele) => {
|
|
10918
|
-
|
|
10867
|
+
const menuData = Reflect.get($ele, "__menuData__");
|
|
10919
10868
|
if (menuData?.child) {
|
|
10920
10869
|
removeElement(menuData.child);
|
|
10921
10870
|
}
|
|
@@ -10926,9 +10875,9 @@ const PopsRightClickMenu = {
|
|
|
10926
10875
|
removeElement(li_menuData.child);
|
|
10927
10876
|
});
|
|
10928
10877
|
/* 清理根元素上的children不存在于页面中的元素 */
|
|
10929
|
-
|
|
10878
|
+
const root_menuData = Reflect.get(rootElement, "__menuData__");
|
|
10930
10879
|
for (let index = 0; index < root_menuData.child.length; index++) {
|
|
10931
|
-
|
|
10880
|
+
const element = root_menuData.child[index];
|
|
10932
10881
|
if (!$shadowRoot.contains(element)) {
|
|
10933
10882
|
root_menuData.child.splice(index, 1);
|
|
10934
10883
|
index--;
|
|
@@ -10938,8 +10887,8 @@ const PopsRightClickMenu = {
|
|
|
10938
10887
|
if (!item.item) {
|
|
10939
10888
|
return;
|
|
10940
10889
|
}
|
|
10941
|
-
|
|
10942
|
-
|
|
10890
|
+
const rect = menuLiElement.getBoundingClientRect();
|
|
10891
|
+
const childMenu = PopsContextMenu.showClildMenu(menuEvent, {
|
|
10943
10892
|
clientX: rect.left + popsDOMUtils.outerWidth(menuLiElement),
|
|
10944
10893
|
clientY: rect.top,
|
|
10945
10894
|
}, item.item, rootElement, menuLiElement, menuListenerRootNode);
|
|
@@ -10960,8 +10909,10 @@ const PopsRightClickMenu = {
|
|
|
10960
10909
|
},
|
|
10961
10910
|
});
|
|
10962
10911
|
}
|
|
10963
|
-
catch
|
|
10964
|
-
|
|
10912
|
+
catch {
|
|
10913
|
+
// 忽略
|
|
10914
|
+
}
|
|
10915
|
+
const callbackResult = await item.callback(clickEvent, menuEvent, menuLiElement, menuListenerRootNode);
|
|
10965
10916
|
if (typeof callbackResult === "boolean" && callbackResult == false) {
|
|
10966
10917
|
return;
|
|
10967
10918
|
}
|
|
@@ -11004,8 +10955,8 @@ const searchSuggestionConfig = () => {
|
|
|
11004
10955
|
console.log("删除当前项", [event, $dataItem, dataItem, config]);
|
|
11005
10956
|
return true;
|
|
11006
10957
|
},
|
|
11007
|
-
itemView(dateItem
|
|
11008
|
-
return
|
|
10958
|
+
itemView(dateItem) {
|
|
10959
|
+
return `${dateItem.value}-html`;
|
|
11009
10960
|
},
|
|
11010
10961
|
clickCallback(event, $dataItem, dataItem, config) {
|
|
11011
10962
|
console.log("item项的点击回调", [event, $dataItem, data, config]);
|
|
@@ -11083,7 +11034,7 @@ const PopsSearchSuggestion = {
|
|
|
11083
11034
|
},
|
|
11084
11035
|
]);
|
|
11085
11036
|
if (config.style != null) {
|
|
11086
|
-
|
|
11037
|
+
const cssNode = document.createElement("style");
|
|
11087
11038
|
popsDOMUtils.createElement("style", {
|
|
11088
11039
|
innerHTML: config.style,
|
|
11089
11040
|
}, {
|
|
@@ -11131,8 +11082,7 @@ const PopsSearchSuggestion = {
|
|
|
11131
11082
|
Reflect.set(SearchSuggestion.$el.root, "data-SearchSuggestion", SearchSuggestion);
|
|
11132
11083
|
SearchSuggestion.$el.$dynamicCSS =
|
|
11133
11084
|
SearchSuggestion.$el.root.querySelector("style[data-dynamic]");
|
|
11134
|
-
SearchSuggestion.$el.$hintULContainer =
|
|
11135
|
-
SearchSuggestion.$el.root.querySelector("ul");
|
|
11085
|
+
SearchSuggestion.$el.$hintULContainer = SearchSuggestion.$el.root.querySelector("ul");
|
|
11136
11086
|
},
|
|
11137
11087
|
/**
|
|
11138
11088
|
* 获取数据
|
|
@@ -11151,7 +11101,7 @@ const PopsSearchSuggestion = {
|
|
|
11151
11101
|
* 获取显示出搜索建议框的html
|
|
11152
11102
|
*/
|
|
11153
11103
|
createSearchSelectElement() {
|
|
11154
|
-
|
|
11104
|
+
const $el = popsDOMUtils.createElement("div", {
|
|
11155
11105
|
className: `pops pops-${popsType}-search-suggestion`,
|
|
11156
11106
|
innerHTML: /*html*/ `
|
|
11157
11107
|
<style type="text/css">
|
|
@@ -11352,7 +11302,7 @@ const PopsSearchSuggestion = {
|
|
|
11352
11302
|
*/
|
|
11353
11303
|
createSearchItemLiElement(dataItem, dateItemIndex) {
|
|
11354
11304
|
const dataValue = SearchSuggestion.getItemDataValue(dataItem);
|
|
11355
|
-
|
|
11305
|
+
const $li = popsDOMUtils.createElement("li", {
|
|
11356
11306
|
className: `pops-${popsType}-search-suggestion-hint-item`,
|
|
11357
11307
|
"data-index": dateItemIndex,
|
|
11358
11308
|
"data-value": dataValue,
|
|
@@ -11360,7 +11310,7 @@ const PopsSearchSuggestion = {
|
|
|
11360
11310
|
Reflect.set($li, "data-index", dateItemIndex);
|
|
11361
11311
|
Reflect.set($li, "data-value", dataValue);
|
|
11362
11312
|
// 项内容
|
|
11363
|
-
|
|
11313
|
+
const $itemInner = dataItem.itemView(dataItem, $li, config);
|
|
11364
11314
|
if (typeof $itemInner === "string") {
|
|
11365
11315
|
PopsSafeUtils.setSafeHTML($li, $itemInner);
|
|
11366
11316
|
}
|
|
@@ -11370,7 +11320,7 @@ const PopsSearchSuggestion = {
|
|
|
11370
11320
|
// 删除按钮
|
|
11371
11321
|
const enableDeleteButton = dataItem.enableDeleteButton;
|
|
11372
11322
|
if (typeof enableDeleteButton === "boolean" && enableDeleteButton) {
|
|
11373
|
-
|
|
11323
|
+
const $deleteIcon = SearchSuggestion.createItemDeleteIcon();
|
|
11374
11324
|
popsDOMUtils.append($li, $deleteIcon);
|
|
11375
11325
|
}
|
|
11376
11326
|
popsDOMUtils.addClassName($li, PopsCommonCSSClassName.flexCenter);
|
|
@@ -11384,14 +11334,14 @@ const PopsSearchSuggestion = {
|
|
|
11384
11334
|
setSearchItemClickEvent($searchItem) {
|
|
11385
11335
|
popsDOMUtils.on($searchItem, "click", async (event) => {
|
|
11386
11336
|
popsDOMUtils.preventEvent(event);
|
|
11387
|
-
|
|
11337
|
+
const $click = event.target;
|
|
11388
11338
|
const data = SearchSuggestion.getData();
|
|
11389
11339
|
const dataItem = Reflect.get($searchItem, "data-value");
|
|
11390
|
-
|
|
11340
|
+
const isDelete = Boolean($click.closest(`.pops-${popsType}-delete-icon`));
|
|
11391
11341
|
if (isDelete) {
|
|
11392
11342
|
// 删除
|
|
11393
11343
|
if (typeof dataItem.deleteButtonClickCallback === "function") {
|
|
11394
|
-
|
|
11344
|
+
const result = await dataItem.deleteButtonClickCallback(event, $searchItem, dataItem, config);
|
|
11395
11345
|
if (typeof result === "boolean" && result) {
|
|
11396
11346
|
data.splice(data.indexOf(dataItem), 1);
|
|
11397
11347
|
$searchItem.remove();
|
|
@@ -11406,7 +11356,7 @@ const PopsSearchSuggestion = {
|
|
|
11406
11356
|
else {
|
|
11407
11357
|
// 点击选择项
|
|
11408
11358
|
if (typeof dataItem.clickCallback === "function") {
|
|
11409
|
-
|
|
11359
|
+
const result = await dataItem.clickCallback(event, $searchItem, dataItem, config);
|
|
11410
11360
|
if (typeof result === "boolean" && result) {
|
|
11411
11361
|
if (config.inputTarget instanceof HTMLInputElement ||
|
|
11412
11362
|
config.inputTarget instanceof HTMLTextAreaElement) {
|
|
@@ -11423,6 +11373,7 @@ const PopsSearchSuggestion = {
|
|
|
11423
11373
|
* 设置搜索建议框每一项的选中事件
|
|
11424
11374
|
* @param liElement
|
|
11425
11375
|
*/
|
|
11376
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11426
11377
|
setSearchItemSelectEvent(liElement) {
|
|
11427
11378
|
// popsDOMUtils.on(
|
|
11428
11379
|
// liElement,
|
|
@@ -11444,17 +11395,18 @@ const PopsSearchSuggestion = {
|
|
|
11444
11395
|
capture: true,
|
|
11445
11396
|
}) {
|
|
11446
11397
|
/* 必须是input或者textarea才有input事件 */
|
|
11447
|
-
if (!(config.inputTarget instanceof HTMLInputElement ||
|
|
11448
|
-
config.inputTarget instanceof HTMLTextAreaElement)) {
|
|
11398
|
+
if (!(config.inputTarget instanceof HTMLInputElement || config.inputTarget instanceof HTMLTextAreaElement)) {
|
|
11449
11399
|
return;
|
|
11450
11400
|
}
|
|
11451
11401
|
/* 是input输入框 */
|
|
11452
11402
|
/* 禁用输入框自动提示 */
|
|
11453
11403
|
config.inputTarget.setAttribute("autocomplete", "off");
|
|
11454
11404
|
/* 内容改变事件 */
|
|
11455
|
-
const listenerHandler = popsDOMUtils.onInput(config.inputTarget,
|
|
11405
|
+
const listenerHandler = popsDOMUtils.onInput(config.inputTarget,
|
|
11406
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11407
|
+
async (_event) => {
|
|
11456
11408
|
const data = SearchSuggestion.getData();
|
|
11457
|
-
|
|
11409
|
+
const queryDataResult = await config.inputTargetChangeRefreshShowDataCallback(config.inputTarget.value, data, config);
|
|
11458
11410
|
SearchSuggestion.update(queryDataResult);
|
|
11459
11411
|
SearchSuggestion.updateStyleSheet();
|
|
11460
11412
|
}, option);
|
|
@@ -11463,7 +11415,9 @@ const PopsSearchSuggestion = {
|
|
|
11463
11415
|
/**
|
|
11464
11416
|
* 移除输入框内容改变的监听
|
|
11465
11417
|
*/
|
|
11466
|
-
removeInputChangeEvent(
|
|
11418
|
+
removeInputChangeEvent(
|
|
11419
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
11420
|
+
option = {
|
|
11467
11421
|
capture: true,
|
|
11468
11422
|
}) {
|
|
11469
11423
|
for (let index = 0; index < SearchSuggestion.$evt.offInputChangeEvtHandler.length; index++) {
|
|
@@ -11598,7 +11552,7 @@ const PopsSearchSuggestion = {
|
|
|
11598
11552
|
* 获取删除按钮的html
|
|
11599
11553
|
*/
|
|
11600
11554
|
createItemDeleteIcon(size = 16, fill = "#bababa") {
|
|
11601
|
-
|
|
11555
|
+
const $svg = popsDOMUtils.parseTextToDOM(/*html*/ `
|
|
11602
11556
|
<svg class="pops-${popsType}-delete-icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="${fill}">
|
|
11603
11557
|
<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>
|
|
11604
11558
|
<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>
|
|
@@ -11610,7 +11564,7 @@ const PopsSearchSuggestion = {
|
|
|
11610
11564
|
* 设置当前正在搜索中的提示
|
|
11611
11565
|
*/
|
|
11612
11566
|
setPromptsInSearch() {
|
|
11613
|
-
|
|
11567
|
+
const $isSearching = popsDOMUtils.createElement("li", {
|
|
11614
11568
|
className: `pops-${popsType}-search-suggestion-hint-searching-item`,
|
|
11615
11569
|
innerHTML: config.searchingTip,
|
|
11616
11570
|
});
|
|
@@ -11648,12 +11602,12 @@ const PopsSearchSuggestion = {
|
|
|
11648
11602
|
documentHeight = popsDOMUtils.height(document);
|
|
11649
11603
|
}
|
|
11650
11604
|
// 文档最大宽度
|
|
11651
|
-
|
|
11605
|
+
const documentWidth = popsDOMUtils.width(document);
|
|
11652
11606
|
let position = config.position;
|
|
11653
11607
|
if (config.position === "auto") {
|
|
11654
11608
|
// 需目标高度+搜索建议框高度大于文档高度,则显示在上面
|
|
11655
|
-
|
|
11656
|
-
|
|
11609
|
+
const targetBottom = targetRect.bottom;
|
|
11610
|
+
const searchSuggestionContainerHeight = popsDOMUtils.height(SearchSuggestion.$el.$hintULContainer);
|
|
11657
11611
|
if (targetBottom + searchSuggestionContainerHeight > documentHeight) {
|
|
11658
11612
|
// 在上面
|
|
11659
11613
|
position = "top";
|
|
@@ -11673,7 +11627,7 @@ const PopsSearchSuggestion = {
|
|
|
11673
11627
|
// 翻转折叠
|
|
11674
11628
|
SearchSuggestion.$el.root.setAttribute("data-popper-placement", "top");
|
|
11675
11629
|
}
|
|
11676
|
-
|
|
11630
|
+
const bottom = documentHeight - targetRect.top + config.topDistance;
|
|
11677
11631
|
SearchSuggestion.$el.root.style.top = "";
|
|
11678
11632
|
SearchSuggestion.$el.root.style.bottom = bottom + "px";
|
|
11679
11633
|
}
|
|
@@ -11682,13 +11636,13 @@ const PopsSearchSuggestion = {
|
|
|
11682
11636
|
if (config.useFoldAnimation) {
|
|
11683
11637
|
SearchSuggestion.$el.root.setAttribute("data-popper-placement", "bottom-center");
|
|
11684
11638
|
}
|
|
11685
|
-
|
|
11639
|
+
const top = targetRect.height + targetRect.top + config.topDistance;
|
|
11686
11640
|
SearchSuggestion.$el.root.removeAttribute("data-top-reverse");
|
|
11687
11641
|
SearchSuggestion.$el.root.style.bottom = "";
|
|
11688
11642
|
SearchSuggestion.$el.root.style.top = top + "px";
|
|
11689
11643
|
}
|
|
11690
11644
|
let left = targetRect.left;
|
|
11691
|
-
|
|
11645
|
+
const hintUIWidth = popsDOMUtils.width(SearchSuggestion.$el.$hintULContainer);
|
|
11692
11646
|
if (hintUIWidth > documentWidth) {
|
|
11693
11647
|
// 超出宽度
|
|
11694
11648
|
left = left + documentWidth - hintUIWidth;
|
|
@@ -11709,7 +11663,7 @@ const PopsSearchSuggestion = {
|
|
|
11709
11663
|
* @param target 目标元素
|
|
11710
11664
|
*/
|
|
11711
11665
|
changeHintULElementWidth(target = config.target ?? config.inputTarget) {
|
|
11712
|
-
|
|
11666
|
+
const targetRect = target.getBoundingClientRect();
|
|
11713
11667
|
if (config.followTargetWidth) {
|
|
11714
11668
|
SearchSuggestion.$el.$hintULContainer.style.width = targetRect.width + "px";
|
|
11715
11669
|
}
|
|
@@ -11721,7 +11675,7 @@ const PopsSearchSuggestion = {
|
|
|
11721
11675
|
* 动态更新CSS
|
|
11722
11676
|
*/
|
|
11723
11677
|
updateDynamicCSS() {
|
|
11724
|
-
|
|
11678
|
+
const cssText = SearchSuggestion.getDynamicCSS();
|
|
11725
11679
|
PopsSafeUtils.setSafeHTML(SearchSuggestion.$el.$dynamicCSS, cssText);
|
|
11726
11680
|
},
|
|
11727
11681
|
/**
|
|
@@ -11763,9 +11717,9 @@ const PopsSearchSuggestion = {
|
|
|
11763
11717
|
}
|
|
11764
11718
|
SearchSuggestion.clear(true);
|
|
11765
11719
|
/* 添加进ul中 */
|
|
11766
|
-
|
|
11720
|
+
const fragment = document.createDocumentFragment();
|
|
11767
11721
|
data.forEach((item, index) => {
|
|
11768
|
-
|
|
11722
|
+
const $item = SearchSuggestion.createSearchItemLiElement(item, index);
|
|
11769
11723
|
SearchSuggestion.setSearchItemClickEvent($item);
|
|
11770
11724
|
SearchSuggestion.setSearchItemSelectEvent($item);
|
|
11771
11725
|
fragment.appendChild($item);
|
|
@@ -11833,11 +11787,13 @@ const PopsSearchSuggestion = {
|
|
|
11833
11787
|
},
|
|
11834
11788
|
};
|
|
11835
11789
|
|
|
11790
|
+
const version = "2.4.6";
|
|
11791
|
+
|
|
11836
11792
|
class Pops {
|
|
11837
11793
|
/** 配置 */
|
|
11838
11794
|
config = {
|
|
11839
11795
|
/** 版本号 */
|
|
11840
|
-
version:
|
|
11796
|
+
version: version,
|
|
11841
11797
|
cssText: PopsCSS,
|
|
11842
11798
|
/** icon图标的svg代码 */
|
|
11843
11799
|
iconSVG: PopsIcon.$data,
|
|
@@ -11872,9 +11828,7 @@ class Pops {
|
|
|
11872
11828
|
if (typeof PopsCore.globalThis.pops === "object") {
|
|
11873
11829
|
popsUtils.delete(PopsCore.globalThis, "pops");
|
|
11874
11830
|
}
|
|
11875
|
-
if (typeof unsafeWindow === "object" &&
|
|
11876
|
-
unsafeWindow != null &&
|
|
11877
|
-
typeof unsafeWindow.pops === "object") {
|
|
11831
|
+
if (typeof unsafeWindow === "object" && unsafeWindow != null && typeof unsafeWindow.pops === "object") {
|
|
11878
11832
|
popsUtils.delete(unsafeWindow, "pops");
|
|
11879
11833
|
}
|
|
11880
11834
|
return new Pops();
|
|
@@ -11895,7 +11849,7 @@ class Pops {
|
|
|
11895
11849
|
* @param details 配置
|
|
11896
11850
|
*/
|
|
11897
11851
|
alert = (details) => {
|
|
11898
|
-
|
|
11852
|
+
const dialog = PopsAlert.init(details);
|
|
11899
11853
|
return dialog;
|
|
11900
11854
|
};
|
|
11901
11855
|
/**
|
|
@@ -11903,7 +11857,7 @@ class Pops {
|
|
|
11903
11857
|
* @param details 配置
|
|
11904
11858
|
*/
|
|
11905
11859
|
confirm = (details) => {
|
|
11906
|
-
|
|
11860
|
+
const dialog = PopsConfirm.init(details);
|
|
11907
11861
|
return dialog;
|
|
11908
11862
|
};
|
|
11909
11863
|
/**
|
|
@@ -11911,7 +11865,7 @@ class Pops {
|
|
|
11911
11865
|
* @param details 配置
|
|
11912
11866
|
*/
|
|
11913
11867
|
prompt = (details) => {
|
|
11914
|
-
|
|
11868
|
+
const dialog = PopsPrompt.init(details);
|
|
11915
11869
|
return dialog;
|
|
11916
11870
|
};
|
|
11917
11871
|
/**
|
|
@@ -11919,7 +11873,7 @@ class Pops {
|
|
|
11919
11873
|
* @param details 配置
|
|
11920
11874
|
*/
|
|
11921
11875
|
loading = (details) => {
|
|
11922
|
-
|
|
11876
|
+
const popsLoading = PopsLoading.init(details);
|
|
11923
11877
|
return popsLoading;
|
|
11924
11878
|
};
|
|
11925
11879
|
/**
|
|
@@ -11927,7 +11881,7 @@ class Pops {
|
|
|
11927
11881
|
* @param details 配置
|
|
11928
11882
|
*/
|
|
11929
11883
|
iframe = (details) => {
|
|
11930
|
-
|
|
11884
|
+
const dialog = PopsIframe.init(details);
|
|
11931
11885
|
return dialog;
|
|
11932
11886
|
};
|
|
11933
11887
|
/**
|
|
@@ -11935,7 +11889,7 @@ class Pops {
|
|
|
11935
11889
|
* @param details 配置
|
|
11936
11890
|
*/
|
|
11937
11891
|
tooltip = (details) => {
|
|
11938
|
-
|
|
11892
|
+
const popsTooltip = PopsTooltip.init(details);
|
|
11939
11893
|
return popsTooltip;
|
|
11940
11894
|
};
|
|
11941
11895
|
/**
|
|
@@ -11943,7 +11897,7 @@ class Pops {
|
|
|
11943
11897
|
* @param details 配置
|
|
11944
11898
|
*/
|
|
11945
11899
|
drawer = (details) => {
|
|
11946
|
-
|
|
11900
|
+
const dialog = PopsDrawer.init(details);
|
|
11947
11901
|
return dialog;
|
|
11948
11902
|
};
|
|
11949
11903
|
/**
|
|
@@ -11951,7 +11905,7 @@ class Pops {
|
|
|
11951
11905
|
* @param details 配置
|
|
11952
11906
|
*/
|
|
11953
11907
|
folder = (details) => {
|
|
11954
|
-
|
|
11908
|
+
const dialog = PopsFolder.init(details);
|
|
11955
11909
|
return dialog;
|
|
11956
11910
|
};
|
|
11957
11911
|
/**
|
|
@@ -11959,7 +11913,7 @@ class Pops {
|
|
|
11959
11913
|
* @param details 配置
|
|
11960
11914
|
*/
|
|
11961
11915
|
panel = (details) => {
|
|
11962
|
-
|
|
11916
|
+
const dialog = PopsPanel.init(details);
|
|
11963
11917
|
return dialog;
|
|
11964
11918
|
};
|
|
11965
11919
|
/**
|
|
@@ -11967,7 +11921,7 @@ class Pops {
|
|
|
11967
11921
|
* @param details 配置
|
|
11968
11922
|
*/
|
|
11969
11923
|
rightClickMenu = (details) => {
|
|
11970
|
-
|
|
11924
|
+
const popsRightClickMenu = PopsRightClickMenu.init(details);
|
|
11971
11925
|
return popsRightClickMenu;
|
|
11972
11926
|
};
|
|
11973
11927
|
/**
|
|
@@ -11988,7 +11942,7 @@ class Pops {
|
|
|
11988
11942
|
* searchSuggestion.setAllEvent();
|
|
11989
11943
|
*/
|
|
11990
11944
|
searchSuggestion = (details) => {
|
|
11991
|
-
|
|
11945
|
+
const popsSearchSuggestion = PopsSearchSuggestion.init(details);
|
|
11992
11946
|
return popsSearchSuggestion;
|
|
11993
11947
|
};
|
|
11994
11948
|
}
|