@whitesev/pops 2.1.7 → 2.1.9

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.
Files changed (52) hide show
  1. package/dist/index.amd.js +398 -111
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.cjs.js +398 -111
  4. package/dist/index.cjs.js.map +1 -1
  5. package/dist/index.esm.js +398 -111
  6. package/dist/index.esm.js.map +1 -1
  7. package/dist/index.iife.js +398 -111
  8. package/dist/index.iife.js.map +1 -1
  9. package/dist/index.system.js +397 -110
  10. package/dist/index.system.js.map +1 -1
  11. package/dist/index.umd.js +398 -111
  12. package/dist/index.umd.js.map +1 -1
  13. package/dist/types/src/Pops.d.ts +1 -0
  14. package/dist/types/src/components/panel/handlerComponents.d.ts +5 -1
  15. package/dist/types/src/components/panel/types/components-button.d.ts +3 -1
  16. package/dist/types/src/components/panel/types/components-deepMenu.d.ts +3 -1
  17. package/dist/types/src/components/panel/types/components-forms.d.ts +3 -1
  18. package/dist/types/src/components/panel/types/components-input.d.ts +3 -1
  19. package/dist/types/src/components/panel/types/components-select.d.ts +3 -1
  20. package/dist/types/src/components/panel/types/components-selectMultiple.d.ts +3 -1
  21. package/dist/types/src/components/panel/types/components-slider.d.ts +3 -1
  22. package/dist/types/src/components/panel/types/components-switch.d.ts +3 -1
  23. package/dist/types/src/components/panel/types/components-textarea.d.ts +3 -1
  24. package/dist/types/src/components/panel/types/index.d.ts +44 -19
  25. package/dist/types/src/handler/PopsHandler.d.ts +6 -3
  26. package/package.json +5 -5
  27. package/src/Pops.ts +1 -1
  28. package/src/components/alert/index.ts +30 -9
  29. package/src/components/confirm/index.ts +30 -9
  30. package/src/components/drawer/index.ts +30 -9
  31. package/src/components/folder/index.ts +29 -8
  32. package/src/components/iframe/index.ts +25 -7
  33. package/src/components/loading/index.ts +3 -1
  34. package/src/components/panel/config.ts +46 -0
  35. package/src/components/panel/handlerComponents.ts +92 -33
  36. package/src/components/panel/index.css +132 -73
  37. package/src/components/panel/index.ts +33 -11
  38. package/src/components/panel/types/components-button.ts +7 -3
  39. package/src/components/panel/types/components-deepMenu.ts +7 -3
  40. package/src/components/panel/types/components-forms.ts +7 -3
  41. package/src/components/panel/types/components-input.ts +7 -3
  42. package/src/components/panel/types/components-select.ts +7 -3
  43. package/src/components/panel/types/components-selectMultiple.ts +7 -3
  44. package/src/components/panel/types/components-slider.ts +7 -3
  45. package/src/components/panel/types/components-switch.ts +7 -3
  46. package/src/components/panel/types/components-textarea.ts +7 -3
  47. package/src/components/panel/types/index.ts +59 -27
  48. package/src/components/prompt/index.ts +29 -8
  49. package/src/components/rightClickMenu/index.ts +16 -4
  50. package/src/components/searchSuggestion/index.ts +12 -3
  51. package/src/components/tooltip/index.ts +16 -4
  52. package/src/handler/PopsHandler.ts +42 -11
