@whitesev/pops 1.8.0 → 1.8.2
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/LICENSE +674 -0
- package/dist/index.amd.js +32 -22
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +32 -22
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +32 -22
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +32 -22
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +32 -22
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +32 -22
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +1 -1
- package/dist/types/src/components/panel/PanelHandleContentDetails.d.ts +2 -1
- package/dist/types/src/components/panel/buttonType.d.ts +1 -1
- package/dist/types/src/components/panel/commonType.d.ts +3 -2
- package/dist/types/src/components/panel/deepMenuType.d.ts +2 -2
- package/dist/types/src/components/panel/formsType.d.ts +1 -1
- package/dist/types/src/components/panel/inputType.d.ts +1 -1
- package/dist/types/src/components/panel/ownType.d.ts +1 -1
- package/dist/types/src/components/panel/selectMultipleType.d.ts +1 -1
- package/dist/types/src/components/panel/selectType.d.ts +1 -1
- package/dist/types/src/components/panel/sliderType.d.ts +1 -1
- package/dist/types/src/components/panel/switchType.d.ts +1 -1
- package/dist/types/src/components/panel/textareaType.d.ts +1 -1
- package/package.json +1 -1
- package/src/Pops.ts +1 -1
- package/src/components/panel/PanelHandleContentDetails.ts +30 -38
- package/src/components/panel/buttonType.ts +1 -1
- package/src/components/panel/commonType.ts +5 -2
- package/src/components/panel/config.ts +6 -0
- package/src/components/panel/deepMenuType.ts +3 -2
- package/src/components/panel/formsType.ts +2 -1
- package/src/components/panel/index.css +68 -34
- package/src/components/panel/inputType.ts +2 -1
- package/src/components/panel/ownType.ts +2 -1
- package/src/components/panel/selectMultipleType.ts +1 -1
- package/src/components/panel/selectType.ts +1 -1
- package/src/components/panel/sliderType.ts +2 -1
- package/src/components/panel/switchType.ts +2 -1
- package/src/components/panel/textareaType.ts +2 -1
package/dist/types/src/Pops.d.ts
CHANGED
|
@@ -214,7 +214,7 @@ 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
|
-
|
|
217
|
+
createSectionContainerItem_forms(formConfig: import("./components/panel/indexType").PopsPanelContentConfig | import("./components/panel/formsType").PopsPanelFormsDetails): void;
|
|
218
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
|
};
|
|
@@ -147,10 +147,11 @@ export declare const PanelHandleContentDetails: () => {
|
|
|
147
147
|
*/
|
|
148
148
|
createSectionContainerItem(formConfig: PopsPanelFormsTotalDetails): HTMLLIElement | undefined;
|
|
149
149
|
/**
|
|
150
|
+
* 生成配置项forms
|
|
150
151
|
* 生成配置每一项的元素
|
|
151
152
|
* @param formConfig
|
|
152
153
|
*/
|
|
153
|
-
|
|
154
|
+
createSectionContainerItem_forms(formConfig: PopsPanelContentConfig | PopsPanelFormsDetails): void;
|
|
154
155
|
/**
|
|
155
156
|
*
|
|
156
157
|
* @param formConfig
|
|
@@ -4,7 +4,7 @@ import type { PopsIcon } from "../../types/icon";
|
|
|
4
4
|
/**
|
|
5
5
|
* pops.panel的 button
|
|
6
6
|
*/
|
|
7
|
-
export interface PopsPanelButtonDetails extends PopsPanelCommonDetails {
|
|
7
|
+
export interface PopsPanelButtonDetails extends PopsPanelCommonDetails<PopsPanelButtonDetails> {
|
|
8
8
|
/**
|
|
9
9
|
* (可选)className属性
|
|
10
10
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PopsPanelFormsDetails } from "./formsType";
|
|
1
2
|
import { PopsPanelFormsTotalDetails } from "./indexType";
|
|
2
3
|
/**
|
|
3
4
|
* 右侧容器的配置
|
|
@@ -17,7 +18,7 @@ export interface PopsPanelRightAsideContainerOptions {
|
|
|
17
18
|
/**
|
|
18
19
|
* 通用配置
|
|
19
20
|
*/
|
|
20
|
-
export interface PopsPanelCommonDetails {
|
|
21
|
+
export interface PopsPanelCommonDetails<T extends PopsPanelFormsTotalDetails | PopsPanelFormsDetails> {
|
|
21
22
|
/**
|
|
22
23
|
* 在添加到<ul>元素后触发该回调
|
|
23
24
|
* @param formConfig 配置
|
|
@@ -44,5 +45,5 @@ export interface PopsPanelCommonDetails {
|
|
|
44
45
|
* // 例如在type为forms时
|
|
45
46
|
* container内只有container.ulElement这个属性
|
|
46
47
|
*/
|
|
47
|
-
afterAddToUListCallBack?: (formConfig:
|
|
48
|
+
afterAddToUListCallBack?: (formConfig: T, container: PopsPanelRightAsideContainerOptions) => void;
|
|
48
49
|
}
|
|
@@ -4,7 +4,7 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
4
4
|
/**
|
|
5
5
|
* pops.panel的 深层菜单
|
|
6
6
|
*/
|
|
7
|
-
export interface PopsPanelDeepMenuDetails extends PopsPanelCommonDetails {
|
|
7
|
+
export interface PopsPanelDeepMenuDetails extends PopsPanelCommonDetails<PopsPanelDeepMenuDetails> {
|
|
8
8
|
/**
|
|
9
9
|
* 类型
|
|
10
10
|
*/
|
|
@@ -48,7 +48,7 @@ export interface PopsPanelDeepMenuDetails extends PopsPanelCommonDetails {
|
|
|
48
48
|
* + true 表示阻止进入深层菜单
|
|
49
49
|
* + false (默认)表示允许进入深层菜单
|
|
50
50
|
*/
|
|
51
|
-
clickCallBack?: (event: MouseEvent | PointerEvent, formConfig: PopsPanelDeepMenuDetails) => boolean | void
|
|
51
|
+
clickCallBack?: (event: MouseEvent | PointerEvent, formConfig: PopsPanelDeepMenuDetails) => boolean | void | Promise<boolean | void>;
|
|
52
52
|
/**
|
|
53
53
|
* 菜单配置
|
|
54
54
|
*/
|
|
@@ -3,7 +3,7 @@ import type { PopsPanelFormsTotalDetails } from "./indexType";
|
|
|
3
3
|
/**
|
|
4
4
|
* pops.panel的 forms
|
|
5
5
|
*/
|
|
6
|
-
export interface PopsPanelFormsDetails extends PopsPanelCommonDetails {
|
|
6
|
+
export interface PopsPanelFormsDetails extends PopsPanelCommonDetails<PopsPanelFormsDetails> {
|
|
7
7
|
/**
|
|
8
8
|
* (可选)className属性
|
|
9
9
|
*/
|
|
@@ -2,7 +2,7 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
2
2
|
/**
|
|
3
3
|
* pops.panel的 input
|
|
4
4
|
*/
|
|
5
|
-
export interface PopsPanelInputDetails extends PopsPanelCommonDetails {
|
|
5
|
+
export interface PopsPanelInputDetails extends PopsPanelCommonDetails<PopsPanelInputDetails> {
|
|
6
6
|
/**
|
|
7
7
|
* (可选)className属性
|
|
8
8
|
*/
|
|
@@ -3,7 +3,7 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
3
3
|
* pops.panel的 own
|
|
4
4
|
* 自定义的
|
|
5
5
|
*/
|
|
6
|
-
export interface PopsPanelOwnDetails extends PopsPanelCommonDetails {
|
|
6
|
+
export interface PopsPanelOwnDetails extends PopsPanelCommonDetails<PopsPanelOwnDetails> {
|
|
7
7
|
/**
|
|
8
8
|
* (可选)className属性
|
|
9
9
|
*/
|
|
@@ -24,7 +24,7 @@ export interface PopsPanelSelectMultipleDataOption<T> {
|
|
|
24
24
|
/**
|
|
25
25
|
* pops.panel的 select
|
|
26
26
|
*/
|
|
27
|
-
export interface PopsPanelSelectMultipleDetails<T = any> extends PopsPanelCommonDetails {
|
|
27
|
+
export interface PopsPanelSelectMultipleDetails<T = any> extends PopsPanelCommonDetails<PopsPanelSelectMultipleDetails> {
|
|
28
28
|
/**
|
|
29
29
|
* (可选)className属性
|
|
30
30
|
*/
|
|
@@ -2,7 +2,7 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
2
2
|
/**
|
|
3
3
|
* pops.panel的 select
|
|
4
4
|
*/
|
|
5
|
-
export interface PopsPanelSelectDetails<T = any> extends PopsPanelCommonDetails {
|
|
5
|
+
export interface PopsPanelSelectDetails<T = any> extends PopsPanelCommonDetails<PopsPanelSelectDetails> {
|
|
6
6
|
/**
|
|
7
7
|
* (可选)className属性
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
2
2
|
/**
|
|
3
3
|
* pops.panel的 slider
|
|
4
4
|
*/
|
|
5
|
-
export interface PopsPanelSliderDetails extends PopsPanelCommonDetails {
|
|
5
|
+
export interface PopsPanelSliderDetails extends PopsPanelCommonDetails<PopsPanelSliderDetails> {
|
|
6
6
|
/**
|
|
7
7
|
* (可选)className属性
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
2
2
|
/**
|
|
3
3
|
* pops.panel的 switch
|
|
4
4
|
*/
|
|
5
|
-
export interface PopsPanelSwitchDetails extends PopsPanelCommonDetails {
|
|
5
|
+
export interface PopsPanelSwitchDetails extends PopsPanelCommonDetails<PopsPanelSwitchDetails> {
|
|
6
6
|
/**
|
|
7
7
|
* (可选)className属性
|
|
8
8
|
*/
|
|
@@ -2,7 +2,7 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
2
2
|
/**
|
|
3
3
|
* pops.panel的 textarea
|
|
4
4
|
*/
|
|
5
|
-
export interface PopsPanelTextAreaDetails extends PopsPanelCommonDetails {
|
|
5
|
+
export interface PopsPanelTextAreaDetails extends PopsPanelCommonDetails<PopsPanelTextAreaDetails> {
|
|
6
6
|
/**
|
|
7
7
|
* (可选)className属性
|
|
8
8
|
*/
|
package/package.json
CHANGED
package/src/Pops.ts
CHANGED
|
@@ -1045,7 +1045,7 @@ export const PanelHandleContentDetails = () => {
|
|
|
1045
1045
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
1046
1046
|
${leftDescriptionText}
|
|
1047
1047
|
</div>
|
|
1048
|
-
<div class="pops-panel-input">
|
|
1048
|
+
<div class="pops-panel-input pops-user-select-none">
|
|
1049
1049
|
<input type="${inputType}" placeholder="${formConfig.placeholder}">
|
|
1050
1050
|
</div>
|
|
1051
1051
|
`;
|
|
@@ -1347,7 +1347,7 @@ export const PanelHandleContentDetails = () => {
|
|
|
1347
1347
|
<p class="pops-panel-item-left-main-text">${formConfig.text}</p>
|
|
1348
1348
|
${leftDescriptionText}
|
|
1349
1349
|
</div>
|
|
1350
|
-
<div class="pops-panel-select">
|
|
1350
|
+
<div class="pops-panel-select pops-user-select-none">
|
|
1351
1351
|
<select></select>
|
|
1352
1352
|
</div>
|
|
1353
1353
|
`;
|
|
@@ -2393,6 +2393,17 @@ export const PanelHandleContentDetails = () => {
|
|
|
2393
2393
|
});
|
|
2394
2394
|
formContainerListElement.appendChild(formContainerULElement);
|
|
2395
2395
|
$container.appendChild(formContainerListElement);
|
|
2396
|
+
if (
|
|
2397
|
+
typeof formConfig_forms.afterAddToUListCallBack === "function"
|
|
2398
|
+
) {
|
|
2399
|
+
formConfig_forms.afterAddToUListCallBack(formConfig as any, {
|
|
2400
|
+
target: formContainerListElement,
|
|
2401
|
+
ulElement: formContainerULElement,
|
|
2402
|
+
sectionContainerULElement: that.sectionContainerULElement,
|
|
2403
|
+
formContainerListElement: formContainerListElement,
|
|
2404
|
+
formHeaderDivElement: formHeaderDivElement,
|
|
2405
|
+
});
|
|
2406
|
+
}
|
|
2396
2407
|
} else {
|
|
2397
2408
|
/* 如果成功创建,加入到中间容器中 */
|
|
2398
2409
|
that.uListContainerAddItem(formConfig, {
|
|
@@ -2411,7 +2422,7 @@ export const PanelHandleContentDetails = () => {
|
|
|
2411
2422
|
"section.pops-panel-container"
|
|
2412
2423
|
) as HTMLElement | null;
|
|
2413
2424
|
if (currentSection) {
|
|
2414
|
-
popsDOMUtils.cssHide(currentSection);
|
|
2425
|
+
popsDOMUtils.cssHide(currentSection,true);
|
|
2415
2426
|
}
|
|
2416
2427
|
// 子菜单的容器
|
|
2417
2428
|
let $deepMenuContainer = popsDOMUtils.createElement("section", {
|
|
@@ -2462,19 +2473,6 @@ export const PanelHandleContentDetails = () => {
|
|
|
2462
2473
|
}
|
|
2463
2474
|
}
|
|
2464
2475
|
that.$el.$content?.appendChild($deepMenuContainer);
|
|
2465
|
-
|
|
2466
|
-
/* 根据标题的高度来自适应内容高度,默认开启 */
|
|
2467
|
-
/* 中间容器的偏移量,看设置的section.pops-panel-container的padding,默认0 */
|
|
2468
|
-
let contentContainerOffset = 0;
|
|
2469
|
-
/* 获取标题的<ul>元素的高度 */
|
|
2470
|
-
let sectionContainerHeaderULElementHeight =
|
|
2471
|
-
popsDOMUtils.height($deepMenuHeaderUL);
|
|
2472
|
-
$deepMenuChildMenuUL.style.setProperty(
|
|
2473
|
-
"height",
|
|
2474
|
-
`calc( 100% - ${
|
|
2475
|
-
sectionContainerHeaderULElementHeight + contentContainerOffset
|
|
2476
|
-
}px )`
|
|
2477
|
-
);
|
|
2478
2476
|
},
|
|
2479
2477
|
/** 设置项的点击事件 */
|
|
2480
2478
|
setLiClickEvent() {
|
|
@@ -2558,10 +2556,13 @@ export const PanelHandleContentDetails = () => {
|
|
|
2558
2556
|
}
|
|
2559
2557
|
},
|
|
2560
2558
|
/**
|
|
2559
|
+
* 生成配置项forms
|
|
2561
2560
|
* 生成配置每一项的元素
|
|
2562
2561
|
* @param formConfig
|
|
2563
2562
|
*/
|
|
2564
|
-
|
|
2563
|
+
createSectionContainerItem_forms(
|
|
2564
|
+
formConfig: PopsPanelContentConfig | PopsPanelFormsDetails
|
|
2565
|
+
) {
|
|
2565
2566
|
let that = this;
|
|
2566
2567
|
let formConfig_forms = formConfig as PopsPanelFormsDetails;
|
|
2567
2568
|
if (formConfig_forms["type"] === "forms") {
|
|
@@ -2628,6 +2629,16 @@ export const PanelHandleContentDetails = () => {
|
|
|
2628
2629
|
});
|
|
2629
2630
|
formContainerListElement.appendChild(formContainerULElement);
|
|
2630
2631
|
that.sectionContainerULElement.appendChild(formContainerListElement);
|
|
2632
|
+
|
|
2633
|
+
if (typeof formConfig_forms.afterAddToUListCallBack === "function") {
|
|
2634
|
+
formConfig_forms.afterAddToUListCallBack(formConfig_forms, {
|
|
2635
|
+
target: formContainerListElement,
|
|
2636
|
+
ulElement: formContainerULElement,
|
|
2637
|
+
sectionContainerULElement: that.sectionContainerULElement,
|
|
2638
|
+
formContainerListElement: formContainerListElement,
|
|
2639
|
+
formHeaderDivElement: formHeaderDivElement,
|
|
2640
|
+
});
|
|
2641
|
+
}
|
|
2631
2642
|
} else {
|
|
2632
2643
|
/* 如果成功创建,加入到中间容器中 */
|
|
2633
2644
|
that.uListContainerAddItem(formConfig as any, {
|
|
@@ -2649,7 +2660,7 @@ export const PanelHandleContentDetails = () => {
|
|
|
2649
2660
|
containerOptions["ulElement"].appendChild(itemLiElement);
|
|
2650
2661
|
}
|
|
2651
2662
|
if (typeof formConfig.afterAddToUListCallBack === "function") {
|
|
2652
|
-
formConfig.afterAddToUListCallBack(formConfig, {
|
|
2663
|
+
formConfig.afterAddToUListCallBack(formConfig as any, {
|
|
2653
2664
|
...containerOptions,
|
|
2654
2665
|
target: itemLiElement,
|
|
2655
2666
|
});
|
|
@@ -2694,28 +2705,9 @@ export const PanelHandleContentDetails = () => {
|
|
|
2694
2705
|
] as PopsPanelContentConfig[];
|
|
2695
2706
|
|
|
2696
2707
|
__forms__.forEach((formConfig) => {
|
|
2697
|
-
this.
|
|
2708
|
+
this.createSectionContainerItem_forms(formConfig);
|
|
2698
2709
|
});
|
|
2699
2710
|
|
|
2700
|
-
let autoAdaptionContentHeight =
|
|
2701
|
-
asideConfig.autoAdaptionContentHeight ?? true;
|
|
2702
|
-
if (autoAdaptionContentHeight) {
|
|
2703
|
-
/* 根据标题的高度来自适应内容高度,默认开启 */
|
|
2704
|
-
/* 中间容器的偏移量,看设置的section.pops-panel-container的padding,默认0 */
|
|
2705
|
-
let contentContainerOffset =
|
|
2706
|
-
(asideConfig as any).contentContainerOffset ?? 0;
|
|
2707
|
-
/* 获取标题的<ul>元素的高度 */
|
|
2708
|
-
let sectionContainerHeaderULElementHeight = popsDOMUtils.height(
|
|
2709
|
-
this.sectionContainerHeaderULElement
|
|
2710
|
-
);
|
|
2711
|
-
this.sectionContainerULElement.style.setProperty(
|
|
2712
|
-
"height",
|
|
2713
|
-
`calc( 100% - ${
|
|
2714
|
-
sectionContainerHeaderULElementHeight + contentContainerOffset
|
|
2715
|
-
}px )`
|
|
2716
|
-
);
|
|
2717
|
-
}
|
|
2718
|
-
|
|
2719
2711
|
if (typeof asideConfig.callback === "function") {
|
|
2720
2712
|
/* 执行回调 */
|
|
2721
2713
|
asideConfig.callback(
|
|
@@ -4,7 +4,7 @@ import type { PopsIcon } from "../../types/icon";
|
|
|
4
4
|
/**
|
|
5
5
|
* pops.panel的 button
|
|
6
6
|
*/
|
|
7
|
-
export interface PopsPanelButtonDetails extends PopsPanelCommonDetails {
|
|
7
|
+
export interface PopsPanelButtonDetails extends PopsPanelCommonDetails<PopsPanelButtonDetails> {
|
|
8
8
|
/**
|
|
9
9
|
* (可选)className属性
|
|
10
10
|
*/
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { PopsPanelFormsDetails } from "./formsType";
|
|
1
2
|
import { PopsPanelFormsTotalDetails } from "./indexType";
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -18,7 +19,9 @@ export interface PopsPanelRightAsideContainerOptions {
|
|
|
18
19
|
/**
|
|
19
20
|
* 通用配置
|
|
20
21
|
*/
|
|
21
|
-
export interface PopsPanelCommonDetails
|
|
22
|
+
export interface PopsPanelCommonDetails<
|
|
23
|
+
T extends PopsPanelFormsTotalDetails | PopsPanelFormsDetails
|
|
24
|
+
> {
|
|
22
25
|
/**
|
|
23
26
|
* 在添加到<ul>元素后触发该回调
|
|
24
27
|
* @param formConfig 配置
|
|
@@ -46,7 +49,7 @@ export interface PopsPanelCommonDetails {
|
|
|
46
49
|
* container内只有container.ulElement这个属性
|
|
47
50
|
*/
|
|
48
51
|
afterAddToUListCallBack?: (
|
|
49
|
-
formConfig:
|
|
52
|
+
formConfig: T,
|
|
50
53
|
container: PopsPanelRightAsideContainerOptions
|
|
51
54
|
) => void;
|
|
52
55
|
}
|
|
@@ -229,6 +229,9 @@ export const PopsPanelConfig = (): Required<PopsPanelDetails> => {
|
|
|
229
229
|
description: "二级菜单",
|
|
230
230
|
rightText: "自定义配置",
|
|
231
231
|
arrowRightIcon: true,
|
|
232
|
+
afterAddToUListCallBack(formConfig, container) {
|
|
233
|
+
console.log(formConfig, container);
|
|
234
|
+
},
|
|
232
235
|
clickCallBack(event, formConfig) {
|
|
233
236
|
console.log("进入子配置", event, formConfig);
|
|
234
237
|
},
|
|
@@ -314,6 +317,9 @@ export const PopsPanelConfig = (): Required<PopsPanelDetails> => {
|
|
|
314
317
|
type: "forms",
|
|
315
318
|
isFold: true,
|
|
316
319
|
text: "折叠菜单",
|
|
320
|
+
afterAddToUListCallBack(formConfig, container) {
|
|
321
|
+
console.log(formConfig, container);
|
|
322
|
+
},
|
|
317
323
|
forms: [
|
|
318
324
|
{
|
|
319
325
|
className: "panel-switch",
|
|
@@ -4,7 +4,8 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
4
4
|
/**
|
|
5
5
|
* pops.panel的 深层菜单
|
|
6
6
|
*/
|
|
7
|
-
export interface PopsPanelDeepMenuDetails
|
|
7
|
+
export interface PopsPanelDeepMenuDetails
|
|
8
|
+
extends PopsPanelCommonDetails<PopsPanelDeepMenuDetails> {
|
|
8
9
|
/**
|
|
9
10
|
* 类型
|
|
10
11
|
*/
|
|
@@ -51,7 +52,7 @@ export interface PopsPanelDeepMenuDetails extends PopsPanelCommonDetails {
|
|
|
51
52
|
clickCallBack?: (
|
|
52
53
|
event: MouseEvent | PointerEvent,
|
|
53
54
|
formConfig: PopsPanelDeepMenuDetails
|
|
54
|
-
) => boolean | void
|
|
55
|
+
) => boolean | void | Promise<boolean | void>;
|
|
55
56
|
/**
|
|
56
57
|
* 菜单配置
|
|
57
58
|
*/
|
|
@@ -4,7 +4,8 @@ import type { PopsPanelFormsTotalDetails } from "./indexType";
|
|
|
4
4
|
/**
|
|
5
5
|
* pops.panel的 forms
|
|
6
6
|
*/
|
|
7
|
-
export interface PopsPanelFormsDetails
|
|
7
|
+
export interface PopsPanelFormsDetails
|
|
8
|
+
extends PopsPanelCommonDetails<PopsPanelFormsDetails> {
|
|
8
9
|
/**
|
|
9
10
|
* (可选)className属性
|
|
10
11
|
*/
|
|
@@ -8,8 +8,21 @@
|
|
|
8
8
|
--aside-bg-color: #ffffff;
|
|
9
9
|
--aside-hover-color: rgb(64, 158, 255);
|
|
10
10
|
--aside-hover-bg-color: rgba(64, 158, 255, 0.1);
|
|
11
|
-
|
|
12
|
-
--
|
|
11
|
+
|
|
12
|
+
--pops-panel-forms-margin-top-bottom: 10px;
|
|
13
|
+
--pops-panel-forms-margin-left-right: 20px;
|
|
14
|
+
--pops-panel-forms-header-icon-size: 20px;
|
|
15
|
+
--pops-panel-forms-header-padding-top-bottom: 15px;
|
|
16
|
+
--pops-panel-forms-header-padding-left-right: 10px;
|
|
17
|
+
--pops-panel-forms-container-item-bg-color: #ffffff;
|
|
18
|
+
--pops-panel-forms-container-item-title-color: #333;
|
|
19
|
+
--pops-panel-forms-container-item-border-radius: 6px;
|
|
20
|
+
--pops-panel-forms-container-item-margin-top-bottom: 10px;
|
|
21
|
+
--pops-panel-forms-container-item-margin-left-right: var(
|
|
22
|
+
--pops-panel-forms-margin-left-right
|
|
23
|
+
);
|
|
24
|
+
--pops-panel-forms-container-li-padding-top-bottom: 12px;
|
|
25
|
+
--pops-panel-forms-container-li-padding-left-right: 16px;
|
|
13
26
|
}
|
|
14
27
|
.pops[type-value="panel"] {
|
|
15
28
|
color: var(--pops-color);
|
|
@@ -87,21 +100,29 @@ aside.pops-panel-aside {
|
|
|
87
100
|
}
|
|
88
101
|
section.pops-panel-container {
|
|
89
102
|
width: 100%;
|
|
90
|
-
padding: 10px;
|
|
91
103
|
overflow: hidden;
|
|
104
|
+
display: flex;
|
|
105
|
+
flex-direction: column;
|
|
92
106
|
}
|
|
93
107
|
section.pops-panel-container .pops-panel-container-header-ul,
|
|
94
108
|
section.pops-panel-container .pops-panel-deepMenu-container-header-ul {
|
|
95
109
|
border-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
|
|
110
|
+
flex: 0 auto;
|
|
96
111
|
}
|
|
97
112
|
section.pops-panel-container .pops-panel-container-header-ul li {
|
|
113
|
+
text-align: left;
|
|
98
114
|
display: flex;
|
|
99
115
|
justify-content: flex-start !important;
|
|
100
|
-
|
|
116
|
+
margin: 0px !important;
|
|
117
|
+
padding: var(--pops-panel-forms-header-padding-top-bottom)
|
|
118
|
+
calc(
|
|
119
|
+
var(--pops-panel-forms-margin-left-right) +
|
|
120
|
+
var(--pops-panel-forms-container-li-padding-left-right)
|
|
121
|
+
);
|
|
101
122
|
}
|
|
102
123
|
section.pops-panel-container > ul:last-child {
|
|
103
124
|
overflow: auto;
|
|
104
|
-
|
|
125
|
+
flex: 1;
|
|
105
126
|
}
|
|
106
127
|
aside.pops-panel-aside ul li {
|
|
107
128
|
margin: 6px 8px;
|
|
@@ -117,31 +138,42 @@ aside.pops-panel-aside ul li:hover {
|
|
|
117
138
|
color: var(--aside-hover-color);
|
|
118
139
|
background: var(--aside-hover-bg-color);
|
|
119
140
|
}
|
|
120
|
-
section.pops-panel-container > ul li {
|
|
141
|
+
section.pops-panel-container > ul li:not(.pops-panel-forms-container-item) {
|
|
121
142
|
display: flex;
|
|
122
143
|
justify-content: space-between;
|
|
123
144
|
align-items: center;
|
|
124
|
-
margin:
|
|
145
|
+
margin: var(--pops-panel-forms-margin-top-bottom)
|
|
146
|
+
calc(
|
|
147
|
+
var(--pops-panel-forms-margin-left-right) +
|
|
148
|
+
var(--pops-panel-forms-margin-left-right)
|
|
149
|
+
);
|
|
125
150
|
gap: 10px;
|
|
126
151
|
}
|
|
127
152
|
section.pops-panel-container .pops-panel-forms-container-item-header-text {
|
|
128
|
-
|
|
153
|
+
margin: 10px;
|
|
154
|
+
margin-left: calc(
|
|
155
|
+
var(--pops-panel-forms-margin-left-right) +
|
|
156
|
+
var(--pops-panel-forms-container-li-padding-left-right)
|
|
157
|
+
);
|
|
158
|
+
font-size: 0.9em;
|
|
159
|
+
text-align: left;
|
|
160
|
+
color: var(--pops-panel-forms-container-item-title-color);
|
|
129
161
|
}
|
|
130
162
|
section.pops-panel-container li.pops-panel-forms-container-item {
|
|
131
163
|
display: block;
|
|
132
|
-
margin-top: 20px;
|
|
133
164
|
}
|
|
134
165
|
section.pops-panel-container .pops-panel-forms-container-item ul {
|
|
135
|
-
border-radius:
|
|
136
|
-
background: var(--container-item-bg-color);
|
|
137
|
-
margin:
|
|
166
|
+
border-radius: var(--pops-panel-forms-container-item-border-radius);
|
|
167
|
+
background: var(--pops-panel-forms-container-item-bg-color);
|
|
168
|
+
margin: var(--pops-panel-forms-container-item-margin-top-bottom)
|
|
169
|
+
var(--pops-panel-forms-margin-left-right);
|
|
138
170
|
}
|
|
139
171
|
section.pops-panel-container .pops-panel-forms-container-item ul li {
|
|
140
172
|
display: flex;
|
|
141
173
|
justify-content: space-between;
|
|
142
174
|
align-items: center;
|
|
143
|
-
padding:
|
|
144
|
-
margin: 0px
|
|
175
|
+
padding: var(--pops-panel-forms-container-li-padding-top-bottom) 0px;
|
|
176
|
+
margin: 0px var(--pops-panel-forms-container-li-padding-left-right);
|
|
145
177
|
border-bottom: 1px solid rgb(229, 229, 229, var(--pops-bd-opacity));
|
|
146
178
|
text-align: left;
|
|
147
179
|
}
|
|
@@ -149,19 +181,14 @@ section.pops-panel-container
|
|
|
149
181
|
.pops-panel-forms-container-item
|
|
150
182
|
ul
|
|
151
183
|
li.pops-panel-deepMenu-nav-item {
|
|
152
|
-
padding:
|
|
184
|
+
padding: var(--pops-panel-forms-container-li-padding-top-bottom)
|
|
185
|
+
var(--pops-panel-forms-container-li-padding-left-right);
|
|
153
186
|
margin: 0px;
|
|
154
187
|
border-bottom: 0;
|
|
155
188
|
}
|
|
156
189
|
section.pops-panel-container .pops-panel-forms-container-item ul li:last-child {
|
|
157
190
|
border: 0;
|
|
158
191
|
}
|
|
159
|
-
section.pops-panel-container .pops-panel-forms-container-item > div {
|
|
160
|
-
margin: 10px;
|
|
161
|
-
margin-left: 20px;
|
|
162
|
-
font-size: 0.9em;
|
|
163
|
-
text-align: left;
|
|
164
|
-
}
|
|
165
192
|
/* 主文字 */
|
|
166
193
|
/*section.pops-panel-container
|
|
167
194
|
.pops-panel-forms-container-item
|
|
@@ -183,9 +210,10 @@ section.pops-panel-container
|
|
|
183
210
|
/* 折叠面板 */
|
|
184
211
|
|
|
185
212
|
section.pops-panel-container .pops-panel-forms-fold {
|
|
186
|
-
border-radius:
|
|
187
|
-
background: var(--container-item-bg-color);
|
|
188
|
-
margin:
|
|
213
|
+
border-radius: var(--pops-panel-forms-container-item-border-radius);
|
|
214
|
+
background: var(--pops-panel-forms-container-item-bg-color);
|
|
215
|
+
margin: var(--pops-panel-forms-margin-top-bottom)
|
|
216
|
+
var(--pops-panel-forms-margin-left-right);
|
|
189
217
|
}
|
|
190
218
|
section.pops-panel-container
|
|
191
219
|
.pops-panel-forms-fold
|
|
@@ -194,8 +222,8 @@ section.pops-panel-container
|
|
|
194
222
|
align-items: center;
|
|
195
223
|
fill: #6c6c6c;
|
|
196
224
|
justify-content: space-between;
|
|
197
|
-
margin: 0px
|
|
198
|
-
padding:
|
|
225
|
+
margin: 0px var(--pops-panel-forms-container-li-padding-left-right) !important;
|
|
226
|
+
padding: var(--pops-panel-forms-container-li-padding-top-bottom) 0px !important;
|
|
199
227
|
}
|
|
200
228
|
section.pops-panel-container
|
|
201
229
|
.pops-panel-forms-fold[data-fold-enable]
|
|
@@ -233,22 +261,23 @@ section.pops-panel-container
|
|
|
233
261
|
/* 姑且认为小于600px的屏幕为移动端 */
|
|
234
262
|
@media (max-width: 600px) {
|
|
235
263
|
/* 兼容移动端CSS */
|
|
264
|
+
.pops[type-value="panel"] {
|
|
265
|
+
--pops-panel-forms-margin-left-right: 10px;
|
|
266
|
+
}
|
|
236
267
|
.pops[type-value="panel"] {
|
|
237
268
|
width: 92%;
|
|
238
269
|
width: 92vw;
|
|
239
|
-
|
|
240
|
-
.pops[type-value="panel"] section.pops-panel-container {
|
|
241
|
-
padding: 10px 0px;
|
|
270
|
+
width: 92dvw;
|
|
242
271
|
}
|
|
243
272
|
.pops[type-value="panel"] .pops-panel-content aside.pops-panel-aside {
|
|
244
|
-
width: 20%;
|
|
273
|
+
max-width: 20%;
|
|
245
274
|
}
|
|
246
275
|
.pops[type-value="panel"]
|
|
247
276
|
section.pops-panel-container
|
|
248
277
|
.pops-panel-forms-container-item
|
|
249
278
|
> div {
|
|
250
|
-
margin: 5px 10px;
|
|
251
279
|
text-align: left;
|
|
280
|
+
--pops-panel-forms-margin-left-right: 0px;
|
|
252
281
|
}
|
|
253
282
|
.pops[type-value="panel"]
|
|
254
283
|
section.pops-panel-container
|
|
@@ -1022,11 +1051,16 @@ section.pops-panel-container
|
|
|
1022
1051
|
align-items: center;
|
|
1023
1052
|
width: -webkit-fill-available;
|
|
1024
1053
|
width: -moz-available;
|
|
1025
|
-
padding:
|
|
1054
|
+
padding: var(--pops-panel-forms-header-padding-top-bottom)
|
|
1055
|
+
calc(
|
|
1056
|
+
var(--pops-panel-forms-margin-left-right) +
|
|
1057
|
+
var(--pops-panel-forms-container-li-padding-left-right) -
|
|
1058
|
+
var(--pops-panel-forms-header-icon-size)
|
|
1059
|
+
);
|
|
1026
1060
|
}
|
|
1027
1061
|
.pops-panel-deepMenu-container .pops-panel-deepMenu-container-left-arrow-icon {
|
|
1028
|
-
width:
|
|
1029
|
-
height:
|
|
1062
|
+
width: var(--pops-panel-forms-header-icon-size);
|
|
1063
|
+
height: var(--pops-panel-forms-header-icon-size);
|
|
1030
1064
|
display: flex;
|
|
1031
1065
|
align-items: center;
|
|
1032
1066
|
cursor: pointer;
|
|
@@ -3,7 +3,8 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
3
3
|
/**
|
|
4
4
|
* pops.panel的 input
|
|
5
5
|
*/
|
|
6
|
-
export interface PopsPanelInputDetails
|
|
6
|
+
export interface PopsPanelInputDetails
|
|
7
|
+
extends PopsPanelCommonDetails<PopsPanelInputDetails> {
|
|
7
8
|
/**
|
|
8
9
|
* (可选)className属性
|
|
9
10
|
*/
|
|
@@ -4,7 +4,8 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
4
4
|
* pops.panel的 own
|
|
5
5
|
* 自定义的
|
|
6
6
|
*/
|
|
7
|
-
export interface PopsPanelOwnDetails
|
|
7
|
+
export interface PopsPanelOwnDetails
|
|
8
|
+
extends PopsPanelCommonDetails<PopsPanelOwnDetails> {
|
|
8
9
|
/**
|
|
9
10
|
* (可选)className属性
|
|
10
11
|
*/
|
|
@@ -26,7 +26,7 @@ export interface PopsPanelSelectMultipleDataOption<T> {
|
|
|
26
26
|
* pops.panel的 select
|
|
27
27
|
*/
|
|
28
28
|
export interface PopsPanelSelectMultipleDetails<T = any>
|
|
29
|
-
extends PopsPanelCommonDetails {
|
|
29
|
+
extends PopsPanelCommonDetails<PopsPanelSelectMultipleDetails> {
|
|
30
30
|
/**
|
|
31
31
|
* (可选)className属性
|
|
32
32
|
*/
|
|
@@ -3,7 +3,8 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
3
3
|
/**
|
|
4
4
|
* pops.panel的 slider
|
|
5
5
|
*/
|
|
6
|
-
export interface PopsPanelSliderDetails
|
|
6
|
+
export interface PopsPanelSliderDetails
|
|
7
|
+
extends PopsPanelCommonDetails<PopsPanelSliderDetails> {
|
|
7
8
|
/**
|
|
8
9
|
* (可选)className属性
|
|
9
10
|
*/
|
|
@@ -3,7 +3,8 @@ import type { PopsPanelCommonDetails } from "./commonType";
|
|
|
3
3
|
/**
|
|
4
4
|
* pops.panel的 switch
|
|
5
5
|
*/
|
|
6
|
-
export interface PopsPanelSwitchDetails
|
|
6
|
+
export interface PopsPanelSwitchDetails
|
|
7
|
+
extends PopsPanelCommonDetails<PopsPanelSwitchDetails> {
|
|
7
8
|
/**
|
|
8
9
|
* (可选)className属性
|
|
9
10
|
*/
|