@whitesev/pops 1.9.0 → 1.9.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 +156 -77
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +156 -77
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +156 -77
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +156 -77
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +156 -77
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +156 -77
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +1 -0
- package/dist/types/src/components/alert/config.d.ts +1 -1
- package/dist/types/src/components/confirm/config.d.ts +1 -1
- package/dist/types/src/components/drawer/config.d.ts +1 -1
- package/dist/types/src/components/folder/config.d.ts +1 -1
- package/dist/types/src/components/iframe/config.d.ts +1 -1
- package/dist/types/src/components/loading/config.d.ts +1 -1
- package/dist/types/src/components/panel/config.d.ts +1 -1
- package/dist/types/src/components/prompt/config.d.ts +1 -1
- package/dist/types/src/components/rightClickMenu/config.d.ts +1 -1
- package/dist/types/src/components/searchSuggestion/config.d.ts +1 -1
- package/dist/types/src/components/tooltip/config.d.ts +1 -1
- package/dist/types/src/components/tooltip/index.d.ts +3 -3
- package/dist/types/src/components/tooltip/indexType.d.ts +27 -8
- package/dist/types/src/types/button.d.ts +13 -19
- package/dist/types/src/types/global.d.ts +9 -0
- package/dist/types/src/types/mask.d.ts +14 -11
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +2 -1
- package/package.json +1 -1
- package/src/Pops.ts +1 -1
- package/src/components/alert/config.ts +9 -9
- package/src/components/alert/index.ts +1 -2
- package/src/components/confirm/config.ts +17 -24
- package/src/components/confirm/index.ts +1 -1
- package/src/components/drawer/config.ts +21 -21
- package/src/components/drawer/index.ts +1 -2
- package/src/components/folder/config.ts +16 -16
- package/src/components/folder/index.ts +2 -1
- package/src/components/iframe/config.ts +2 -3
- package/src/components/iframe/index.ts +1 -1
- package/src/components/loading/config.ts +2 -3
- package/src/components/loading/index.ts +1 -1
- package/src/components/panel/config.ts +64 -2
- package/src/components/prompt/config.ts +16 -27
- package/src/components/prompt/index.ts +1 -1
- package/src/components/rightClickMenu/config.ts +116 -109
- package/src/components/rightClickMenu/index.ts +2 -2
- package/src/components/searchSuggestion/config.ts +1 -1
- package/src/components/searchSuggestion/index.ts +1 -2
- package/src/components/tooltip/config.ts +6 -5
- package/src/components/tooltip/index.ts +21 -9
- package/src/components/tooltip/indexType.ts +32 -12
- package/src/handler/PopsHandler.ts +5 -12
- package/src/types/button.d.ts +13 -19
- package/src/types/global.d.ts +9 -0
- package/src/types/mask.d.ts +14 -11
- package/src/utils/PopsInstanceUtils.ts +8 -8
package/dist/types/src/Pops.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsAlertDetails } from "./indexType";
|
|
2
|
-
export declare const PopsAlertConfig: () =>
|
|
2
|
+
export declare const PopsAlertConfig: () => DeepRequired<PopsAlertDetails>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsConfirmDetails } from "./indexType";
|
|
2
|
-
export declare const PopsConfirmConfig: () =>
|
|
2
|
+
export declare const PopsConfirmConfig: () => DeepRequired<PopsConfirmDetails>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsDrawerDetails } from "./indexType";
|
|
2
|
-
export declare const PopsDrawerConfig: () =>
|
|
2
|
+
export declare const PopsDrawerConfig: () => DeepRequired<PopsDrawerDetails>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsFolderDetails } from "./indexType";
|
|
2
|
-
export declare const PopsFolderConfig: () =>
|
|
2
|
+
export declare const PopsFolderConfig: () => DeepRequired<PopsFolderDetails>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsIframeDetails } from "./indexType";
|
|
2
|
-
export declare const PopsIframeConfig: () =>
|
|
2
|
+
export declare const PopsIframeConfig: () => DeepRequired<PopsIframeDetails>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsLoadingDetails } from "./indexType";
|
|
2
|
-
export declare const PopsLoadingConfig: () =>
|
|
2
|
+
export declare const PopsLoadingConfig: () => DeepRequired<PopsLoadingDetails>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsPanelDetails } from "./indexType";
|
|
2
|
-
export declare const PopsPanelConfig: () =>
|
|
2
|
+
export declare const PopsPanelConfig: () => DeepRequired<PopsPanelDetails>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsPromptDetails } from "./indexType";
|
|
2
|
-
export declare const PopsPromptConfig: () =>
|
|
2
|
+
export declare const PopsPromptConfig: () => DeepRequired<PopsPromptDetails>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsRightClickMenuDetails } from "./indexType";
|
|
2
|
-
export declare const rightClickMenuConfig: () =>
|
|
2
|
+
export declare const rightClickMenuConfig: () => DeepRequired<PopsRightClickMenuDetails>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsSearchSuggestionDetails } from "./indexType";
|
|
2
|
-
export declare const searchSuggestionConfig: () =>
|
|
2
|
+
export declare const searchSuggestionConfig: () => DeepRequired<PopsSearchSuggestionDetails>;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import type { PopsToolTipDetails } from "./indexType";
|
|
2
|
-
export declare const PopsTooltipConfig: () =>
|
|
2
|
+
export declare const PopsTooltipConfig: () => DeepRequired<PopsToolTipDetails>;
|
|
@@ -45,12 +45,12 @@ export declare class ToolTip {
|
|
|
45
45
|
*/
|
|
46
46
|
changeZIndex(): void;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
48
|
+
* 计算 提示框的位置
|
|
49
49
|
* @param targetElement 目标元素
|
|
50
50
|
* @param arrowDistance 箭头和目标元素的距离
|
|
51
51
|
* @param otherDistance 其它位置的偏移
|
|
52
52
|
*/
|
|
53
|
-
|
|
53
|
+
calcToolTipPosition(targetElement: HTMLElement, arrowDistance: number, otherDistance: number): {
|
|
54
54
|
TOP: {
|
|
55
55
|
left: number;
|
|
56
56
|
top: number;
|
|
@@ -154,7 +154,7 @@ export declare class ToolTip {
|
|
|
154
154
|
/**
|
|
155
155
|
* 鼠标|触摸离开事件
|
|
156
156
|
*/
|
|
157
|
-
toolTipMouseLeaveEvent(): void;
|
|
157
|
+
toolTipMouseLeaveEvent(event: MouseEvent | PointerEvent): void;
|
|
158
158
|
/**
|
|
159
159
|
* 监听鼠标|触摸离开事件
|
|
160
160
|
*/
|
|
@@ -13,12 +13,15 @@ export interface PopsToolTipDetails {
|
|
|
13
13
|
*/
|
|
14
14
|
content: string | (() => string);
|
|
15
15
|
/**
|
|
16
|
-
*
|
|
16
|
+
* 位置
|
|
17
|
+
* @default "top"
|
|
17
18
|
*/
|
|
18
19
|
position?: PopsTooltipPosition;
|
|
19
20
|
/**
|
|
20
|
-
* 自定义className
|
|
21
|
-
*
|
|
21
|
+
* 自定义className
|
|
22
|
+
*
|
|
23
|
+
* + github-tooltip github的样式
|
|
24
|
+
* @default ""
|
|
22
25
|
*/
|
|
23
26
|
className?: string;
|
|
24
27
|
/**
|
|
@@ -41,18 +44,22 @@ export interface PopsToolTipDetails {
|
|
|
41
44
|
delayCloseTime?: number;
|
|
42
45
|
/**
|
|
43
46
|
* 触发显示事件的名称,默认mouseenter touchstart,如果是多个事件,按空格分割
|
|
47
|
+
* @default "mouseenter touchstart"
|
|
44
48
|
*/
|
|
45
49
|
triggerShowEventName?: string;
|
|
46
50
|
/**
|
|
47
51
|
* 触发关闭事件的名称,默认mouseleave touchend,如果是多个事件,按空格分割
|
|
52
|
+
* @default "mouseleave touchend"
|
|
48
53
|
*/
|
|
49
54
|
triggerCloseEventName?: string;
|
|
50
55
|
/**
|
|
51
|
-
* z-index
|
|
56
|
+
* z-index
|
|
57
|
+
* @default 10000
|
|
52
58
|
*/
|
|
53
59
|
zIndex?: number | (() => number);
|
|
54
60
|
/**
|
|
55
|
-
*
|
|
61
|
+
* 是否唯一
|
|
62
|
+
* @default false
|
|
56
63
|
*/
|
|
57
64
|
only?: boolean;
|
|
58
65
|
/**
|
|
@@ -71,22 +78,34 @@ export interface PopsToolTipDetails {
|
|
|
71
78
|
showAfterCallBack?: ($toolTip: HTMLElement) => void;
|
|
72
79
|
/**
|
|
73
80
|
* 触发关闭前的回调
|
|
81
|
+
*/
|
|
82
|
+
closeBeforeCallBack?: (
|
|
83
|
+
/**
|
|
84
|
+
*
|
|
74
85
|
* @returns
|
|
75
86
|
* + false 可阻止关闭
|
|
76
87
|
*/
|
|
77
|
-
|
|
88
|
+
$toolTip: HTMLElement) => false | void;
|
|
78
89
|
/**
|
|
79
90
|
* 触发关闭后的回调
|
|
80
91
|
*/
|
|
81
92
|
closeAfterCallBack?: ($toolTip: HTMLElement) => void;
|
|
82
93
|
/**
|
|
83
|
-
*
|
|
94
|
+
* 是否显示箭头
|
|
95
|
+
* @default true
|
|
96
|
+
*/
|
|
97
|
+
showArrow?: boolean;
|
|
98
|
+
/**
|
|
99
|
+
* 箭头与目标的的距离(px)
|
|
100
|
+
*
|
|
101
|
+
* @default 12.5
|
|
84
102
|
*/
|
|
85
103
|
arrowDistance?: number;
|
|
86
104
|
/**
|
|
87
|
-
*
|
|
105
|
+
* 其它的距离(px)
|
|
88
106
|
* + 当position为left或者right,这个距离是上、下距离
|
|
89
107
|
* + 当position为top或者bottom,这个距离是左、右距离
|
|
108
|
+
* @default 0
|
|
90
109
|
*/
|
|
91
110
|
otherDistance?: number;
|
|
92
111
|
/**
|
|
@@ -85,15 +85,18 @@ export interface PopsButtonDetails<T = {}> {
|
|
|
85
85
|
*/
|
|
86
86
|
rightIcon: boolean;
|
|
87
87
|
/**
|
|
88
|
-
* 图标按钮是否是旋转360
|
|
88
|
+
* 图标按钮是否是旋转360°
|
|
89
|
+
* @default false
|
|
89
90
|
*/
|
|
90
91
|
iconIsLoading: boolean;
|
|
91
92
|
/**
|
|
92
|
-
*
|
|
93
|
+
* 按钮尺寸大小
|
|
94
|
+
* @default ""
|
|
93
95
|
*/
|
|
94
|
-
size: PopsButtonSize;
|
|
96
|
+
size: PopsButtonSize | "";
|
|
95
97
|
/**
|
|
96
|
-
*
|
|
98
|
+
* 按钮样式类型
|
|
99
|
+
* @default "default"
|
|
97
100
|
*/
|
|
98
101
|
type: PopsButtonStyleType;
|
|
99
102
|
/**
|
|
@@ -126,11 +129,13 @@ export interface PopsButtonDetailsAnyType<T = {}> {
|
|
|
126
129
|
*/
|
|
127
130
|
rightIcon: boolean;
|
|
128
131
|
/**
|
|
129
|
-
* 图标按钮是否是旋转360
|
|
132
|
+
* 图标按钮是否是旋转360°
|
|
133
|
+
* @default false
|
|
130
134
|
*/
|
|
131
135
|
iconIsLoading: boolean;
|
|
132
136
|
/**
|
|
133
|
-
*
|
|
137
|
+
* 按钮尺寸大小
|
|
138
|
+
* @default ""
|
|
134
139
|
*/
|
|
135
140
|
size: PopsButtonSize;
|
|
136
141
|
/**
|
|
@@ -138,7 +143,8 @@ export interface PopsButtonDetailsAnyType<T = {}> {
|
|
|
138
143
|
*/
|
|
139
144
|
type: string;
|
|
140
145
|
/**
|
|
141
|
-
*
|
|
146
|
+
* 按钮文字
|
|
147
|
+
* @default ""
|
|
142
148
|
*/
|
|
143
149
|
text: string;
|
|
144
150
|
/**
|
|
@@ -204,18 +210,6 @@ export interface PopsHeaderCloseButtonDetails {
|
|
|
204
210
|
* 是否启用按钮
|
|
205
211
|
*/
|
|
206
212
|
enable?: boolean;
|
|
207
|
-
/**
|
|
208
|
-
* 按钮尺寸大小,默认为空
|
|
209
|
-
*/
|
|
210
|
-
size?: PopsButtonSize;
|
|
211
|
-
/**
|
|
212
|
-
* 按钮样式类型,默认为default
|
|
213
|
-
*/
|
|
214
|
-
type?: PopsButtonStyleType;
|
|
215
|
-
/**
|
|
216
|
-
* 按钮文字,默认为空
|
|
217
|
-
*/
|
|
218
|
-
text?: string;
|
|
219
213
|
/**
|
|
220
214
|
* 按钮点击的回调
|
|
221
215
|
*/
|
|
@@ -24,15 +24,18 @@ export interface PopsMaskDetails {
|
|
|
24
24
|
* @param originalRun 当toClose为true,它是关闭弹窗,当toHide为true,它是隐藏弹窗
|
|
25
25
|
* @param config 配置信息
|
|
26
26
|
*/
|
|
27
|
-
clickCallBack?:
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
27
|
+
clickCallBack?:
|
|
28
|
+
| ((
|
|
29
|
+
originalRun: () => void,
|
|
30
|
+
config:
|
|
31
|
+
| PopsAlertDetails
|
|
32
|
+
| PopsDrawerDetails
|
|
33
|
+
| PopsIframeDetails
|
|
34
|
+
| PopsPromptDetails
|
|
35
|
+
| PopsFolderDetails
|
|
36
|
+
| PopsLoadingDetails
|
|
37
|
+
| PopsPanelDetails
|
|
38
|
+
) => void)
|
|
39
|
+
| undefined
|
|
40
|
+
| null;
|
|
38
41
|
}
|
|
@@ -32,12 +32,13 @@ export declare const PopsInstanceUtils: {
|
|
|
32
32
|
getPopsMaxZIndex(deviation?: number): {
|
|
33
33
|
zIndex: number;
|
|
34
34
|
animElement: HTMLDivElement | null;
|
|
35
|
+
isOverMaxZIndex: boolean;
|
|
35
36
|
};
|
|
36
37
|
/**
|
|
37
38
|
* 获取页面中最大的z-index
|
|
38
39
|
* @param deviation 获取最大的z-index值的偏移,默认是+1
|
|
39
40
|
* @example
|
|
40
|
-
*
|
|
41
|
+
* getMaxZIndex();
|
|
41
42
|
* > 1001
|
|
42
43
|
**/
|
|
43
44
|
getMaxZIndex(deviation?: number): number;
|
package/package.json
CHANGED
package/src/Pops.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PopsAlertDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsAlertConfig = ():
|
|
3
|
+
export const PopsAlertConfig = (): DeepRequired<PopsAlertDetails> => {
|
|
4
4
|
return {
|
|
5
5
|
title: {
|
|
6
6
|
text: "默认标题",
|
|
@@ -16,21 +16,21 @@ export const PopsAlertConfig = (): Required<PopsAlertDetails> => {
|
|
|
16
16
|
btn: {
|
|
17
17
|
position: "flex-end",
|
|
18
18
|
ok: {
|
|
19
|
-
size: void 0,
|
|
19
|
+
size: void 0 as any,
|
|
20
20
|
enable: true,
|
|
21
|
-
icon: void 0,
|
|
21
|
+
icon: void 0 as any,
|
|
22
22
|
rightIcon: false,
|
|
23
23
|
iconIsLoading: false,
|
|
24
24
|
text: "确定",
|
|
25
25
|
type: "primary",
|
|
26
|
-
callback: function (
|
|
27
|
-
|
|
26
|
+
callback: function (details: any) {
|
|
27
|
+
details.close();
|
|
28
28
|
},
|
|
29
29
|
},
|
|
30
30
|
close: {
|
|
31
31
|
enable: true,
|
|
32
|
-
callback: function (
|
|
33
|
-
|
|
32
|
+
callback: function (details: any) {
|
|
33
|
+
details.close();
|
|
34
34
|
},
|
|
35
35
|
},
|
|
36
36
|
},
|
|
@@ -47,7 +47,7 @@ export const PopsAlertConfig = (): Required<PopsAlertDetails> => {
|
|
|
47
47
|
toClose: false,
|
|
48
48
|
toHide: false,
|
|
49
49
|
},
|
|
50
|
-
clickCallBack:
|
|
50
|
+
clickCallBack: null,
|
|
51
51
|
},
|
|
52
52
|
drag: false,
|
|
53
53
|
dragLimit: true,
|
|
@@ -57,5 +57,5 @@ export const PopsAlertConfig = (): Required<PopsAlertDetails> => {
|
|
|
57
57
|
forbiddenScroll: false,
|
|
58
58
|
style: null,
|
|
59
59
|
beforeAppendToPageCallBack() {},
|
|
60
|
-
}
|
|
60
|
+
} as DeepRequired<PopsAlertDetails>;
|
|
61
61
|
};
|
|
@@ -21,8 +21,7 @@ export class PopsAlert {
|
|
|
21
21
|
pops.config.cssText.common,
|
|
22
22
|
pops.config.cssText.alertCSS,
|
|
23
23
|
]);
|
|
24
|
-
|
|
25
|
-
let config: Required<PopsAlertDetails> = PopsAlertConfig();
|
|
24
|
+
let config = PopsAlertConfig();
|
|
26
25
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
27
26
|
config = popsUtils.assign(config, details);
|
|
28
27
|
let guid = popsUtils.getRandomGUID();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PopsConfirmDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsConfirmConfig = ():
|
|
3
|
+
export const PopsConfirmConfig = (): DeepRequired<PopsConfirmDetails> => {
|
|
4
4
|
return {
|
|
5
5
|
title: {
|
|
6
6
|
text: "默认标题",
|
|
@@ -20,50 +20,44 @@ export const PopsConfirmConfig = (): Required<PopsConfirmDetails> => {
|
|
|
20
20
|
position: "flex-end",
|
|
21
21
|
ok: {
|
|
22
22
|
enable: true,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
icon: void 0,
|
|
23
|
+
size: void 0 as any,
|
|
24
|
+
icon: void 0 as any,
|
|
27
25
|
rightIcon: false,
|
|
28
26
|
iconIsLoading: false,
|
|
29
27
|
text: "确定",
|
|
30
28
|
type: "primary",
|
|
31
|
-
callback(
|
|
32
|
-
|
|
29
|
+
callback(detail: any) {
|
|
30
|
+
detail.close();
|
|
33
31
|
},
|
|
34
32
|
},
|
|
35
33
|
cancel: {
|
|
36
34
|
enable: true,
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
icon: void 0,
|
|
35
|
+
size: void 0 as any,
|
|
36
|
+
icon: void 0 as any,
|
|
41
37
|
rightIcon: false,
|
|
42
38
|
iconIsLoading: false,
|
|
43
39
|
text: "关闭",
|
|
44
40
|
type: "default",
|
|
45
|
-
callback(
|
|
46
|
-
|
|
41
|
+
callback(detail: any) {
|
|
42
|
+
detail.close();
|
|
47
43
|
},
|
|
48
44
|
},
|
|
49
45
|
other: {
|
|
50
46
|
enable: false,
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
icon: void 0,
|
|
47
|
+
size: void 0 as any,
|
|
48
|
+
icon: void 0 as any,
|
|
55
49
|
rightIcon: false,
|
|
56
50
|
iconIsLoading: false,
|
|
57
51
|
text: "其它按钮",
|
|
58
52
|
type: "default",
|
|
59
|
-
callback(
|
|
60
|
-
|
|
53
|
+
callback(detail: any) {
|
|
54
|
+
detail.close();
|
|
61
55
|
},
|
|
62
56
|
},
|
|
63
57
|
close: {
|
|
64
58
|
enable: true,
|
|
65
|
-
callback(
|
|
66
|
-
|
|
59
|
+
callback(detail: any) {
|
|
60
|
+
detail.close();
|
|
67
61
|
},
|
|
68
62
|
},
|
|
69
63
|
},
|
|
@@ -80,8 +74,7 @@ export const PopsConfirmConfig = (): Required<PopsConfirmDetails> => {
|
|
|
80
74
|
toClose: false,
|
|
81
75
|
toHide: false,
|
|
82
76
|
},
|
|
83
|
-
|
|
84
|
-
clickCallBack: void 0,
|
|
77
|
+
clickCallBack: null,
|
|
85
78
|
},
|
|
86
79
|
drag: false,
|
|
87
80
|
dragLimit: true,
|
|
@@ -92,5 +85,5 @@ export const PopsConfirmConfig = (): Required<PopsConfirmDetails> => {
|
|
|
92
85
|
|
|
93
86
|
style: null,
|
|
94
87
|
beforeAppendToPageCallBack() {},
|
|
95
|
-
}
|
|
88
|
+
} as DeepRequired<PopsConfirmDetails>;
|
|
96
89
|
};
|
|
@@ -20,7 +20,7 @@ export class PopsConfirm {
|
|
|
20
20
|
pops.config.cssText.common,
|
|
21
21
|
pops.config.cssText.confirmCSS,
|
|
22
22
|
]);
|
|
23
|
-
let config
|
|
23
|
+
let config = PopsConfirmConfig();
|
|
24
24
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
25
25
|
config = popsUtils.assign(config, details);
|
|
26
26
|
let guid = popsUtils.getRandomGUID();
|
|
@@ -1,63 +1,64 @@
|
|
|
1
1
|
import type { PopsDrawerDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsDrawerConfig = ():
|
|
3
|
+
export const PopsDrawerConfig = (): DeepRequired<PopsDrawerDetails> => {
|
|
4
4
|
return {
|
|
5
5
|
title: {
|
|
6
6
|
enable: true,
|
|
7
7
|
position: "center",
|
|
8
8
|
text: "默认标题",
|
|
9
9
|
html: false,
|
|
10
|
+
style: "",
|
|
10
11
|
},
|
|
11
12
|
content: {
|
|
12
13
|
text: "默认内容",
|
|
13
14
|
html: false,
|
|
15
|
+
style: "",
|
|
14
16
|
},
|
|
15
17
|
btn: {
|
|
18
|
+
merge: false,
|
|
19
|
+
mergeReverse: false,
|
|
20
|
+
reverse: false,
|
|
16
21
|
position: "flex-end",
|
|
17
22
|
ok: {
|
|
18
23
|
enable: true,
|
|
19
|
-
size: void 0,
|
|
20
|
-
icon: void 0,
|
|
24
|
+
size: void 0 as any,
|
|
25
|
+
icon: void 0 as any,
|
|
21
26
|
rightIcon: false,
|
|
22
27
|
iconIsLoading: false,
|
|
23
28
|
text: "确定",
|
|
24
29
|
type: "primary",
|
|
25
|
-
callback(
|
|
26
|
-
|
|
30
|
+
callback(detail: any) {
|
|
31
|
+
detail.close();
|
|
27
32
|
},
|
|
28
33
|
},
|
|
29
34
|
cancel: {
|
|
30
35
|
enable: true,
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
icon: void 0,
|
|
36
|
+
size: void 0 as any,
|
|
37
|
+
icon: void 0 as any,
|
|
35
38
|
rightIcon: false,
|
|
36
39
|
iconIsLoading: false,
|
|
37
40
|
text: "关闭",
|
|
38
41
|
type: "default",
|
|
39
|
-
callback(
|
|
40
|
-
|
|
42
|
+
callback(detail: any) {
|
|
43
|
+
detail.close();
|
|
41
44
|
},
|
|
42
45
|
},
|
|
43
46
|
other: {
|
|
44
47
|
enable: false,
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
icon: void 0,
|
|
48
|
+
size: void 0 as any,
|
|
49
|
+
icon: void 0 as any,
|
|
49
50
|
rightIcon: false,
|
|
50
51
|
iconIsLoading: false,
|
|
51
52
|
text: "其它按钮",
|
|
52
53
|
type: "default",
|
|
53
|
-
callback(
|
|
54
|
-
|
|
54
|
+
callback(detail: any) {
|
|
55
|
+
detail.close();
|
|
55
56
|
},
|
|
56
57
|
},
|
|
57
58
|
close: {
|
|
58
59
|
enable: true,
|
|
59
|
-
callback(
|
|
60
|
-
|
|
60
|
+
callback(detail: any) {
|
|
61
|
+
detail.close();
|
|
61
62
|
},
|
|
62
63
|
},
|
|
63
64
|
},
|
|
@@ -67,8 +68,7 @@ export const PopsDrawerConfig = (): Required<PopsDrawerDetails> => {
|
|
|
67
68
|
toClose: true,
|
|
68
69
|
toHide: false,
|
|
69
70
|
},
|
|
70
|
-
|
|
71
|
-
clickCallBack: void 0,
|
|
71
|
+
clickCallBack: null,
|
|
72
72
|
},
|
|
73
73
|
class: "",
|
|
74
74
|
zIndex: 10000,
|
|
@@ -19,8 +19,7 @@ export class PopsDrawer {
|
|
|
19
19
|
pops.config.cssText.common,
|
|
20
20
|
pops.config.cssText.drawerCSS,
|
|
21
21
|
]);
|
|
22
|
-
|
|
23
|
-
let config: Required<PopsDrawerDetails> = PopsDrawerConfig();
|
|
22
|
+
let config = PopsDrawerConfig();
|
|
24
23
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
25
24
|
config = popsUtils.assign(config, details);
|
|
26
25
|
let guid = popsUtils.getRandomGUID();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { PopsFolderDetails } from "./indexType";
|
|
2
2
|
|
|
3
|
-
export const PopsFolderConfig = ():
|
|
3
|
+
export const PopsFolderConfig = (): DeepRequired<PopsFolderDetails> => {
|
|
4
4
|
return {
|
|
5
5
|
title: {
|
|
6
6
|
text: "pops.Folder",
|
|
@@ -64,44 +64,44 @@ export const PopsFolderConfig = (): Required<PopsFolderDetails> => {
|
|
|
64
64
|
position: "flex-end",
|
|
65
65
|
ok: {
|
|
66
66
|
enable: true,
|
|
67
|
-
size: void 0,
|
|
68
|
-
icon: void 0,
|
|
67
|
+
size: void 0 as any,
|
|
68
|
+
icon: void 0 as any,
|
|
69
69
|
rightIcon: false,
|
|
70
70
|
iconIsLoading: false,
|
|
71
71
|
text: "确定",
|
|
72
72
|
type: "primary",
|
|
73
|
-
callback(
|
|
74
|
-
|
|
73
|
+
callback(detail: any) {
|
|
74
|
+
detail.close();
|
|
75
75
|
},
|
|
76
76
|
},
|
|
77
77
|
cancel: {
|
|
78
78
|
enable: true,
|
|
79
|
-
size: void 0,
|
|
80
|
-
icon: void 0,
|
|
79
|
+
size: void 0 as any,
|
|
80
|
+
icon: void 0 as any,
|
|
81
81
|
rightIcon: false,
|
|
82
82
|
iconIsLoading: false,
|
|
83
83
|
text: "关闭",
|
|
84
84
|
type: "default",
|
|
85
|
-
callback(
|
|
86
|
-
|
|
85
|
+
callback(detail: any) {
|
|
86
|
+
detail.close();
|
|
87
87
|
},
|
|
88
88
|
},
|
|
89
89
|
other: {
|
|
90
90
|
enable: false,
|
|
91
|
-
size: void 0,
|
|
92
|
-
icon: void 0,
|
|
91
|
+
size: void 0 as any,
|
|
92
|
+
icon: void 0 as any,
|
|
93
93
|
rightIcon: false,
|
|
94
94
|
iconIsLoading: false,
|
|
95
95
|
text: "其它按钮",
|
|
96
96
|
type: "default",
|
|
97
|
-
callback(
|
|
98
|
-
|
|
97
|
+
callback(detail: any) {
|
|
98
|
+
detail.close();
|
|
99
99
|
},
|
|
100
100
|
},
|
|
101
101
|
close: {
|
|
102
102
|
enable: true,
|
|
103
|
-
callback(
|
|
104
|
-
|
|
103
|
+
callback(detail: any) {
|
|
104
|
+
detail.close();
|
|
105
105
|
},
|
|
106
106
|
},
|
|
107
107
|
},
|
|
@@ -118,7 +118,7 @@ export const PopsFolderConfig = (): Required<PopsFolderDetails> => {
|
|
|
118
118
|
toClose: false,
|
|
119
119
|
toHide: false,
|
|
120
120
|
},
|
|
121
|
-
clickCallBack:
|
|
121
|
+
clickCallBack: null,
|
|
122
122
|
},
|
|
123
123
|
drag: false,
|
|
124
124
|
dragLimit: true,
|