@whitesev/pops 1.7.8 → 1.8.0

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.
@@ -214,8 +214,8 @@ declare class Pops {
214
214
  createSectionContainerItem_deepMenu(formConfig: import("./components/panel/deepMenuType").PopsPanelDeepMenuDetails): HTMLLIElement;
215
215
  createSectionContainerItem_own(formConfig: import("./components/panel/ownType").PopsPanelOwnDetails): HTMLLIElement;
216
216
  createSectionContainerItem(formConfig: import("./components/panel/indexType").PopsPanelFormsTotalDetails): HTMLLIElement | undefined;
217
- initFormItem(formConfig: import("./components/panel/indexType").PopsPanelContentConfig): void;
218
- uListContainerAddItem(formConfig: import("./components/panel/indexType").PopsPanelFormsTotalDetails, containerOptions: import("./components/panel/commonType").PopsPanelRightAsideContainerOptions): void;
217
+ initFormItem(formConfig: import("./components/panel/indexType").PopsPanelContentConfig | import("./components/panel/formsType").PopsPanelFormsDetails): void;
218
+ uListContainerAddItem(formConfig: import("./components/panel/indexType").PopsPanelFormsTotalDetails, containerOptions: Omit<import("./components/panel/commonType").PopsPanelRightAsideContainerOptions, "target">): void;
219
219
  setAsideItemClickEvent(asideLiElement: HTMLElement, asideConfig: import("./components/panel/indexType").PopsPanelContentConfig): void;
220
220
  };
221
221
  };
@@ -1,6 +1,7 @@
1
1
  import type { PopsPanelButtonDetails } from "./buttonType";
2
2
  import type { PopsPanelRightAsideContainerOptions } from "./commonType";
3
3
  import type { PopsPanelDeepMenuDetails } from "./deepMenuType";
4
+ import type { PopsPanelFormsDetails } from "./formsType";
4
5
  import type { PopsPanelContentConfig, PopsPanelDetails, PopsPanelFormsTotalDetails } from "./indexType";
5
6
  import type { PopsPanelInputDetails } from "./inputType";
6
7
  import type { PopsPanelOwnDetails } from "./ownType";