@@ -34,9 +34,13 @@ import type { PopsPanelTextAreaDetails } from "./types/components-textarea";
34
34
  export const PanelHandlerComponents = () => {
35
35
  return {
36
36
  /**
37
- * 左侧的ul容器
37
+ * 左侧上方的的ul容器
38
38
  */
39
39
  asideULElement: null as any as HTMLUListElement,
40
+ /**
41
+ * 左侧下方的ul容器
42
+ */
43
+ asideBottomULElement: null as any as HTMLUListElement,
40
44
  /**
41
45
  * 右侧主内容的顶部文字ul容器
42
46
  */
@@ -71,31 +75,48 @@ export const PanelHandlerComponents = () => {
71
75
  $contentSectionContainer: HTMLElement;
72
76
  };
73
77
  }) {
78
+ const PopsType = "panel";
74
79
  this.$el = {
75
80
  ...details.$el,
76
81
  };
77
82
 
78
83
  this.asideULElement =
79
- this.$el.$contentAside.querySelector<HTMLUListElement>("ul")!;
84
+ this.$el.$contentAside.querySelector<HTMLUListElement>(
85
+ `ul.pops-${PopsType}-aside-top-container`
86
+ )!;
87
+ this.asideBottomULElement =
88
+ this.$el.$contentAside.querySelector<HTMLUListElement>(
89
+ `ul.pops-${PopsType}-aside-bottom-container`
90
+ )!;
80
91
  this.sectionContainerHeaderULElement =
81
- this.$el.$contentSectionContainer.querySelectorAll<HTMLUListElement>(
82
- "ul"
83
- )[0];
92
+ this.$el.$contentSectionContainer.querySelector<HTMLUListElement>(
93
+ `ul.pops-${PopsType}-container-header-ul`
94
+ )!;
84
95
  this.sectionContainerULElement =
85
- this.$el.$contentSectionContainer.querySelectorAll<HTMLUListElement>(
86
- "ul"
87
- )[1];
96
+ this.$el.$contentSectionContainer.querySelector<HTMLUListElement>(
97
+ `ul.pops-${PopsType}-container-main-ul`
98
+ )!;
88
99
  /**
89
100
  * 默认点击的左侧容器项
90
101
  */
91
- let $asideDefaultItemElement: HTMLLIElement | null = null;
102
+ let $defaultAsideItem: HTMLLIElement | null = null;
92
103
  /** 是否滚动到默认位置(第一个项) */
93
104
  let isScrollToDefaultView = false;
105
+ // 初始化配置
94
106
  details.config.content.forEach((asideItemConfig) => {
95
107
  let $asideLiElement = this.createAsideItem(asideItemConfig);
96
108
  this.setAsideItemClickEvent($asideLiElement, asideItemConfig);
97
- this.asideULElement.appendChild($asideLiElement);
98
- if ($asideDefaultItemElement == null) {
109
+ // 是否处于底部
110
+ let isBottom =
111
+ typeof asideItemConfig.isBottom === "function"
112
+ ? asideItemConfig.isBottom()
113
+ : asideItemConfig.isBottom;
114
+ if (isBottom) {
115
+ this.asideBottomULElement.appendChild($asideLiElement);
116
+ } else {
117
+ this.asideULElement.appendChild($asideLiElement);
118
+ }
119
+ if ($defaultAsideItem == null) {
99
120
  let flag = false;
100
121
  if (typeof asideItemConfig.isDefault === "function") {
101
122
  flag = Boolean(asideItemConfig.isDefault());
@@ -103,7 +124,7 @@ export const PanelHandlerComponents = () => {
103
124
  flag = Boolean(asideItemConfig.isDefault);
104
125
  }
105
126
  if (flag) {
106
- $asideDefaultItemElement = $asideLiElement;
127
+ $defaultAsideItem = $asideLiElement;
107
128
  isScrollToDefaultView = Boolean(
108
129
  asideItemConfig.scrollToDefaultView
109
130
  );
@@ -119,19 +140,15 @@ export const PanelHandlerComponents = () => {
119
140
  });
120
141
 
121
142
  /* 点击左侧列表 */
122
- if (
123
- $asideDefaultItemElement == null &&
124
- this.asideULElement.children.length
125
- ) {
143
+ if ($defaultAsideItem == null && this.asideULElement.children.length) {
126
144
  /* 默认第一个 */
127
- $asideDefaultItemElement = this.asideULElement
128
- .children[0] as HTMLLIElement;
145
+ $defaultAsideItem = <HTMLLIElement>this.asideULElement.children[0];
129
146
  }
130
- if ($asideDefaultItemElement) {
147
+ if ($defaultAsideItem) {
131
148
  /* 点击选择的那一项 */
132
- $asideDefaultItemElement.click();
149
+ $defaultAsideItem.click();
133
150
  if (isScrollToDefaultView) {
134
- $asideDefaultItemElement?.scrollIntoView();
151
+ $defaultAsideItem?.scrollIntoView();
135
152
  }
136
153
  } else {
137
154
  console.error("pops.panel:左侧容器没有项");
@@ -239,11 +256,28 @@ export const PanelHandlerComponents = () => {
239
256
  let $li = document.createElement("li");
240
257
  $li.id = asideConfig.id;
241
258
  Reflect.set($li, "__forms__", asideConfig.forms);
242
- PopsSafeUtils.setSafeHTML($li, asideConfig.title);
259
+ let title =
260
+ typeof asideConfig.title === "function"
261
+ ? asideConfig.title()
262
+ : asideConfig.title;
263
+ PopsSafeUtils.setSafeHTML($li, title);
243
264
  /* 处理className */
244
265
  this.setElementClassName($li, asideConfig.className);
245
266
  this.setElementAttributes($li, asideConfig.attributes);
246
267
  this.setElementProps($li, asideConfig.props);
268
+ /** 禁用左侧项的hover的CSS样式的类名 */
269
+ const disableAsideItemHoverCSSClassName =
270
+ "pops-panel-disabled-aside-hover-css";
271
+ /** 是否禁用左侧项的hover的CSS样式 */
272
+ let disableAsideItemHoverCSS =
273
+ typeof asideConfig.disableAsideItemHoverCSS === "function"
274
+ ? asideConfig.disableAsideItemHoverCSS()
275
+ : asideConfig.disableAsideItemHoverCSS;
276
+ if (disableAsideItemHoverCSS) {
277
+ $li.classList.add(disableAsideItemHoverCSSClassName);
278
+ } else {
279
+ $li.classList.remove(disableAsideItemHoverCSSClassName);
280
+ }
247
281
  return $li;
248
282
  },
249
283
  /**
@@ -2977,28 +3011,47 @@ export const PanelHandlerComponents = () => {
2977
3011
  asideLiElement: HTMLElement,
2978
3012
  asideConfig: PopsPanelContentConfig
2979
3013
  ) {
2980
- const that = this;
2981
3014
  popsDOMUtils.on<MouseEvent | PointerEvent>(
2982
3015
  asideLiElement,
2983
3016
  "click",
2984
- void 0,
2985
- (event) => {
3017
+ async (event) => {
3018
+ if (typeof asideConfig.clickFirstCallback === "function") {
3019
+ let clickFirstCallbackResult = await asideConfig.clickFirstCallback(
3020
+ event,
3021
+ this.sectionContainerHeaderULElement,
3022
+ this.sectionContainerULElement
3023
+ );
3024
+ if (
3025
+ typeof clickFirstCallbackResult === "boolean" &&
3026
+ !clickFirstCallbackResult
3027
+ ) {
3028
+ return;
3029
+ }
3030
+ }
2986
3031
  this.clearContainer();
2987
- let rightContainerFormConfig = Reflect.get(
3032
+ let rightContainerFormConfig: PopsPanelContentConfig[] = Reflect.get(
2988
3033
  asideLiElement,
2989
3034
  "__forms__"
2990
- ) as PopsPanelContentConfig[];
3035
+ );
2991
3036
 
2992
3037
  Reflect.set(
2993
- that.$el.$contentSectionContainer,
3038
+ this.$el.$contentSectionContainer,
2994
3039
  "__formConfig__",
2995
3040
  rightContainerFormConfig
2996
3041
  );
2997
- popsDOMUtils.cssShow(that.$el.$contentSectionContainer);
3042
+ popsDOMUtils.cssShow(this.$el.$contentSectionContainer);
2998
3043
  this.clearAsideItemIsVisited();
2999
3044
  this.setAsideItemIsVisited(asideLiElement);
3000
3045
  /* 顶部标题栏,存在就设置 */
3001
- let headerTitleText = asideConfig.headerTitle ?? asideConfig.title;
3046
+ let title =
3047
+ typeof asideConfig.title === "function"
3048
+ ? asideConfig.title()
3049
+ : asideConfig.title;
3050
+ let headerTitleText =
3051
+ typeof asideConfig.headerTitle === "function"
3052
+ ? asideConfig.headerTitle()
3053
+ : asideConfig.headerTitle;
3054
+ headerTitleText = headerTitleText ?? title;
3002
3055
  if (
3003
3056
  typeof headerTitleText === "string" &&
3004
3057
  headerTitleText.trim() !== ""
@@ -3015,15 +3068,21 @@ export const PanelHandlerComponents = () => {
3015
3068
  this.createSectionContainerItem_forms(formConfig);
3016
3069
  });
3017
3070
 
3018
- if (typeof asideConfig.callback === "function") {
3071
+ if (typeof asideConfig.clickCallback === "function") {
3019
3072
  /* 执行回调 */
3020
- asideConfig.callback(
3073
+ let asideClickCallbackResult = await asideConfig.clickCallback(
3021
3074
  event,
3022
3075
  this.sectionContainerHeaderULElement,
3023
3076
  this.sectionContainerULElement
3024
3077
  );
3078
+ if (
3079
+ typeof asideClickCallbackResult === "boolean" &&
3080
+ !asideClickCallbackResult
3081
+ ) {
3082
+ return;
3083
+ }
3025
3084
  }
3026
- that.triggerRenderRightContainer(that.$el.$contentSectionContainer);
3085
+ this.triggerRenderRightContainer(this.$el.$contentSectionContainer);
3027
3086
  }
3028
3087
  );
3029
3088
  },
@@ -1,13 +1,11 @@
1
1
  .pops[type-value="panel"] {
2
- --el-disabled-text-color: #a8abb2;
3
- --el-disabled-bg-color: #f5f7fa;
4
- --el-disabled-border-color: #e4e7ed;
5
2
  --pops-bg-color: #f2f2f2;
6
3
  --pops-color: #333333;
7
- --title-bg-color: #ffffff;
8
- --aside-bg-color: #ffffff;
9
- --aside-hover-color: rgb(64, 158, 255);
10
- --aside-hover-bg-color: rgba(64, 158, 255, 0.1);
4
+ --panel-title-bg-color: #ffffff;
5
+
6
+ --panel-aside-bg-color: #ffffff;
7
+ --panel-aside-hover-color: rgb(64, 158, 255);
8
+ --panel-aside-hover-bg-color: rgba(64, 158, 255, 0.1);
11
9
 
12
10
  --pops-panel-forms-margin-top-bottom: 10px;
13
11
  --pops-panel-forms-margin-left-right: 20px;
@@ -32,42 +30,13 @@
32
30
  );
33
31
  --pops-panel-forms-container-li-padding-top-bottom: 12px;
34
32
  --pops-panel-forms-container-li-padding-left-right: 16px;
35
-
36
- --pops-panel-components-input-text-color: #000000;
37
- --pops-panel-components-input-text-bg-color: transparent;
38
- --pops-panel-components-input-bd-color: #dcdfe6;
39
- --pops-panel-components-input-bg-color: #ffffff;
40
- --pops-panel-components-input-hover-bd-color: #c0c4cc;
41
- --pops-panel-components-input-focus-bd-color: #409eff;
42
- --pops-panel-components-input-suffix-color: #a8abb2;
43
-
44
- --pops-panel-components-textarea-text-color: #000000;
45
- --pops-panel-components-textarea-text-bg-color: #ffffff;
46
- --pops-panel-components-textarea-bd-color: #dcdfe6;
47
- --pops-panel-components-textarea-hover-bd-color: #c0c4cc;
48
- --pops-panel-components-textarea-focus-bd-color: #409eff;
49
-
50
- --pops-panel-components-select-text-color: #000000;
51
- --pops-panel-components-select-bd-color: rgb(
52
- 184,
53
- 184,
54
- 184,
55
- var(--pops-bd-opacity)
56
- );
57
- --pops-panel-components-select-bg-color: rgb(
58
- 255,
59
- 255,
60
- 255,
61
- var(--pops-bg-opacity)
62
- );
63
- --pops-panel-components-select-hover-bd-color: #c0c4cc;
64
33
  }
65
34
  .pops[type-value="panel"] {
66
35
  color: var(--pops-color);
67
36
  background: var(--pops-bg-color);
68
37
  }
69
38
  .pops[type-value] .pops-panel-title {
70
- background: var(--title-bg-color);
39
+ background: var(--panel-title-bg-color);
71
40
  }
72
41
 
73
42
  /* ↓panel的CSS↓ */
@@ -78,9 +47,12 @@ aside.pops-panel-aside {
78
47
  max-width: 200px;
79
48
  min-width: 100px;
80
49
  height: 100%;
81
- background: var(--aside-bg-color);
82
- border-right: 1px solid var(--aside-bg-color);
50
+ background: var(--panel-aside-bg-color);
51
+ border-right: 1px solid var(--panel-aside-bg-color);
83
52
  font-size: 0.9em;
53
+ display: flex;
54
+ flex-direction: column;
55
+ justify-content: space-between;
84
56
  }
85
57
  aside.pops-panel-aside {
86
58
  user-select: none;
@@ -134,9 +106,9 @@ aside.pops-panel-aside ul li {
134
106
  justify-content: flex-start;
135
107
  }
136
108
  aside.pops-panel-aside .pops-is-visited,
137
- aside.pops-panel-aside ul li:hover {
138
- color: var(--aside-hover-color);
139
- background: var(--aside-hover-bg-color);
109
+ aside.pops-panel-aside ul li:not(.pops-panel-disabled-aside-hover-css):hover {
110
+ color: var(--panel-aside-hover-color);
111
+ background: var(--panel-aside-hover-bg-color);
140
112
  }
141
113
  section.pops-panel-container > ul li:not(.pops-panel-forms-container-item) {
142
114
  display: flex;
@@ -197,9 +169,9 @@ section.pops-panel-container .pops-panel-item-left-text {
197
169
  }
198
170
 
199
171
  /* 左侧的主文字 */
200
- section.pops-panel-container .pops-panel-item-left-main-text {
201
- /*line-height: 2;*/
202
- }
172
+ /*section.pops-panel-container .pops-panel-item-left-main-text {
173
+
174
+ }*/
203
175
  /* 左侧的描述文字 */
204
176
  section.pops-panel-container .pops-panel-item-left-desc-text {
205
177
  font-size: var(--pops-panel-forms-container-item-left-desc-text-size);
@@ -316,6 +288,25 @@ section.pops-panel-container
316
288
  }
317
289
  }
318
290
  /* switch的CSS */
291
+ .pops-panel-switch {
292
+ --panel-switch-core-bd-color: rgb(220, 223, 230, var(--pops-bd-opacity));
293
+ --panel-switch-core-bg-color: rgb(220, 223, 230, var(--pops-bg-opacity));
294
+ --panel-switch-circle-color: #dcdfe6;
295
+ --panel-switch-circle-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));
296
+ --panel-switch-checked-circle-color: #409eff;
297
+ --panel-switch-checked-core-bd-color: rgb(
298
+ 64,
299
+ 158,
300
+ 255,
301
+ var(--pops-bd-opacity)
302
+ );
303
+ --panel-switch-checked-core-bg-color: rgb(
304
+ 64,
305
+ 158,
306
+ 255,
307
+ var(--pops-bg-opacity)
308
+ );
309
+ }
319
310
  .pops-panel-switch {
320
311
  display: inline-flex;
321
312
  flex-direction: row-reverse;
@@ -353,11 +344,11 @@ section.pops-panel-container
353
344
  align-items: center;
354
345
  min-width: 40px;
355
346
  height: 20px;
356
- border: 1px solid rgb(220, 223, 230, var(--pops-bd-opacity));
347
+ border: 1px solid var(--panel-switch-core-bd-color);
357
348
  outline: 0;
358
349
  border-radius: 10px;
359
350
  box-sizing: border-box;
360
- background: rgb(220, 223, 230, var(--pops-bg-opacity));
351
+ background: var(--panel-switch-core-bg-color);
361
352
  cursor: pointer;
362
353
  transition: border-color 0.3s, background-color 0.3s;
363
354
  }
@@ -368,19 +359,19 @@ section.pops-panel-container
368
359
  transition: all 0.3s;
369
360
  width: 16px;
370
361
  height: 16px;
371
- background-color: rgb(255, 255, 255, var(--pops-bg-opacity));
372
362
  display: flex;
373
363
  justify-content: center;
374
364
  align-items: center;
375
- color: rgb(220, 223, 230);
365
+ background-color: var(--panel-switch-circle-bg-color);
366
+ color: var(--panel-switch-circle-color);
376
367
  }
377
368
  .pops-panel-switch.pops-panel-switch-is-checked span.pops-panel-switch__core {
378
- border-color: rgb(64, 158, 255, var(--pops-bd-opacity));
379
- background-color: rgb(64, 158, 255, var(--pops-bg-opacity));
369
+ border-color: var(--panel-switch-checked-core-bd-color);
370
+ background-color: var(--panel-switch-checked-core-bg-color);
380
371
  }
381
372
  .pops-panel-switch.pops-panel-switch-is-checked .pops-panel-switch__action {
382
373
  left: calc(100% - 17px);
383
- color: rgb(64, 158, 255);
374
+ color: var(--panel-switch-checked-circle-color);
384
375
  }
385
376
  /* switch的CSS */
386
377
 
@@ -661,6 +652,19 @@ section.pops-panel-container
661
652
  /* slider的CSS */
662
653
 
663
654
  /* input的CSS */
655
+ .pops-panel-input {
656
+ --el-disabled-text-color: #a8abb2;
657
+ --el-disabled-bg-color: #f5f7fa;
658
+ --el-disabled-border-color: #e4e7ed;
659
+
660
+ --pops-panel-components-input-text-color: #000000;
661
+ --pops-panel-components-input-text-bg-color: transparent;
662
+ --pops-panel-components-input-bd-color: #dcdfe6;
663
+ --pops-panel-components-input-bg-color: #ffffff;
664
+ --pops-panel-components-input-hover-bd-color: #c0c4cc;
665
+ --pops-panel-components-input-focus-bd-color: #409eff;
666
+ --pops-panel-components-input-suffix-color: #a8abb2;
667
+ }
664
668
  .pops-panel-input {
665
669
  display: flex;
666
670
  align-items: center;
@@ -778,6 +782,13 @@ section.pops-panel-container
778
782
  /* input的CSS */
779
783
 
780
784
  /* textarea的CSS */
785
+ .pops-panel-textarea {
786
+ --pops-panel-components-textarea-text-color: #000000;
787
+ --pops-panel-components-textarea-text-bg-color: #ffffff;
788
+ --pops-panel-components-textarea-bd-color: #dcdfe6;
789
+ --pops-panel-components-textarea-hover-bd-color: #c0c4cc;
790
+ --pops-panel-components-textarea-focus-bd-color: #409eff;
791
+ }
781
792
  .pops-panel-textarea textarea {
782
793
  width: 100%;
783
794
  /*vertical-align: bottom;*/
@@ -817,6 +828,22 @@ section.pops-panel-container
817
828
  /* textarea的CSS */
818
829
 
819
830
  /* select的CSS */
831
+ .pops-panel-select {
832
+ --pops-panel-components-select-text-color: #000000;
833
+ --pops-panel-components-select-bd-color: rgb(
834
+ 184,
835
+ 184,
836
+ 184,
837
+ var(--pops-bd-opacity)
838
+ );
839
+ --pops-panel-components-select-bg-color: rgb(
840
+ 255,
841
+ 255,
842
+ 255,
843
+ var(--pops-bg-opacity)
844
+ );
845
+ --pops-panel-components-select-hover-bd-color: #c0c4cc;
846
+ }
820
847
  .pops-panel-select {
821
848
  border: 0;
822
849
  }
@@ -1099,8 +1126,8 @@ section.pops-panel-container
1099
1126
  .pops[type-value="panel"] {
1100
1127
  --pops-bg-color: #000000;
1101
1128
  --pops-color: #f2f2f2;
1102
- --title-bg-color: #000000;
1103
- --aside-bg-color: #262626;
1129
+ --panel-title-bg-color: #000000;
1130
+ --panel-aside-bg-color: #262626;
1104
1131
  --pops-panel-forms-container-item-left-desc-text-color: #6c6c6c;
1105
1132
  --pops-panel-forms-container-item-bg-color: #262626;
1106
1133
  --pops-panel-forms-container-item-title-color: #c1c1c1;
@@ -1111,20 +1138,35 @@ section.pops-panel-container
1111
1138
  51,
1112
1139
  var(--pops-bd-opacity)
1113
1140
  );
1141
+ }
1142
+ .pops[type-value="panel"]
1143
+ .pops-panel-deepMenu-container
1144
+ .pops-panel-deepMenu-container-left-arrow-icon {
1145
+ fill: #f2f2f2;
1146
+ }
1114
1147
 
1115
- --pops-panel-components-input-text-color: #f2f2f2;
1116
- --pops-panel-components-input-bd-color: #4f5052;
1117
- --pops-panel-components-input-bg-color: #141414;
1118
- --pops-panel-components-input-hover-bd-color: #6f7175;
1119
- --pops-panel-components-input-focus-bd-color: #409eff;
1120
- --pops-panel-components-input-suffix-color: #a8abb2;
1121
-
1122
- --pops-panel-components-textarea-text-color: #f2f2f2;
1123
- --pops-panel-components-textarea-text-bg-color: #141414;
1124
- --pops-panel-components-textarea-bd-color: #4f5052;
1125
- --pops-panel-components-textarea-hover-bd-color: #6f7175;
1126
- --pops-panel-components-textarea-focus-bd-color: #409eff;
1127
-
1148
+ /* switch的CSS */
1149
+ .pops-panel-switch {
1150
+ --panel-switch-core-bd-color: rgb(220, 223, 230, var(--pops-bd-opacity));
1151
+ --panel-switch-core-bg-color: rgb(220, 223, 230, var(--pops-bg-opacity));
1152
+ --panel-switch-circle-color: #dcdfe6;
1153
+ --panel-switch-circle-bg-color: rgb(255, 255, 255, var(--pops-bg-opacity));
1154
+ --panel-switch-checked-circle-color: #409eff;
1155
+ --panel-switch-checked-core-bd-color: rgb(
1156
+ 64,
1157
+ 158,
1158
+ 255,
1159
+ var(--pops-bd-opacity)
1160
+ );
1161
+ --panel-switch-checked-core-bg-color: rgb(
1162
+ 64,
1163
+ 158,
1164
+ 255,
1165
+ var(--pops-bg-opacity)
1166
+ );
1167
+ }
1168
+ /* select的CSS */
1169
+ .pops-panel-select {
1128
1170
  --pops-panel-components-select-text-color: #f2f2f2;
1129
1171
  --pops-panel-components-select-bd-color: rgb(
1130
1172
  51,
@@ -1134,12 +1176,7 @@ section.pops-panel-container
1134
1176
  );
1135
1177
  --pops-panel-components-select-bg-color: #141414;
1136
1178
  }
1137
- .pops[type-value="panel"]
1138
- .pops-panel-deepMenu-container
1139
- .pops-panel-deepMenu-container-left-arrow-icon {
1140
- fill: #f2f2f2;
1141
- }
1142
-
1179
+ /* select-multiple的CSS*/
1143
1180
  .pops-panel-select-multiple {
1144
1181
  --el-fill-color-blank: #141414;
1145
1182
  --el-border-color: #4c4d4f;
@@ -1153,7 +1190,29 @@ section.pops-panel-container
1153
1190
  --el-color-primary: #409eff;
1154
1191
  --el-color-white: #ffffff;
1155
1192
  }
1193
+ /* select-multiple的CSS*/
1156
1194
  .pops-panel-select-multiple .el-tag {
1157
1195
  --el-color-info-light-9: #202121;
1158
1196
  }
1197
+ /* slider的CSS */
1198
+ .pops-slider {
1199
+ --pops-slider-border-color-light: #414243;
1200
+ }
1201
+ /* input的CSS */
1202
+ .pops-panel-input {
1203
+ --pops-panel-components-input-text-color: #f2f2f2;
1204
+ --pops-panel-components-input-bd-color: #4f5052;
1205
+ --pops-panel-components-input-bg-color: #141414;
1206
+ --pops-panel-components-input-hover-bd-color: #6f7175;
1207
+ --pops-panel-components-input-focus-bd-color: #409eff;
1208
+ --pops-panel-components-input-suffix-color: #a8abb2;
1209
+ }
1210
+ /* textarea的CSS */
1211
+ .pops-panel-textarea {
1212
+ --pops-panel-components-textarea-text-color: #f2f2f2;
1213
+ --pops-panel-components-textarea-text-bg-color: #141414;
1214
+ --pops-panel-components-textarea-bd-color: #4f5052;
1215
+ --pops-panel-components-textarea-hover-bd-color: #6f7175;
1216
+ --pops-panel-components-textarea-focus-bd-color: #409eff;
1217
+ }
1159
1218
  }
@@ -25,13 +25,34 @@ export const PopsPanel = {
25
25
 
26
26
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
27
27
  PopsHandler.handleInit($shadowRoot, [
28
- PopsCSS.index,
29
- PopsCSS.ninePalaceGridPosition,
30
- PopsCSS.scrollbar,
31
- PopsCSS.button,
32
- PopsCSS.anim,
33
- PopsCSS.common,
34
- PopsCSS.panelCSS,
28
+ {
29
+ name: "index",
30
+ css: PopsCSS.index,
31
+ },
32
+ {
33
+ name: "ninePalaceGridPosition",
34
+ css: PopsCSS.ninePalaceGridPosition,
35
+ },
36
+ {
37
+ name: "scrollbar",
38
+ css: PopsCSS.scrollbar,
39
+ },
40
+ {
41
+ name: "button",
42
+ css: PopsCSS.button,
43
+ },
44
+ {
45
+ name: "anim",
46
+ css: PopsCSS.anim,
47
+ },
48
+ {
49
+ name: "common",
50
+ css: PopsCSS.common,
51
+ },
52
+ {
53
+ name: "panelCSS",
54
+ css: PopsCSS.panelCSS,
55
+ },
35
56
  ]);
36
57
 
37
58
  // 先把z-index提取出来
@@ -54,15 +75,16 @@ export const PopsPanel = {
54
75
  };${headerStyle}">${
55
76
  config.title.html
56
77
  ? config.title.text
57
- : `<p pops style="${headerPStyle}">${config.title.text}</p>`
78
+ : `<p pops class="pops-${PopsType}-title-text" class="pops-${PopsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`
58
79
  }${headerBtnHTML}</div>
59
80
  <div class="pops-content pops-${PopsType}-content">
60
81
  <aside class="pops-${PopsType}-aside">
61
- <ul></ul>
82
+ <ul class="pops-${PopsType}-aside-top-container"></ul>
83
+ <ul class="pops-${PopsType}-aside-bottom-container"></ul>
62
84
  </aside>
63
85
  <section class="pops-${PopsType}-container">
64
- <ul class="pops-panel-container-header-ul"></ul>
65
- <ul></ul>
86
+ <ul class="pops-${PopsType}-container-header-ul"></ul>
87
+ <ul class="pops-${PopsType}-container-main-ul"></ul>
66
88
  </section>
67
89
  </div>`,
68
90
  "",
@@ -13,9 +13,13 @@ export interface PopsPanelButtonDetails
13
13
  /**
14
14
  * (可选)自定义元素属性
15
15
  */
16
- attributes?: {
17
- [key: string]: any;
18
- };
16
+ attributes?:
17
+ | {
18
+ [key: string]: any;
19
+ }
20
+ | {
21
+ [key: string]: any;
22
+ }[];
19
23
  /**
20
24
  * (可选)自定义属性
21
25
  */
@@ -17,9 +17,13 @@ export interface PopsPanelDeepMenuDetails
17
17
  /**
18
18
  * (可选)自定义元素属性
19
19
  */
20
- attributes?: {
21
- [key: string]: any;
22
- };
20
+ attributes?:
21
+ | {
22
+ [key: string]: any;
23
+ }
24
+ | {
25
+ [key: string]: any;
26
+ }[];
23
27
  /**
24
28
  * (可选)自定义属性
25
29
  */
@@ -13,9 +13,13 @@ export interface PopsPanelFormsDetails
13
13
  /**
14
14
  * (可选)自定义元素属性
15
15
  */
16
- attributes?: {
17
- [key: string]: any;
18
- };
16
+ attributes?:
17
+ | {
18
+ [key: string]: any;
19
+ }
20
+ | {
21
+ [key: string]: any;
22
+ }[];
19
23
  /**
20
24
  * (可选)自定义属性
21
25
  */
@@ -12,9 +12,13 @@ export interface PopsPanelInputDetails
12
12
  /**
13
13
  * (可选)自定义元素属性
14
14
  */
15
- attributes?: {
16
- [key: string]: any;
17
- };
15
+ attributes?:
16
+ | {
17
+ [key: string]: any;
18
+ }
19
+ | {
20
+ [key: string]: any;
21
+ }[];
18
22
  /**
19
23
  * (可选)自定义属性
20
24
  */
@@ -14,9 +14,13 @@ export interface PopsPanelSelectDetails<T = any>
14
14
  /**
15
15
  * (可选)自定义元素属性
16
16
  */
17
- attributes?: {
18
- [key: string]: any;
19
- };
17
+ attributes?:
18
+ | {
19
+ [key: string]: any;
20
+ }
21
+ | {
22
+ [key: string]: any;
23
+ }[];
20
24
  /**
21
25
  * (可选)自定义属性
22
26
  */