@whitesev/pops 2.2.4 → 2.2.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.amd.js +214 -146
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +214 -146
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +214 -146
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +214 -146
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +214 -146
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +214 -146
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/components/panel/types/components-selectMultiple.d.ts +1 -1
- package/dist/types/src/handler/PopsElementHandler.d.ts +11 -11
- package/package.json +1 -1
- package/src/Pops.ts +1 -1
- package/src/components/alert/index.ts +6 -6
- package/src/components/confirm/index.ts +6 -6
- package/src/components/drawer/index.ts +6 -6
- package/src/components/folder/index.ts +5 -5
- package/src/components/iframe/index.css +1 -1
- package/src/components/iframe/index.ts +4 -4
- package/src/components/loading/index.ts +3 -3
- package/src/components/panel/config.ts +17 -1
- package/src/components/panel/handlerComponents.ts +160 -39
- package/src/components/panel/index.css +79 -23
- package/src/components/panel/index.ts +4 -4
- package/src/components/panel/types/components-selectMultiple.ts +1 -1
- package/src/components/prompt/index.ts +6 -6
- package/src/css/animation.css +5 -22
- package/src/css/button.css +35 -39
- package/src/css/index.css +10 -11
- package/src/handler/PopsElementHandler.ts +72 -67
- package/src/handler/PopsHandler.ts +4 -4
|
@@ -6,7 +6,7 @@ export declare const PopsElementHandler: {
|
|
|
6
6
|
* @param zIndex z-index
|
|
7
7
|
* @param style
|
|
8
8
|
*/
|
|
9
|
-
|
|
9
|
+
createMask(guid: string, zIndex?: number, style?: string): string;
|
|
10
10
|
/**
|
|
11
11
|
* 获取动画层HTML
|
|
12
12
|
* @param guid
|
|
@@ -16,34 +16,34 @@ export declare const PopsElementHandler: {
|
|
|
16
16
|
* @param bottomBtnHTML
|
|
17
17
|
* @param zIndex
|
|
18
18
|
*/
|
|
19
|
-
|
|
19
|
+
createAnim(guid: string, type: PopsSupportAnimDetailsType, config: PopsSupportAnimDetails[keyof PopsSupportAnimDetails], html: string | undefined, bottomBtnHTML: string | undefined, zIndex: number): string;
|
|
20
20
|
/**
|
|
21
21
|
* 获取顶部按钮层HTML
|
|
22
22
|
* @param type
|
|
23
23
|
* @param config
|
|
24
24
|
*/
|
|
25
|
-
|
|
26
|
-
/**
|
|
27
|
-
* 获取底部按钮层HTML
|
|
28
|
-
* @param type
|
|
29
|
-
* @param config
|
|
30
|
-
*/
|
|
31
|
-
getBottomBtnHTML(type: PopsSupportBottomBtnDetailsType, config: Omit<PopsSupportBottomBtnDetails[keyof PopsSupportBottomBtnDetails], "content">): string;
|
|
25
|
+
createHeader(type: PopsSupportHeaderTitleDetailsType, config: PopsSupportHeaderTitleDetails[keyof PopsSupportHeaderTitleDetails]): string;
|
|
32
26
|
/**
|
|
33
27
|
* 获取标题style
|
|
34
28
|
* @param type 弹窗类型
|
|
35
29
|
* @param config 弹窗配置
|
|
36
30
|
*/
|
|
37
|
-
|
|
31
|
+
createHeaderStyle(type: PopsSupportHeaderTitleDetailsType, config: PopsSupportHeaderTitleDetails[keyof PopsSupportHeaderTitleDetails]): {
|
|
38
32
|
headerStyle: string;
|
|
39
33
|
headerPStyle: string;
|
|
40
34
|
};
|
|
35
|
+
/**
|
|
36
|
+
* 获取底部按钮层HTML
|
|
37
|
+
* @param type
|
|
38
|
+
* @param config
|
|
39
|
+
*/
|
|
40
|
+
createBottom(type: PopsSupportBottomBtnDetailsType, config: Omit<PopsSupportBottomBtnDetails[keyof PopsSupportBottomBtnDetails], "content">): string;
|
|
41
41
|
/**
|
|
42
42
|
* 获取内容style
|
|
43
43
|
* @param type 弹窗类型
|
|
44
44
|
* @param config 弹窗配置
|
|
45
45
|
*/
|
|
46
|
-
|
|
46
|
+
createContentStyle(type: PopsSupportContentDetailsType, config: PopsSupportContentDetails[keyof PopsSupportContentDetails]): {
|
|
47
47
|
contentStyle: string;
|
|
48
48
|
contentPStyle: string;
|
|
49
49
|
};
|
package/package.json
CHANGED
package/src/Pops.ts
CHANGED
|
@@ -53,18 +53,18 @@ export const PopsAlert = {
|
|
|
53
53
|
|
|
54
54
|
// 先把z-index提取出来
|
|
55
55
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
56
|
-
let maskHTML = PopsElementHandler.
|
|
57
|
-
let headerBtnHTML = PopsElementHandler.
|
|
58
|
-
let bottomBtnHTML = PopsElementHandler.
|
|
59
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.
|
|
56
|
+
let maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
57
|
+
let headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
58
|
+
let bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
59
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(
|
|
60
60
|
popsType,
|
|
61
61
|
config
|
|
62
62
|
);
|
|
63
|
-
let { contentStyle, contentPStyle } = PopsElementHandler.
|
|
63
|
+
let { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(
|
|
64
64
|
popsType,
|
|
65
65
|
config
|
|
66
66
|
);
|
|
67
|
-
let animHTML = PopsElementHandler.
|
|
67
|
+
let animHTML = PopsElementHandler.createAnim(
|
|
68
68
|
guid,
|
|
69
69
|
popsType,
|
|
70
70
|
config,
|
|
@@ -53,19 +53,19 @@ export const PopsConfirm = {
|
|
|
53
53
|
|
|
54
54
|
// 先把z-index提取出来
|
|
55
55
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
56
|
-
let maskHTML = PopsElementHandler.
|
|
56
|
+
let maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
57
57
|
|
|
58
|
-
let headerBtnHTML = PopsElementHandler.
|
|
59
|
-
let bottomBtnHTML = PopsElementHandler.
|
|
60
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.
|
|
58
|
+
let headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
59
|
+
let bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
60
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(
|
|
61
61
|
popsType,
|
|
62
62
|
config
|
|
63
63
|
);
|
|
64
|
-
let { contentStyle, contentPStyle } = PopsElementHandler.
|
|
64
|
+
let { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(
|
|
65
65
|
popsType,
|
|
66
66
|
config
|
|
67
67
|
);
|
|
68
|
-
let animHTML = PopsElementHandler.
|
|
68
|
+
let animHTML = PopsElementHandler.createAnim(
|
|
69
69
|
guid,
|
|
70
70
|
popsType,
|
|
71
71
|
config,
|
|
@@ -52,19 +52,19 @@ export const PopsDrawer = {
|
|
|
52
52
|
|
|
53
53
|
// 先把z-index提取出来
|
|
54
54
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
55
|
-
let maskHTML = PopsElementHandler.
|
|
55
|
+
let maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
56
56
|
|
|
57
|
-
let headerBtnHTML = PopsElementHandler.
|
|
58
|
-
let bottomBtnHTML = PopsElementHandler.
|
|
59
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.
|
|
57
|
+
let headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
58
|
+
let bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
59
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(
|
|
60
60
|
popsType,
|
|
61
61
|
config
|
|
62
62
|
);
|
|
63
|
-
let { contentStyle, contentPStyle } = PopsElementHandler.
|
|
63
|
+
let { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(
|
|
64
64
|
popsType,
|
|
65
65
|
config
|
|
66
66
|
);
|
|
67
|
-
let animHTML = PopsElementHandler.
|
|
67
|
+
let animHTML = PopsElementHandler.createAnim(
|
|
68
68
|
guid,
|
|
69
69
|
popsType,
|
|
70
70
|
config,
|
|
@@ -127,15 +127,15 @@ export const PopsFolder = {
|
|
|
127
127
|
|
|
128
128
|
// 先把z-index提取出来
|
|
129
129
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
130
|
-
let maskHTML = PopsElementHandler.
|
|
130
|
+
let maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
131
131
|
|
|
132
|
-
let headerBtnHTML = PopsElementHandler.
|
|
133
|
-
let bottomBtnHTML = PopsElementHandler.
|
|
134
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.
|
|
132
|
+
let headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
133
|
+
let bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
134
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(
|
|
135
135
|
popsType,
|
|
136
136
|
config
|
|
137
137
|
);
|
|
138
|
-
let animHTML = PopsElementHandler.
|
|
138
|
+
let animHTML = PopsElementHandler.createAnim(
|
|
139
139
|
guid,
|
|
140
140
|
popsType,
|
|
141
141
|
config,
|
|
@@ -62,17 +62,17 @@ export const PopsIframe = {
|
|
|
62
62
|
|
|
63
63
|
// 先把z-index提取出来
|
|
64
64
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
65
|
-
let maskHTML = PopsElementHandler.
|
|
65
|
+
let maskHTML = PopsElementHandler.createMask(guid, zIndex, maskExtraStyle);
|
|
66
66
|
|
|
67
|
-
let headerBtnHTML = PopsElementHandler.
|
|
67
|
+
let headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
68
68
|
let iframeLoadingHTML = '<div class="pops-loading"></div>';
|
|
69
69
|
let titleText =
|
|
70
70
|
config.title!.text!.trim() !== "" ? config.title.text : config.url;
|
|
71
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.
|
|
71
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(
|
|
72
72
|
popsType,
|
|
73
73
|
config
|
|
74
74
|
);
|
|
75
|
-
let animHTML = PopsElementHandler.
|
|
75
|
+
let animHTML = PopsElementHandler.createAnim(
|
|
76
76
|
guid,
|
|
77
77
|
popsType,
|
|
78
78
|
config,
|
|
@@ -19,13 +19,13 @@ export const PopsLoading = {
|
|
|
19
19
|
|
|
20
20
|
// 先把z-index提取出来
|
|
21
21
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
22
|
-
let maskHTML = PopsElementHandler.
|
|
22
|
+
let maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
23
23
|
|
|
24
|
-
let { contentPStyle } = PopsElementHandler.
|
|
24
|
+
let { contentPStyle } = PopsElementHandler.createContentStyle(
|
|
25
25
|
"loading",
|
|
26
26
|
config
|
|
27
27
|
);
|
|
28
|
-
let animHTML = PopsElementHandler.
|
|
28
|
+
let animHTML = PopsElementHandler.createAnim(
|
|
29
29
|
guid,
|
|
30
30
|
PopsType,
|
|
31
31
|
config,
|
|
@@ -34,7 +34,6 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
34
34
|
type: "switch",
|
|
35
35
|
// @ts-ignore
|
|
36
36
|
props: {},
|
|
37
|
-
disabled: false,
|
|
38
37
|
attributes: [],
|
|
39
38
|
getValue() {
|
|
40
39
|
return true;
|
|
@@ -59,6 +58,21 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
59
58
|
min: 1,
|
|
60
59
|
max: 100,
|
|
61
60
|
},
|
|
61
|
+
{
|
|
62
|
+
className: "panel-button",
|
|
63
|
+
text: "button",
|
|
64
|
+
type: "button",
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
props: {},
|
|
67
|
+
attributes: [],
|
|
68
|
+
buttonIcon: "view",
|
|
69
|
+
buttonIconIsLoading: true,
|
|
70
|
+
buttonType: "default",
|
|
71
|
+
buttonText: "default按钮",
|
|
72
|
+
callback(event) {
|
|
73
|
+
console.log("点击按钮", event);
|
|
74
|
+
},
|
|
75
|
+
},
|
|
62
76
|
{
|
|
63
77
|
className: "panel-button",
|
|
64
78
|
text: "button",
|
|
@@ -173,6 +187,7 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
173
187
|
className: "panel-select",
|
|
174
188
|
text: "select",
|
|
175
189
|
type: "select",
|
|
190
|
+
disabled: true,
|
|
176
191
|
// @ts-ignore
|
|
177
192
|
props: {},
|
|
178
193
|
attributes: [],
|
|
@@ -215,6 +230,7 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
215
230
|
className: "panel-select-multiple",
|
|
216
231
|
type: "select-multiple",
|
|
217
232
|
text: "select-multiple",
|
|
233
|
+
disabled: true,
|
|
218
234
|
// @ts-ignore
|
|
219
235
|
props: {},
|
|
220
236
|
|