@@ -149,13 +150,13 @@ export declare const PanelHandleContentDetails: () => {
149
150
  * 生成配置每一项的元素
150
151
  * @param formConfig
151
152
  */
152
- initFormItem(formConfig: PopsPanelContentConfig): void;
153
+ initFormItem(formConfig: PopsPanelContentConfig | PopsPanelFormsDetails): void;
153
154
  /**
154
155
  *
155
156
  * @param formConfig
156
157
  * @param containerOptions
157
158
  */
158
- uListContainerAddItem(formConfig: PopsPanelFormsTotalDetails, containerOptions: PopsPanelRightAsideContainerOptions): void;
159
+ uListContainerAddItem(formConfig: PopsPanelFormsTotalDetails, containerOptions: Omit<PopsPanelRightAsideContainerOptions, "target">): void;
159
160
  /**
160
161
  * 为左侧容器元素添加点击事件
161
162
  * @param asideLiElement 左侧的容器<li>元素
@@ -3,9 +3,11 @@ import { PopsPanelFormsTotalDetails } from "./indexType";
3
3
  * 右侧容器的配置
4
4
  */
5
5
  export interface PopsPanelRightAsideContainerOptions {
6
- /** 把获取的项<li>元素添加到这个<ul>元素内 */
6
+ /** 当前的<li>元素 */
7
+ target: HTMLLIElement | undefined;
8
+ /** 当前的<li>元素的父<ul>元素 */
7
9
  ulElement: HTMLUListElement;
8
- /** */
10
+ /** 当前的<li>元素所在的统一的<ul>元素 */
9
11
  sectionContainerULElement?: HTMLUListElement;
10
12
  /** */
11
13
  formContainerListElement?: HTMLLIElement;
@@ -24,6 +24,10 @@ export interface PopsPanelFormsDetails extends PopsPanelCommonDetails {
24
24
  * 显示在左边的文字
25
25
  */
26
26
  text: string;
27
+ /**
28
+ * 是否进行折叠
29
+ */
30
+ isFold?: boolean;
27
31
  /**
28
32
  * 类型
29
33
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "1.7.8",
3
+ "version": "1.8.0",
4
4
  "description": "弹窗库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
package/src/Pops.ts CHANGED
@@ -83,7 +83,7 @@ class Pops {
83
83
  /** 配置 */
84
84
  config = {
85
85
  /** 版本号 */
86
- version: "2024.10.19",
86
+ version: "2024.10.27",
87
87
  cssText: {
88
88
  /** 主CSS */
89
89
  index: indexCSS,
@@ -2263,14 +2263,14 @@ export const PanelHandleContentDetails = () => {
2263
2263
  */
2264
2264
  createSectionContainerItem_deepMenu(formConfig: PopsPanelDeepMenuDetails) {
2265
2265
  let that = this;
2266
- let liElement = document.createElement("li");
2267
- liElement.classList.add("pops-panel-deepMenu-nav-item");
2268
- (liElement as any)["__formConfig__"] = formConfig;
2269
- this.setElementClassName(liElement, formConfig.className);
2266
+ let $li = document.createElement("li");
2267
+ $li.classList.add("pops-panel-deepMenu-nav-item");
2268
+ ($li as any)["__formConfig__"] = formConfig;
2269
+ this.setElementClassName($li, formConfig.className);
2270
2270
  // 设置属性
2271
- this.setElementAttributes(liElement, formConfig.attributes);
2271
+ this.setElementAttributes($li, formConfig.attributes);
2272
2272
  // 设置元素上的属性
2273
- this.setElementProps(liElement, formConfig.props);
2273
+ this.setElementProps($li, formConfig.props);
2274
2274
 
2275
2275
  /* 左边底部的描述的文字 */
2276
2276
  let leftDescriptionText = "";
@@ -2291,7 +2291,7 @@ export const PanelHandleContentDetails = () => {
2291
2291
  if (formConfig.rightText) {
2292
2292
  rightText = /*html*/ `<p class="pops-panel-item-right-text">${formConfig.rightText}</p>`;
2293
2293
  }
2294
- liElement.innerHTML = /*html*/ `
2294
+ $li.innerHTML = /*html*/ `
2295
2295
  <div class="pops-panel-item-left-text">
2296
2296
  <p class="pops-panel-item-left-main-text">${formConfig.text}</p>
2297
2297
  ${leftDescriptionText}
@@ -2320,21 +2320,56 @@ export const PanelHandleContentDetails = () => {
2320
2320
  $container: HTMLElement,
2321
2321
  formItemConfig: PopsPanelFormsTotalDetails | PopsPanelFormsDetails
2322
2322
  ) {
2323
- if (formItemConfig["type"] === "forms") {
2324
- let childForms = formItemConfig["forms"];
2323
+ let formConfig_forms = formItemConfig as PopsPanelFormsDetails;
2324
+ if (formConfig_forms["type"] === "forms") {
2325
+ let childForms = formConfig_forms["forms"];
2325
2326
  /* 每一项<li>元素 */
2326
2327
  let formContainerListElement = document.createElement("li");
2327
2328
  /* 每一项<li>内的子<ul>元素 */
2328
2329
  let formContainerULElement = document.createElement("ul");
2329
- formContainerListElement.className =
2330
- "pops-panel-forms-container-item";
2330
+ formContainerULElement.classList.add(
2331
+ "pops-panel-forms-container-item-formlist"
2332
+ );
2333
+ formContainerListElement.classList.add(
2334
+ "pops-panel-forms-container-item"
2335
+ );
2331
2336
  /* 区域头部的文字 */
2332
2337
  let formHeaderDivElement = popsDOMUtils.createElement("div", {
2333
2338
  className: "pops-panel-forms-container-item-header-text",
2334
2339
  });
2335
- formHeaderDivElement.innerHTML = formItemConfig["text"];
2336
- /* 加进容器内 */
2337
- formContainerListElement.appendChild(formHeaderDivElement);
2340
+ formHeaderDivElement.innerHTML = formConfig_forms["text"];
2341
+
2342
+ if (formConfig_forms.isFold) {
2343
+ /* 添加第一个 */
2344
+ /* 加进容器内 */
2345
+ formHeaderDivElement.innerHTML = /*html*/ `
2346
+ <p>${formConfig_forms.text}</p>
2347
+ <i class="pops-panel-forms-fold-container-icon">
2348
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
2349
+ <path d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"></path>
2350
+ </svg>
2351
+ </i>
2352
+
2353
+ `;
2354
+ // 添加点击事件
2355
+ popsDOMUtils.on(formHeaderDivElement, "click", (event) => {
2356
+ if (formContainerListElement.hasAttribute("data-fold-enable")) {
2357
+ formContainerListElement.removeAttribute("data-fold-enable");
2358
+ } else {
2359
+ formContainerListElement.setAttribute("data-fold-enable", "");
2360
+ }
2361
+ });
2362
+ formHeaderDivElement.classList.add(
2363
+ "pops-panel-forms-fold-container"
2364
+ );
2365
+ formHeaderDivElement.classList.add("pops-user-select-none");
2366
+ formContainerListElement.setAttribute("data-fold-enable", "");
2367
+ formContainerListElement.classList.add("pops-panel-forms-fold");
2368
+ formContainerListElement.appendChild(formHeaderDivElement);
2369
+ } else {
2370
+ /* 加进容器内 */
2371
+ formContainerListElement.appendChild(formHeaderDivElement);
2372
+ }
2338
2373
 
2339
2374
  that.setElementClassName(
2340
2375
  formContainerListElement,
@@ -2443,22 +2478,22 @@ export const PanelHandleContentDetails = () => {
2443
2478
  },
2444
2479
  /** 设置项的点击事件 */
2445
2480
  setLiClickEvent() {
2446
- popsDOMUtils.on(liElement, "click", void 0, async (event) => {
2481
+ popsDOMUtils.on($li, "click", void 0, async (event) => {
2447
2482
  if (typeof formConfig.clickCallBack === "function") {
2448
2483
  let result = await formConfig.clickCallBack(event, formConfig);
2449
2484
  if (result) {
2450
2485
  return;
2451
2486
  }
2452
2487
  }
2453
- this.gotoDeepMenu(event, liElement);
2488
+ this.gotoDeepMenu(event, $li);
2454
2489
  });
2455
2490
  },
2456
2491
  };
2457
2492
 
2458
2493
  PopsPanelDeepMenu.init();
2459
- (liElement as any)["data-deepMenu"] = PopsPanelDeepMenu;
2494
+ ($li as any)["data-deepMenu"] = PopsPanelDeepMenu;
2460
2495
 
2461
- return liElement;
2496
+ return $li;
2462
2497
  },
2463
2498
  /**
2464
2499
  * 获取中间容器的元素<li>
@@ -2526,24 +2561,54 @@ export const PanelHandleContentDetails = () => {
2526
2561
  * 生成配置每一项的元素
2527
2562
  * @param formConfig
2528
2563
  */
2529
- initFormItem(formConfig: PopsPanelContentConfig) {
2564
+ initFormItem(formConfig: PopsPanelContentConfig | PopsPanelFormsDetails) {
2530
2565
  let that = this;
2531
- if ((formConfig as any)["type"] === "forms") {
2532
- let __formConfig_forms = formConfig as any as PopsPanelFormsDetails;
2566
+ let formConfig_forms = formConfig as PopsPanelFormsDetails;
2567
+ if (formConfig_forms["type"] === "forms") {
2533
2568
  let childForms = formConfig["forms"];
2534
2569
  /* 每一项<li>元素 */
2535
2570
  let formContainerListElement = document.createElement("li");
2536
2571
  /* 每一项<li>内的子<ul>元素 */
2537
2572
  let formContainerULElement = document.createElement("ul");
2538
- formContainerListElement.className = "pops-panel-forms-container-item";
2573
+ formContainerULElement.classList.add(
2574
+ "pops-panel-forms-container-item-formlist"
2575
+ );
2576
+ formContainerListElement.classList.add(
2577
+ "pops-panel-forms-container-item"
2578
+ );
2539
2579
  /* 区域头部的文字 */
2540
2580
  let formHeaderDivElement = popsDOMUtils.createElement("div", {
2541
2581
  className: "pops-panel-forms-container-item-header-text",
2542
2582
  });
2543
- formHeaderDivElement.innerHTML = __formConfig_forms["text"];
2544
- /* 加进容器内 */
2545
- formContainerListElement.appendChild(formHeaderDivElement);
2546
-
2583
+ formHeaderDivElement.innerHTML = formConfig_forms["text"];
2584
+ if (formConfig_forms.isFold) {
2585
+ /* 加进容器内 */
2586
+ formHeaderDivElement.innerHTML = /*html*/ `
2587
+ <p>${formConfig_forms.text}</p>
2588
+ <i class="pops-panel-forms-fold-container-icon">
2589
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1024 1024">
2590
+ <path d="M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"></path>
2591
+ </svg>
2592
+ </i>
2593
+
2594
+ `;
2595
+ // 添加点击事件
2596
+ popsDOMUtils.on(formHeaderDivElement, "click", (event) => {
2597
+ if (formContainerListElement.hasAttribute("data-fold-enable")) {
2598
+ formContainerListElement.removeAttribute("data-fold-enable");
2599
+ } else {
2600
+ formContainerListElement.setAttribute("data-fold-enable", "");
2601
+ }
2602
+ });
2603
+ formHeaderDivElement.classList.add("pops-panel-forms-fold-container");
2604
+ formHeaderDivElement.classList.add("pops-user-select-none");
2605
+ formContainerListElement.setAttribute("data-fold-enable", "");
2606
+ formContainerListElement.classList.add("pops-panel-forms-fold");
2607
+ formContainerListElement.appendChild(formHeaderDivElement);
2608
+ } else {
2609
+ /* 加进容器内 */
2610
+ formContainerListElement.appendChild(formHeaderDivElement);
2611
+ }
2547
2612
  that.setElementClassName(
2548
2613
  formContainerListElement,
2549
2614
  formConfig.className
@@ -2577,14 +2642,17 @@ export const PanelHandleContentDetails = () => {
2577
2642
  */
2578
2643
  uListContainerAddItem(
2579
2644
  formConfig: PopsPanelFormsTotalDetails,
2580
- containerOptions: PopsPanelRightAsideContainerOptions
2645
+ containerOptions: Omit<PopsPanelRightAsideContainerOptions, "target">
2581
2646
  ) {
2582
2647
  let itemLiElement = this.createSectionContainerItem(formConfig);
2583
2648
  if (itemLiElement) {
2584
2649
  containerOptions["ulElement"].appendChild(itemLiElement);
2585
2650
  }
2586
2651
  if (typeof formConfig.afterAddToUListCallBack === "function") {
2587
- formConfig.afterAddToUListCallBack(formConfig, containerOptions);
2652
+ formConfig.afterAddToUListCallBack(formConfig, {
2653
+ ...containerOptions,
2654
+ target: itemLiElement,
2655
+ });
2588
2656
  }
2589
2657
  },
2590
2658
  /**
@@ -4,9 +4,11 @@ import { PopsPanelFormsTotalDetails } from "./indexType";
4
4
  * 右侧容器的配置
5
5
  */
6
6
  export interface PopsPanelRightAsideContainerOptions {
7
- /** 把获取的项<li>元素添加到这个<ul>元素内 */
7
+ /** 当前的<li>元素 */
8
+ target: HTMLLIElement | undefined;
9
+ /** 当前的<li>元素的父<ul>元素 */
8
10
  ulElement: HTMLUListElement;
9
- /** */
11
+ /** 当前的<li>元素所在的统一的<ul>元素 */
10
12
  sectionContainerULElement?: HTMLUListElement;
11
13
  /** */
12
14
  formContainerListElement?: HTMLLIElement;
@@ -310,6 +310,25 @@ export const PopsPanelConfig = (): Required<PopsPanelDetails> => {
310
310
  },
311
311
  ],
312
312
  },
313
+ {
314
+ type: "forms",
315
+ isFold: true,
316
+ text: "折叠菜单",
317
+ forms: [
318
+ {
319
+ className: "panel-switch",
320
+ text: "switch",
321
+ type: "switch",
322
+ attributes: [],
323
+ getValue() {
324
+ return true;
325
+ },
326
+ callback(event, value) {
327
+ console.log("按钮开启状态:", value);
328
+ },
329
+ },
330
+ ],
331
+ },
313
332
  ],
314
333
  },
315
334
  ],
@@ -25,6 +25,10 @@ export interface PopsPanelFormsDetails extends PopsPanelCommonDetails {
25
25
  * 显示在左边的文字
26
26
  */
27
27
  text: string;
28
+ /**
29
+ * 是否进行折叠
30
+ */
31
+ isFold?: boolean;
28
32
  /**
29
33
  * 类型
30
34
  */
@@ -2,12 +2,24 @@
2
2
  --el-disabled-text-color: #a8abb2;
3
3
  --el-disabled-bg-color: #f5f7fa;
4
4
  --el-disabled-border-color: #e4e7ed;
5
- --aside-bg-color: #f2f2f2;
5
+ --pops-bg-color: #f2f2f2;
6
+ --pops-color: #333;
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);
11
+ --container-item-bg-color: #ffffff;
12
+ --container-title-color: #333;
13
+ }
14
+ .pops[type-value="panel"] {
15
+ color: var(--pops-color);
16
+ background: var(--pops-bg-color);
6
17
  }
7
18
  .pops[type-value] .pops-panel-title {
8
19
  display: flex;
9
20
  align-items: center;
10
21
  justify-content: space-between;
22
+ background: var(--title-bg-color);
11
23
  }
12
24
 
13
25
  .pops[type-value="panel"] .pops-panel-title {
@@ -18,7 +30,6 @@
18
30
  .pops[type-value="panel"] .pops-panel-title p[pops] {
19
31
  width: 100%;
20
32
  overflow: hidden;
21
- color: #333;
22
33
  text-indent: 15px;
23
34
  text-overflow: ellipsis;
24
35
  white-space: nowrap;
@@ -103,8 +114,8 @@ aside.pops-panel-aside ul li {
103
114
  }
104
115
  aside.pops-panel-aside .pops-is-visited,
105
116
  aside.pops-panel-aside ul li:hover {
106
- color: rgb(64, 158, 255);
107
- background: rgba(64, 158, 255, 0.1);
117
+ color: var(--aside-hover-color);
118
+ background: var(--aside-hover-bg-color);
108
119
  }
109
120
  section.pops-panel-container > ul li {
110
121
  display: flex;
@@ -113,24 +124,35 @@ section.pops-panel-container > ul li {
113
124
  margin: 10px 20px;
114
125
  gap: 10px;
115
126
  }
127
+ section.pops-panel-container .pops-panel-forms-container-item-header-text {
128
+ color: var(--container-title-color);
129
+ }
116
130
  section.pops-panel-container li.pops-panel-forms-container-item {
117
131
  display: block;
118
132
  margin-top: 20px;
119
133
  }
120
134
  section.pops-panel-container .pops-panel-forms-container-item ul {
121
135
  border-radius: 6px;
122
- background: var(--aside-bg-color);
136
+ background: var(--container-item-bg-color);
123
137
  margin: 10px;
124
138
  }
125
139
  section.pops-panel-container .pops-panel-forms-container-item ul li {
126
140
  display: flex;
127
141
  justify-content: space-between;
128
142
  align-items: center;
129
- margin: 0px;
130
- padding: 10px 10px;
143
+ padding: 12px 0px;
144
+ margin: 0px 16px;
131
145
  border-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
132
146
  text-align: left;
133
147
  }
148
+ section.pops-panel-container
149
+ .pops-panel-forms-container-item
150
+ ul
151
+ li.pops-panel-deepMenu-nav-item {
152
+ padding: 12px 16px;
153
+ margin: 0px;
154
+ border-bottom: 0;
155
+ }
134
156
  section.pops-panel-container .pops-panel-forms-container-item ul li:last-child {
135
157
  border: 0;
136
158
  }
@@ -157,69 +179,112 @@ section.pops-panel-container
157
179
  font-size: 0.8em;
158
180
  color: rgb(108, 108, 108);
159
181
  }
160
- /* 兼容移动端CSS */
161
- .pops[type-value="panel"].pops-panel-is-mobile {
162
- width: 92%;
163
- width: 92vw;
164
- }
165
- .pops[type-value="panel"].pops-panel-is-mobile section.pops-panel-container {
166
- padding: 10px 0px;
182
+
183
+ /* 折叠面板 */
184
+
185
+ section.pops-panel-container .pops-panel-forms-fold {
186
+ border-radius: 6px;
187
+ background: var(--container-item-bg-color);
188
+ margin: 10px 30px;
167
189
  }
168
- .pops[type-value="panel"].pops-panel-is-mobile
169
- .pops-panel-content
170
- aside.pops-panel-aside {
171
- width: 20%;
190
+ section.pops-panel-container
191
+ .pops-panel-forms-fold
192
+ .pops-panel-forms-fold-container {
193
+ display: flex;
194
+ align-items: center;
195
+ fill: #6c6c6c;
196
+ justify-content: space-between;
197
+ margin: 0px 16px !important;
198
+ padding: 12px 0px !important;
172
199
  }
173
- .pops[type-value="panel"].pops-panel-is-mobile
174
- section.pops-panel-container
175
- .pops-panel-forms-container-item
176
- > div {
177
- margin: 5px 10px;
178
- text-align: left;
200
+ section.pops-panel-container
201
+ .pops-panel-forms-fold[data-fold-enable]
202
+ .pops-panel-forms-fold-container-icon {
203
+ transform: rotate(90deg);
179
204
  }
180
- .pops[type-value="panel"].pops-panel-is-mobile
181
- section.pops-panel-container
182
- .pops-panel-forms-container-item
183
- ul {
184
- margin: 0px !important;
185
- }
186
- .pops[type-value="panel"].pops-panel-is-mobile
187
- section.pops-panel-container
188
- > ul
189
- li {
190
- padding: 10px 10px;
191
- margin: 0;
205
+ section.pops-panel-container
206
+ .pops-panel-forms-fold
207
+ .pops-panel-forms-fold-container-icon {
208
+ width: 15px;
209
+ height: 15px;
210
+ display: flex;
211
+ align-items: center;
212
+ transform: rotate(-90deg);
213
+ transition: transform 0.3s;
192
214
  }
193
- .pops[type-value="panel"].pops-panel-is-mobile
194
- section.pops-panel-container
195
- > ul
196
- > li
197
- div:nth-child(2) {
198
- max-width: 55%;
199
- margin-left: 6px;
200
- text-align: right;
215
+ section.pops-panel-container
216
+ .pops-panel-forms-fold[data-fold-enable]
217
+ .pops-panel-forms-container-item-formlist {
218
+ height: 0;
201
219
  }
202
- .pops[type-value="panel"].pops-panel-is-mobile
203
- section.pops-panel-container
204
- .pops-panel-select
205
- select {
206
- min-width: 88px !important;
207
- width: -webkit-fill-available;
208
- width: -moz-available;
220
+ section.pops-panel-container
221
+ .pops-panel-forms-fold
222
+ .pops-panel-forms-container-item-formlist {
223
+ transition: height 0.3s;
224
+ overflow: hidden;
225
+ border-radius: unset;
226
+ background: unset;
227
+ margin: 0;
228
+ height: auto;
229
+ height: calc-size(auto, size);
209
230
  }
210
- .pops[type-value="panel"].pops-panel-is-mobile
211
- section.pops-panel-container
212
- .pops-panel-container-header-ul
213
- li {
214
- font-size: 16px;
215
- }
216
- .pops[type-value="panel"].pops-panel-is-mobile .pops-panel-title p[pops],
217
- .pops[type-value="panel"].pops-panel-is-mobile
218
- section.pops-panel-container
219
- > ul
220
- li,
221
- .pops[type-value="panel"].pops-panel-is-mobile aside.pops-panel-aside ul li {
222
- font-size: 14px;
231
+ /* 折叠面板 */
232
+
233
+ /* 姑且认为小于600px的屏幕为移动端 */
234
+ @media (max-width: 600px) {
235
+ /* 兼容移动端CSS */
236
+ .pops[type-value="panel"] {
237
+ width: 92%;
238
+ width: 92vw;
239
+ }
240
+ .pops[type-value="panel"] section.pops-panel-container {
241
+ padding: 10px 0px;
242
+ }
243
+ .pops[type-value="panel"] .pops-panel-content aside.pops-panel-aside {
244
+ width: 20%;
245
+ }
246
+ .pops[type-value="panel"]
247
+ section.pops-panel-container
248
+ .pops-panel-forms-container-item
249
+ > div {
250
+ margin: 5px 10px;
251
+ text-align: left;
252
+ }
253
+ .pops[type-value="panel"]
254
+ section.pops-panel-container
255
+ .pops-panel-forms-container-item
256
+ ul {
257
+ margin: 0px !important;
258
+ }
259
+ .pops[type-value="panel"] section.pops-panel-container > ul > li {
260
+ margin: 10px 10px;
261
+ }
262
+ .pops[type-value="panel"]
263
+ section.pops-panel-container
264
+ > ul
265
+ > li
266
+ div:nth-child(2) {
267
+ max-width: 55%;
268
+ }
269
+ .pops[type-value="panel"]
270
+ section.pops-panel-container
271
+ .pops-panel-select
272
+ select {
273
+ min-width: 88px !important;
274
+ width: -webkit-fill-available;
275
+ width: -moz-available;
276
+ }
277
+ .pops[type-value="panel"]
278
+ section.pops-panel-container
279
+ .pops-panel-container-header-ul
280
+ li {
281
+ font-size: 16px;
282
+ }
283
+ .pops[type-value="panel"] .pops-panel-title p[pops],
284
+ .pops[type-value="panel"] section.pops-panel-container > ul li,
285
+ .pops[type-value="panel"] aside.pops-panel-aside ul li {
286
+ font-size: 14px;
287
+ }
223
288
  }
224
289
  /* switch的CSS */
225
290
  .pops-panel-switch {
package/src/css/index.css CHANGED
@@ -12,6 +12,7 @@
12
12
  --pops-bg-opacity: 1;
13
13
  --pops-bd-opacity: 1;
14
14
  --pops-font-size: 16px;
15
+ interpolate-size: allow-keywords;
15
16
  }
16
17
  .pops-mask {
17
18
  --pops-mask-bg-opacity: 0.4;
@@ -129,7 +130,7 @@ button.pops-header-control i:hover {
129
130
  .pops-header-controls[data-margin] button.pops-header-control {
130
131
  margin: 0 6px;
131
132
  display: flex;
132
- align-items: center;
133
+ align-items: center;
133
134
  }
134
135
  .pops[type-value] .pops-header-controls {
135
136
  display: flex;