@whitesev/pops 2.4.7 → 2.5.1
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/dist/index.amd.js +319 -159
- package/dist/index.amd.js.map +1 -1
- package/dist/index.amd.min.js +2 -0
- package/dist/index.amd.min.js.map +1 -0
- package/dist/index.cjs.js +319 -159
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +2 -0
- package/dist/index.cjs.min.js.map +1 -0
- package/dist/index.esm.js +319 -159
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +2 -0
- package/dist/index.esm.min.js.map +1 -0
- package/dist/index.iife.js +319 -159
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +2 -0
- package/dist/index.iife.min.js.map +1 -0
- package/dist/index.system.js +319 -159
- package/dist/index.system.js.map +1 -1
- package/dist/index.system.min.js +2 -0
- package/dist/index.system.min.js.map +1 -0
- package/dist/index.umd.js +319 -159
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +2 -0
- package/dist/index.umd.min.js.map +1 -0
- package/dist/types/src/Pops.d.ts +35 -31
- package/dist/types/src/components/panel/handlerComponents.d.ts +40 -21
- package/dist/types/src/components/panel/index.d.ts +1 -1
- package/dist/types/src/components/panel/types/components-button.d.ts +8 -19
- package/dist/types/src/components/panel/types/components-common.d.ts +23 -0
- package/dist/types/src/components/panel/types/components-deepMenu.d.ts +0 -18
- package/dist/types/src/components/panel/types/components-forms.d.ts +0 -18
- package/dist/types/src/components/panel/types/components-input.d.ts +0 -21
- package/dist/types/src/components/panel/types/components-own.d.ts +0 -14
- package/dist/types/src/components/panel/types/components-select.d.ts +0 -21
- package/dist/types/src/components/panel/types/components-selectMultiple.d.ts +0 -18
- package/dist/types/src/components/panel/types/components-slider.d.ts +0 -19
- package/dist/types/src/components/panel/types/components-switch.d.ts +0 -21
- package/dist/types/src/components/panel/types/components-textarea.d.ts +0 -21
- package/dist/types/src/components/panel/types/index.d.ts +78 -11
- package/dist/types/src/components/rightClickMenu/index.d.ts +5 -11
- package/dist/types/src/components/searchSuggestion/index.d.ts +1 -1
- package/dist/types/src/components/tooltip/index.d.ts +3 -3
- package/dist/types/src/handler/PopsHandler.d.ts +44 -28
- package/dist/types/src/types/global.d.ts +11 -9
- package/dist/types/src/utils/PopsDOMUtils.d.ts +1 -1
- package/package.json +2 -1
- package/src/PopsAnimation.ts +6 -6
- package/src/components/alert/index.ts +4 -4
- package/src/components/confirm/index.ts +6 -6
- package/src/components/drawer/index.ts +7 -2
- package/src/components/folder/index.ts +22 -22
- package/src/components/iframe/index.ts +13 -12
- package/src/components/loading/index.ts +1 -1
- package/src/components/panel/config.ts +58 -5
- package/src/components/panel/handlerComponents.ts +161 -74
- package/src/components/panel/index.css +30 -6
- package/src/components/panel/index.ts +30 -15
- package/src/components/panel/types/components-button.ts +8 -21
- package/src/components/panel/types/components-common.ts +27 -0
- package/src/components/panel/types/components-deepMenu.ts +0 -20
- package/src/components/panel/types/components-forms.ts +0 -20
- package/src/components/panel/types/components-input.ts +0 -23
- package/src/components/panel/types/components-own.ts +0 -14
- package/src/components/panel/types/components-select.ts +0 -23
- package/src/components/panel/types/components-selectMultiple.ts +0 -20
- package/src/components/panel/types/components-slider.ts +0 -21
- package/src/components/panel/types/components-switch.ts +0 -23
- package/src/components/panel/types/components-textarea.ts +0 -23
- package/src/components/panel/types/index.ts +85 -13
- package/src/components/prompt/index.ts +7 -7
- package/src/components/searchSuggestion/index.ts +5 -11
- package/src/handler/PopsHandler.ts +47 -30
- package/src/types/global.d.ts +11 -9
- package/src/utils/PopsDOMUtils.ts +14 -14
|
@@ -74,7 +74,7 @@ export const PopsPanel = {
|
|
|
74
74
|
: `<p pops class="pops-${popsType}-title-text" class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`
|
|
75
75
|
}${headerBtnHTML}</div>
|
|
76
76
|
<div class="pops-content pops-${popsType}-content">
|
|
77
|
-
<aside class="pops-${popsType}-aside">
|
|
77
|
+
<aside class="pops-${popsType}-aside pops-user-select-none">
|
|
78
78
|
<ul class="pops-${popsType}-aside-top-container"></ul>
|
|
79
79
|
<ul class="pops-${popsType}-aside-bottom-container"></ul>
|
|
80
80
|
</aside>
|
|
@@ -84,7 +84,14 @@ export const PopsPanel = {
|
|
|
84
84
|
<ul class="pops-${popsType}-container-main-ul"></ul>
|
|
85
85
|
</section>
|
|
86
86
|
</div>
|
|
87
|
-
</div
|
|
87
|
+
</div>
|
|
88
|
+
<div class="pops-${popsType}-bottom-wrapper">
|
|
89
|
+
<section class="pops-${popsType}-bottom-container">
|
|
90
|
+
<ul class="pops-${popsType}-bottom-left-container"></ul>
|
|
91
|
+
<ul class="pops-${popsType}-bottom-right-container"></ul>
|
|
92
|
+
</section>
|
|
93
|
+
</div>
|
|
94
|
+
`,
|
|
88
95
|
"",
|
|
89
96
|
zIndex
|
|
90
97
|
);
|
|
@@ -94,13 +101,17 @@ export const PopsPanel = {
|
|
|
94
101
|
const $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
|
|
95
102
|
/* 结构元素 */
|
|
96
103
|
const {
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
+
$pops,
|
|
105
|
+
$headerBtnClose,
|
|
106
|
+
$title,
|
|
107
|
+
$content,
|
|
108
|
+
$panelRightSectionWrapper,
|
|
109
|
+
$panelLeftAside,
|
|
110
|
+
$panelContentSectionContainer,
|
|
111
|
+
$panelBottomWrapper,
|
|
112
|
+
$panelBottomContainer,
|
|
113
|
+
$panelBottomLeftContainer,
|
|
114
|
+
$panelBottomRightContainer,
|
|
104
115
|
} = PopsHandler.handleQueryElement($anim, popsType);
|
|
105
116
|
if (config.isMobile || popsUtils.isPhone()) {
|
|
106
117
|
popsDOMUtils.addClassName($pops, config.mobileClassName);
|
|
@@ -139,7 +150,7 @@ export const PopsPanel = {
|
|
|
139
150
|
config
|
|
140
151
|
);
|
|
141
152
|
/* 为顶部右边的关闭按钮添加点击事件 */
|
|
142
|
-
PopsHandler.handleClickEvent("close", $
|
|
153
|
+
PopsHandler.handleClickEvent("close", $headerBtnClose, eventDetails, config.btn.close!.callback!);
|
|
143
154
|
|
|
144
155
|
/* 创建到页面中 */
|
|
145
156
|
popsDOMUtils.append($shadowRoot, isCreatedElementList);
|
|
@@ -158,11 +169,15 @@ export const PopsPanel = {
|
|
|
158
169
|
panelHandlerComponents.init({
|
|
159
170
|
config: config,
|
|
160
171
|
$el: {
|
|
161
|
-
$pops
|
|
162
|
-
$content
|
|
163
|
-
$
|
|
164
|
-
$
|
|
165
|
-
$
|
|
172
|
+
$pops,
|
|
173
|
+
$content,
|
|
174
|
+
$panelRightSectionWrapper,
|
|
175
|
+
$panelLeftAside,
|
|
176
|
+
$panelContentSectionContainer,
|
|
177
|
+
$panelBottomWrapper,
|
|
178
|
+
$panelBottomContainer,
|
|
179
|
+
$panelBottomLeftContainer,
|
|
180
|
+
$panelBottomRightContainer,
|
|
166
181
|
},
|
|
167
182
|
});
|
|
168
183
|
|
|
@@ -5,26 +5,6 @@ import type { PopsIconType } from "../../../types/icon";
|
|
|
5
5
|
* pops.panel的 button
|
|
6
6
|
*/
|
|
7
7
|
export interface PopsPanelButtonDetails extends PopsPanelCommonDetails<PopsPanelButtonDetails> {
|
|
8
|
-
/**
|
|
9
|
-
* (可选)className属性
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* (可选)自定义元素属性
|
|
14
|
-
*/
|
|
15
|
-
attributes?:
|
|
16
|
-
| {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}
|
|
19
|
-
| {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}[];
|
|
22
|
-
/**
|
|
23
|
-
* (可选)自定义属性
|
|
24
|
-
*/
|
|
25
|
-
props?: {
|
|
26
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
27
|
-
};
|
|
28
8
|
/**
|
|
29
9
|
* 显示在左边的文字
|
|
30
10
|
*/
|
|
@@ -50,15 +30,22 @@ export interface PopsPanelButtonDetails extends PopsPanelCommonDetails<PopsPanel
|
|
|
50
30
|
*/
|
|
51
31
|
buttonText: string | (() => string);
|
|
52
32
|
/**
|
|
53
|
-
* 按钮的图标,已配置的svg请看pops.config.iconSVG,或者自定义的图标svg
|
|
33
|
+
* 按钮的图标,已配置的svg请看pops.config.iconSVG,或者自定义的图标svg代码,留空则是没有图标
|
|
34
|
+
* @default ""
|
|
54
35
|
*/
|
|
55
36
|
buttonIcon?: PopsIconType;
|
|
56
37
|
/**
|
|
57
38
|
* 按钮的图标在右边
|
|
39
|
+
* + true 右边
|
|
40
|
+
* + false 左边
|
|
41
|
+
* @default false
|
|
58
42
|
*/
|
|
59
43
|
buttonIsRightIcon?: boolean;
|
|
60
44
|
/**
|
|
61
45
|
* 按钮的图标旋转
|
|
46
|
+
* + true 旋转
|
|
47
|
+
* + false 不旋转
|
|
48
|
+
* @default false
|
|
62
49
|
*/
|
|
63
50
|
buttonIconIsLoading?: boolean;
|
|
64
51
|
/**
|
|
@@ -20,6 +20,33 @@ export interface PopsPanelRightAsideContainerOptions {
|
|
|
20
20
|
* 通用配置
|
|
21
21
|
*/
|
|
22
22
|
export interface PopsPanelCommonDetails<T extends PopsPanelFormsTotalDetails | PopsPanelFormsDetails> {
|
|
23
|
+
/**
|
|
24
|
+
* (可选)className属性
|
|
25
|
+
* @default ""
|
|
26
|
+
*/
|
|
27
|
+
className?: string;
|
|
28
|
+
/**
|
|
29
|
+
* (可选)自定义元素属性
|
|
30
|
+
* @default {}
|
|
31
|
+
*/
|
|
32
|
+
attributes?:
|
|
33
|
+
| {
|
|
34
|
+
[key: string]: any;
|
|
35
|
+
}
|
|
36
|
+
| {
|
|
37
|
+
[key: string]: any;
|
|
38
|
+
}[];
|
|
39
|
+
/**
|
|
40
|
+
* (可选)自定义属性
|
|
41
|
+
* @default {}
|
|
42
|
+
*/
|
|
43
|
+
props?:
|
|
44
|
+
| {
|
|
45
|
+
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
46
|
+
}
|
|
47
|
+
| {
|
|
48
|
+
[key: string]: any;
|
|
49
|
+
};
|
|
23
50
|
/**
|
|
24
51
|
* 在添加到<ul>元素后触发该回调
|
|
25
52
|
* @param formConfig 配置
|
|
@@ -9,26 +9,6 @@ export interface PopsPanelDeepMenuDetails extends PopsPanelCommonDetails<PopsPan
|
|
|
9
9
|
* 类型
|
|
10
10
|
*/
|
|
11
11
|
type: "deepMenu";
|
|
12
|
-
/**
|
|
13
|
-
* (可选)className属性
|
|
14
|
-
*/
|
|
15
|
-
className?: string;
|
|
16
|
-
/**
|
|
17
|
-
* (可选)自定义元素属性
|
|
18
|
-
*/
|
|
19
|
-
attributes?:
|
|
20
|
-
| {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}
|
|
23
|
-
| {
|
|
24
|
-
[key: string]: any;
|
|
25
|
-
}[];
|
|
26
|
-
/**
|
|
27
|
-
* (可选)自定义属性
|
|
28
|
-
*/
|
|
29
|
-
props?: {
|
|
30
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
31
|
-
};
|
|
32
12
|
/**
|
|
33
13
|
* 显示在左边的文字
|
|
34
14
|
*/
|
|
@@ -5,26 +5,6 @@ import type { PopsPanelFormsTotalDetails } from ".";
|
|
|
5
5
|
* pops.panel的 forms
|
|
6
6
|
*/
|
|
7
7
|
export interface PopsPanelFormsDetails extends PopsPanelCommonDetails<PopsPanelFormsDetails> {
|
|
8
|
-
/**
|
|
9
|
-
* (可选)className属性
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* (可选)自定义元素属性
|
|
14
|
-
*/
|
|
15
|
-
attributes?:
|
|
16
|
-
| {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}
|
|
19
|
-
| {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}[];
|
|
22
|
-
/**
|
|
23
|
-
* (可选)自定义属性
|
|
24
|
-
*/
|
|
25
|
-
props?: {
|
|
26
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
27
|
-
};
|
|
28
8
|
/**
|
|
29
9
|
* 显示在左边的文字
|
|
30
10
|
*/
|
|
@@ -4,29 +4,6 @@ import type { PopsPanelCommonDetails } from "./components-common";
|
|
|
4
4
|
* pops.panel的 input
|
|
5
5
|
*/
|
|
6
6
|
export interface PopsPanelInputDetails extends PopsPanelCommonDetails<PopsPanelInputDetails> {
|
|
7
|
-
/**
|
|
8
|
-
* (可选)className属性
|
|
9
|
-
* @default ""
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* (可选)自定义元素属性
|
|
14
|
-
* @default {}
|
|
15
|
-
*/
|
|
16
|
-
attributes?:
|
|
17
|
-
| {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}
|
|
20
|
-
| {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}[];
|
|
23
|
-
/**
|
|
24
|
-
* (可选)自定义属性
|
|
25
|
-
* @default {}
|
|
26
|
-
*/
|
|
27
|
-
props?: {
|
|
28
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
29
|
-
};
|
|
30
7
|
/**
|
|
31
8
|
* 显示在左边的文字
|
|
32
9
|
*/
|
|
@@ -5,20 +5,6 @@ import type { PopsPanelCommonDetails } from "./components-common";
|
|
|
5
5
|
* 自定义的
|
|
6
6
|
*/
|
|
7
7
|
export interface PopsPanelOwnDetails extends PopsPanelCommonDetails<PopsPanelOwnDetails> {
|
|
8
|
-
/**
|
|
9
|
-
* (可选)className属性
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* (可选)自定义元素属性
|
|
14
|
-
*/
|
|
15
|
-
attributes?: any;
|
|
16
|
-
/**
|
|
17
|
-
* (可选)自定义属性
|
|
18
|
-
*/
|
|
19
|
-
props?: {
|
|
20
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
21
|
-
};
|
|
22
8
|
/**
|
|
23
9
|
* 类型
|
|
24
10
|
*/
|
|
@@ -6,29 +6,6 @@ import type { PopsPanelFormsTotalDetails } from ".";
|
|
|
6
6
|
* pops.panel的 select
|
|
7
7
|
*/
|
|
8
8
|
export interface PopsPanelSelectDetails<T = any> extends PopsPanelCommonDetails<PopsPanelSelectDetails> {
|
|
9
|
-
/**
|
|
10
|
-
* (可选)className属性
|
|
11
|
-
* @default ""
|
|
12
|
-
*/
|
|
13
|
-
className?: string;
|
|
14
|
-
/**
|
|
15
|
-
* (可选)自定义元素属性
|
|
16
|
-
* @default {}
|
|
17
|
-
*/
|
|
18
|
-
attributes?:
|
|
19
|
-
| {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}
|
|
22
|
-
| {
|
|
23
|
-
[key: string]: any;
|
|
24
|
-
}[];
|
|
25
|
-
/**
|
|
26
|
-
* (可选)自定义属性
|
|
27
|
-
* @default {}
|
|
28
|
-
*/
|
|
29
|
-
props?: {
|
|
30
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
31
|
-
};
|
|
32
9
|
/**
|
|
33
10
|
* 显示在左边的文字
|
|
34
11
|
*/
|
|
@@ -37,26 +37,6 @@ export interface PopsPanelSelectMultipleDataOption<T> {
|
|
|
37
37
|
*/
|
|
38
38
|
export interface PopsPanelSelectMultipleDetails<T = any>
|
|
39
39
|
extends PopsPanelCommonDetails<PopsPanelSelectMultipleDetails> {
|
|
40
|
-
/**
|
|
41
|
-
* (可选)className属性
|
|
42
|
-
*/
|
|
43
|
-
className?: string;
|
|
44
|
-
/**
|
|
45
|
-
* (可选)自定义元素属性
|
|
46
|
-
*/
|
|
47
|
-
attributes?:
|
|
48
|
-
| {
|
|
49
|
-
[key: string]: any;
|
|
50
|
-
}
|
|
51
|
-
| {
|
|
52
|
-
[key: string]: any;
|
|
53
|
-
}[];
|
|
54
|
-
/**
|
|
55
|
-
* (可选)自定义属性
|
|
56
|
-
*/
|
|
57
|
-
props?: {
|
|
58
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
59
|
-
};
|
|
60
40
|
/**
|
|
61
41
|
* 显示在左边的文字
|
|
62
42
|
*/
|
|
@@ -4,27 +4,6 @@ import type { PopsPanelCommonDetails } from "./components-common";
|
|
|
4
4
|
* pops.panel的 slider
|
|
5
5
|
*/
|
|
6
6
|
export interface PopsPanelSliderDetails extends PopsPanelCommonDetails<PopsPanelSliderDetails> {
|
|
7
|
-
/**
|
|
8
|
-
* className属性
|
|
9
|
-
* @default ""
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* 自定义元素属性
|
|
14
|
-
*/
|
|
15
|
-
attributes?:
|
|
16
|
-
| {
|
|
17
|
-
[key: string]: any;
|
|
18
|
-
}
|
|
19
|
-
| {
|
|
20
|
-
[key: string]: any;
|
|
21
|
-
}[];
|
|
22
|
-
/**
|
|
23
|
-
* 自定义属性
|
|
24
|
-
*/
|
|
25
|
-
props?: {
|
|
26
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
27
|
-
};
|
|
28
7
|
/**
|
|
29
8
|
* 显示在左边的文字
|
|
30
9
|
*/
|
|
@@ -4,29 +4,6 @@ import type { PopsPanelCommonDetails } from "./components-common";
|
|
|
4
4
|
* pops.panel的 switch
|
|
5
5
|
*/
|
|
6
6
|
export interface PopsPanelSwitchDetails extends PopsPanelCommonDetails<PopsPanelSwitchDetails> {
|
|
7
|
-
/**
|
|
8
|
-
* (可选)className属性
|
|
9
|
-
* @default ""
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* (可选)自定义元素属性
|
|
14
|
-
* @default {}
|
|
15
|
-
*/
|
|
16
|
-
attributes?:
|
|
17
|
-
| {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}
|
|
20
|
-
| {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}[];
|
|
23
|
-
/**
|
|
24
|
-
* (可选)自定义属性
|
|
25
|
-
* @default {}
|
|
26
|
-
*/
|
|
27
|
-
props?: {
|
|
28
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
29
|
-
};
|
|
30
7
|
/**
|
|
31
8
|
* 显示在左边的文字
|
|
32
9
|
*/
|
|
@@ -4,29 +4,6 @@ import type { PopsPanelCommonDetails } from "./components-common";
|
|
|
4
4
|
* pops.panel的 textarea
|
|
5
5
|
*/
|
|
6
6
|
export interface PopsPanelTextAreaDetails extends PopsPanelCommonDetails<PopsPanelTextAreaDetails> {
|
|
7
|
-
/**
|
|
8
|
-
* (可选)className属性
|
|
9
|
-
* @default ""
|
|
10
|
-
*/
|
|
11
|
-
className?: string;
|
|
12
|
-
/**
|
|
13
|
-
* (可选)自定义元素属性
|
|
14
|
-
* @default {}
|
|
15
|
-
*/
|
|
16
|
-
attributes?:
|
|
17
|
-
| {
|
|
18
|
-
[key: string]: any;
|
|
19
|
-
}
|
|
20
|
-
| {
|
|
21
|
-
[key: string]: any;
|
|
22
|
-
}[];
|
|
23
|
-
/**
|
|
24
|
-
* (可选)自定义属性
|
|
25
|
-
* @default {}
|
|
26
|
-
*/
|
|
27
|
-
props?: {
|
|
28
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
29
|
-
};
|
|
30
7
|
/**
|
|
31
8
|
* 显示在左边的文字
|
|
32
9
|
*/
|
|
@@ -10,6 +10,7 @@ import type { PopsPanelDeepMenuDetails } from "./components-deepMenu";
|
|
|
10
10
|
import type { PopsPanelOwnDetails } from "./components-own";
|
|
11
11
|
import type { PopsHeaderCloseButtonDetails } from "../../../types/button";
|
|
12
12
|
import type { PopsPanelSelectMultipleDetails } from "./components-selectMultiple";
|
|
13
|
+
import type { PopsPanelCommonDetails } from "./components-common";
|
|
13
14
|
|
|
14
15
|
/** panel的各种类型的配置项 */
|
|
15
16
|
export type PopsPanelFormsTotalDetails =
|
|
@@ -52,11 +53,11 @@ export interface PopsPanelContentConfig {
|
|
|
52
53
|
*/
|
|
53
54
|
className?: string | string[];
|
|
54
55
|
/**
|
|
55
|
-
*
|
|
56
|
+
* 显示的文本,可以是html格式
|
|
56
57
|
*/
|
|
57
58
|
title: string | (() => string);
|
|
58
59
|
/**
|
|
59
|
-
*
|
|
60
|
+
* (可选)中间顶部的文本,如果为空,则使用title的值代替
|
|
60
61
|
* @default title
|
|
61
62
|
*/
|
|
62
63
|
headerTitle?: string | (() => string);
|
|
@@ -84,19 +85,11 @@ export interface PopsPanelContentConfig {
|
|
|
84
85
|
/**
|
|
85
86
|
* (可选)自定义元素属性.setAttribute、.getAttribute
|
|
86
87
|
*/
|
|
87
|
-
attributes?:
|
|
88
|
-
| {
|
|
89
|
-
[key: string]: any;
|
|
90
|
-
}
|
|
91
|
-
| {
|
|
92
|
-
[key: string]: any;
|
|
93
|
-
}[];
|
|
88
|
+
attributes?: PopsPanelCommonDetails<any>["attributes"];
|
|
94
89
|
/**
|
|
95
90
|
* (可选)自定义元素内部的属性值
|
|
96
91
|
*/
|
|
97
|
-
props?:
|
|
98
|
-
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
99
|
-
};
|
|
92
|
+
props?: PopsPanelCommonDetails<any>["props"];
|
|
100
93
|
/**
|
|
101
94
|
* 子配置
|
|
102
95
|
*/
|
|
@@ -128,7 +121,7 @@ export interface PopsPanelContentConfig {
|
|
|
128
121
|
/**
|
|
129
122
|
* 配置
|
|
130
123
|
*/
|
|
131
|
-
|
|
124
|
+
config: {
|
|
132
125
|
/** 容器配置 */
|
|
133
126
|
asideConfig: PopsPanelContentConfig;
|
|
134
127
|
/** 左侧容器的元素 */
|
|
@@ -137,6 +130,81 @@ export interface PopsPanelContentConfig {
|
|
|
137
130
|
) => void;
|
|
138
131
|
}
|
|
139
132
|
|
|
133
|
+
/**
|
|
134
|
+
* pops.panel的bottomContent配置信息
|
|
135
|
+
*/
|
|
136
|
+
export interface PopsPanelBottomContentConfig {
|
|
137
|
+
/**
|
|
138
|
+
* (可选)元素的className,值为空的话就不设置
|
|
139
|
+
* @default ""
|
|
140
|
+
*/
|
|
141
|
+
className?: string | string[];
|
|
142
|
+
/**
|
|
143
|
+
* (可选)配置所在位置
|
|
144
|
+
*
|
|
145
|
+
* @default "left"
|
|
146
|
+
*/
|
|
147
|
+
position: "left" | "right";
|
|
148
|
+
/**
|
|
149
|
+
* 显示的文本,可以是html格式
|
|
150
|
+
*/
|
|
151
|
+
text: string | (() => string);
|
|
152
|
+
/**
|
|
153
|
+
* (可选)是否禁用hover的CSS样式
|
|
154
|
+
* @default false
|
|
155
|
+
*/
|
|
156
|
+
disableHoverCSS?: boolean | (() => boolean);
|
|
157
|
+
/**
|
|
158
|
+
* (可选)自定义元素属性.setAttribute、.getAttribute
|
|
159
|
+
* @default {}
|
|
160
|
+
*/
|
|
161
|
+
attributes?:
|
|
162
|
+
| {
|
|
163
|
+
[key: string]: any;
|
|
164
|
+
}
|
|
165
|
+
| {
|
|
166
|
+
[key: string]: any;
|
|
167
|
+
}[];
|
|
168
|
+
/**
|
|
169
|
+
* (可选)自定义元素内部的属性值
|
|
170
|
+
* @default {}
|
|
171
|
+
*/
|
|
172
|
+
props?:
|
|
173
|
+
| {
|
|
174
|
+
[K in keyof HTMLElement]?: HTMLElement[K];
|
|
175
|
+
}
|
|
176
|
+
| {
|
|
177
|
+
[key: string]: any;
|
|
178
|
+
};
|
|
179
|
+
/**
|
|
180
|
+
* 该项的点击回调
|
|
181
|
+
*/
|
|
182
|
+
clickCallback?: (
|
|
183
|
+
/**
|
|
184
|
+
* 点击事件
|
|
185
|
+
*/
|
|
186
|
+
event: MouseEvent | PointerEvent
|
|
187
|
+
) => void;
|
|
188
|
+
/**
|
|
189
|
+
* 该项添加到panel后的回调
|
|
190
|
+
*/
|
|
191
|
+
afterRender?: (
|
|
192
|
+
/**
|
|
193
|
+
* 配置
|
|
194
|
+
*/
|
|
195
|
+
config: {
|
|
196
|
+
/** panel底部区域 */
|
|
197
|
+
$bottomWrapper: HTMLElement;
|
|
198
|
+
/** panel底部区域容器 */
|
|
199
|
+
$bottomContainer: HTMLElement;
|
|
200
|
+
/** panel底部区域左侧容器 */
|
|
201
|
+
$bottomLeftContainer: HTMLElement;
|
|
202
|
+
/** panel底部区域右侧容器 */
|
|
203
|
+
$bottomRightContainer: HTMLElement;
|
|
204
|
+
}
|
|
205
|
+
) => void;
|
|
206
|
+
}
|
|
207
|
+
|
|
140
208
|
/**
|
|
141
209
|
* pops.panel
|
|
142
210
|
*/
|
|
@@ -145,6 +213,10 @@ export interface PopsPanelDetails extends PopsTitleConfig, PopsDragConfig, PopsC
|
|
|
145
213
|
* 内容配置
|
|
146
214
|
*/
|
|
147
215
|
content: PopsPanelContentConfig[];
|
|
216
|
+
/**
|
|
217
|
+
* 底部内容配置
|
|
218
|
+
*/
|
|
219
|
+
bottomContentConfig?: PopsPanelBottomContentConfig[];
|
|
148
220
|
/**
|
|
149
221
|
* 右上角的按钮配置
|
|
150
222
|
*/
|
|
@@ -93,13 +93,13 @@ export const PopsPrompt = {
|
|
|
93
93
|
const $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
|
|
94
94
|
|
|
95
95
|
const {
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
96
|
+
$pops: $pops,
|
|
97
|
+
$input: $input,
|
|
98
|
+
$headerBtnClose: $btnClose,
|
|
99
|
+
$btnOk: $btnOk,
|
|
100
|
+
$btnCancel: $btnCancel,
|
|
101
|
+
$btnOther: $btnOther,
|
|
102
|
+
$title: $title,
|
|
103
103
|
} = PopsHandler.handleQueryElement($anim, popsType);
|
|
104
104
|
/**
|
|
105
105
|
* 遮罩层元素
|
|
@@ -46,17 +46,11 @@ export const PopsSearchSuggestion = {
|
|
|
46
46
|
]);
|
|
47
47
|
|
|
48
48
|
if (config.style != null) {
|
|
49
|
-
const
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
type: "text/css",
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
$shadowRoot.appendChild(cssNode);
|
|
49
|
+
const $css = popsDOMUtils.createElement("style", {
|
|
50
|
+
type: "text/css",
|
|
51
|
+
innerHTML: config.style,
|
|
52
|
+
});
|
|
53
|
+
$shadowRoot.appendChild($css);
|
|
60
54
|
}
|
|
61
55
|
|
|
62
56
|
const SearchSuggestion = {
|