@whitesev/pops 3.2.1 → 3.3.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.
Files changed (127) hide show
  1. package/README.md +249 -249
  2. package/dist/index.amd.js +736 -948
  3. package/dist/index.amd.js.map +1 -1
  4. package/dist/index.amd.min.js +1 -1
  5. package/dist/index.amd.min.js.map +1 -1
  6. package/dist/index.cjs.js +736 -948
  7. package/dist/index.cjs.js.map +1 -1
  8. package/dist/index.cjs.min.js +1 -1
  9. package/dist/index.cjs.min.js.map +1 -1
  10. package/dist/index.esm.js +736 -948
  11. package/dist/index.esm.js.map +1 -1
  12. package/dist/index.esm.min.js +1 -1
  13. package/dist/index.esm.min.js.map +1 -1
  14. package/dist/index.iife.js +736 -948
  15. package/dist/index.iife.js.map +1 -1
  16. package/dist/index.iife.min.js +1 -1
  17. package/dist/index.iife.min.js.map +1 -1
  18. package/dist/index.system.js +736 -948
  19. package/dist/index.system.js.map +1 -1
  20. package/dist/index.system.min.js +1 -1
  21. package/dist/index.system.min.js.map +1 -1
  22. package/dist/index.umd.js +736 -948
  23. package/dist/index.umd.js.map +1 -1
  24. package/dist/index.umd.min.js +1 -1
  25. package/dist/index.umd.min.js.map +1 -1
  26. package/dist/types/src/PopsCore.d.ts +15 -7
  27. package/dist/types/src/components/folder/types/index.d.ts +43 -13
  28. package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +313 -313
  29. package/dist/types/src/types/animation.d.ts +19 -19
  30. package/dist/types/src/types/button.d.ts +94 -94
  31. package/dist/types/src/types/components.d.ts +211 -211
  32. package/dist/types/src/types/event.d.ts +43 -43
  33. package/dist/types/src/types/global.d.ts +31 -31
  34. package/dist/types/src/types/icon.d.ts +32 -32
  35. package/dist/types/src/types/inst.d.ts +28 -28
  36. package/dist/types/src/types/main.d.ts +66 -66
  37. package/dist/types/src/types/mask.d.ts +52 -52
  38. package/dist/types/src/types/position.d.ts +60 -60
  39. package/package.json +28 -27
  40. package/src/Pops.ts +206 -206
  41. package/src/PopsAnimation.ts +32 -32
  42. package/src/PopsCSS.ts +54 -54
  43. package/src/PopsCore.ts +53 -37
  44. package/src/PopsIcon.ts +95 -95
  45. package/src/PopsInst.ts +21 -21
  46. package/src/components/alert/defaultConfig.ts +62 -62
  47. package/src/components/alert/index.ts +163 -163
  48. package/src/components/alert/types/index.ts +23 -23
  49. package/src/components/confirm/defaultConfig.ts +90 -90
  50. package/src/components/confirm/index.ts +165 -165
  51. package/src/components/confirm/types/index.ts +13 -17
  52. package/src/components/drawer/defaultConfig.ts +89 -89
  53. package/src/components/drawer/index.css +37 -37
  54. package/src/components/drawer/index.ts +245 -245
  55. package/src/components/drawer/types/index.ts +62 -61
  56. package/src/components/folder/defaultConfig.ts +151 -151
  57. package/src/components/folder/folderIcon.ts +28 -28
  58. package/src/components/folder/index.css +303 -303
  59. package/src/components/folder/index.ts +953 -932
  60. package/src/components/folder/types/index.ts +143 -110
  61. package/src/components/iframe/defaultConfig.ts +60 -60
  62. package/src/components/iframe/index.css +76 -76
  63. package/src/components/iframe/index.ts +331 -331
  64. package/src/components/iframe/types/index.ts +96 -96
  65. package/src/components/loading/defaultConfig.ts +29 -29
  66. package/src/components/loading/index.css +66 -66
  67. package/src/components/loading/index.ts +101 -101
  68. package/src/components/loading/types/index.ts +36 -34
  69. package/src/components/panel/css/components-select.css +84 -84
  70. package/src/components/panel/defaultConfig.ts +868 -868
  71. package/src/components/panel/handlerComponents.ts +3993 -3993
  72. package/src/components/panel/index.css +1403 -1403
  73. package/src/components/panel/index.ts +221 -221
  74. package/src/components/panel/types/components-button.ts +56 -56
  75. package/src/components/panel/types/components-common.ts +73 -73
  76. package/src/components/panel/types/components-container.ts +25 -25
  77. package/src/components/panel/types/components-deepMenu.ts +64 -64
  78. package/src/components/panel/types/components-input.ts +90 -90
  79. package/src/components/panel/types/components-own.ts +16 -16
  80. package/src/components/panel/types/components-select.ts +169 -169
  81. package/src/components/panel/types/components-selectMultiple.ts +105 -104
  82. package/src/components/panel/types/components-slider.ts +55 -55
  83. package/src/components/panel/types/components-switch.ts +33 -33
  84. package/src/components/panel/types/components-textarea.ts +45 -45
  85. package/src/components/panel/types/index.ts +244 -244
  86. package/src/components/prompt/defaultConfig.ts +94 -94
  87. package/src/components/prompt/index.css +34 -34
  88. package/src/components/prompt/index.ts +187 -215
  89. package/src/components/prompt/types/index.ts +57 -56
  90. package/src/components/rightClickMenu/defaultConfig.ts +103 -103
  91. package/src/components/rightClickMenu/index.css +115 -115
  92. package/src/components/rightClickMenu/index.ts +662 -662
  93. package/src/components/rightClickMenu/types/index.ts +145 -143
  94. package/src/components/searchSuggestion/defaultConfig.ts +63 -63
  95. package/src/components/searchSuggestion/index.ts +813 -813
  96. package/src/components/searchSuggestion/types/index.ts +244 -242
  97. package/src/components/tooltip/defaultConfig.ts +33 -33
  98. package/src/components/tooltip/index.css +199 -199
  99. package/src/components/tooltip/index.ts +617 -617
  100. package/src/components/tooltip/types/index.ts +123 -121
  101. package/src/config/CommonCSSClassName.ts +17 -17
  102. package/src/config/GlobalConfig.ts +63 -63
  103. package/src/css/animation.css +987 -987
  104. package/src/css/button.css +551 -551
  105. package/src/css/common.css +54 -54
  106. package/src/css/index.css +253 -253
  107. package/src/css/ninePalaceGridPosition.css +50 -50
  108. package/src/css/scrollbar.css +22 -22
  109. package/src/handler/PopsElementHandler.ts +303 -303
  110. package/src/handler/PopsHandler.ts +611 -611
  111. package/src/types/PopsDOMUtilsEventType.d.ts +313 -313
  112. package/src/types/animation.d.ts +19 -19
  113. package/src/types/button.d.ts +94 -94
  114. package/src/types/components.d.ts +211 -211
  115. package/src/types/event.d.ts +43 -43
  116. package/src/types/global.d.ts +31 -31
  117. package/src/types/icon.d.ts +32 -32
  118. package/src/types/inst.d.ts +28 -28
  119. package/src/types/main.d.ts +66 -66
  120. package/src/types/mask.d.ts +52 -52
  121. package/src/types/position.d.ts +60 -60
  122. package/src/utils/PopsDOMUtils.ts +2483 -2483
  123. package/src/utils/PopsDOMUtilsEventsConfig.ts +4 -4
  124. package/src/utils/PopsInstanceUtils.ts +714 -714
  125. package/src/utils/PopsMathUtils.ts +71 -71
  126. package/src/utils/PopsSafeUtils.ts +22 -22
  127. package/src/utils/PopsUtils.ts +391 -421
@@ -1,165 +1,165 @@
1
- import { GlobalConfig } from "../../config/GlobalConfig";
2
- import { PopsElementHandler } from "../../handler/PopsElementHandler";
3
- import { PopsHandler } from "../../handler/PopsHandler";
4
- import { PopsCSS } from "../../PopsCSS";
5
- import type { PopsType } from "../../types/main";
6
- import { popsDOMUtils } from "../../utils/PopsDOMUtils";
7
- import { PopsInstanceUtils } from "../../utils/PopsInstanceUtils";
8
- import { popsUtils } from "../../utils/PopsUtils";
9
- import { PopsConfirmDefaultConfig } from "./defaultConfig";
10
- import type { PopsConfirmConfig } from "./types";
11
-
12
- export const PopsConfirm = {
13
- init(__config__: PopsConfirmConfig) {
14
- const guid = popsUtils.getRandomGUID();
15
- // 设置当前类型
16
- const popsType: PopsType = "confirm";
17
-
18
- let config = PopsConfirmDefaultConfig();
19
- config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
20
- config = popsUtils.assign(config, __config__);
21
- config = PopsHandler.handleOnly(popsType, config);
22
-
23
- const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
24
- PopsHandler.handleInit($shadowRoot, [
25
- {
26
- name: "index",
27
- css: PopsCSS.index,
28
- },
29
- {
30
- name: "ninePalaceGridPosition",
31
- css: PopsCSS.ninePalaceGridPosition,
32
- },
33
- {
34
- name: "scrollbar",
35
- css: PopsCSS.scrollbar,
36
- },
37
- {
38
- name: "button",
39
- css: PopsCSS.button,
40
- },
41
- {
42
- name: "anim",
43
- css: PopsCSS.anim,
44
- },
45
- {
46
- name: "common",
47
- css: PopsCSS.common,
48
- },
49
- {
50
- name: "confirmCSS",
51
- css: PopsCSS.confirmCSS,
52
- },
53
- ]);
54
-
55
- // 先把z-index提取出来
56
- const zIndex = PopsHandler.handleZIndex(config.zIndex);
57
- const maskHTML = PopsElementHandler.createMask(guid, zIndex);
58
-
59
- const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
60
- const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
61
- const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
62
- const { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(popsType, config);
63
- const animHTML = PopsElementHandler.createAnim(
64
- guid,
65
- popsType,
66
- config,
67
- /*html*/ `
68
- <div class="pops-title pops-${popsType}-title" style="text-align: ${
69
- config.title.position
70
- };${headerStyle}">${
71
- config.title.html
72
- ? config.title.text
73
- : `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`
74
- }${headerBtnHTML}</div>
75
- <div class="pops-content pops-${popsType}-content" style="${contentStyle}">${
76
- config.content.html
77
- ? config.content.text
78
- : `<p pops class="pops-${popsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`
79
- }</div>${bottomBtnHTML}`,
80
- bottomBtnHTML,
81
- zIndex
82
- );
83
- /**
84
- * 弹窗的主元素,包括动画层
85
- */
86
- const $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
87
- const {
88
- $pops: $pops,
89
- $title: $title,
90
- $headerBtnClose: $btnClose,
91
- $btnOk: $btnOk,
92
- $btnCancel: $btnCancel,
93
- $btnOther: $btnOther,
94
- } = PopsHandler.handleQueryElement($anim, popsType);
95
- /**
96
- * 遮罩层元素
97
- */
98
- let $mask: HTMLDivElement | undefined = void 0;
99
- /**
100
- * 已创建的元素列表
101
- */
102
- const $elList: HTMLElement[] = [$anim];
103
-
104
- if (config.mask.enable) {
105
- // 启用遮罩层
106
- const handleMask = PopsHandler.handleMask({
107
- type: popsType,
108
- guid: guid,
109
- config: config,
110
- animElement: $anim,
111
- maskHTML: maskHTML,
112
- });
113
- $mask = handleMask.maskElement;
114
- $elList.push($mask);
115
- }
116
- const evtConfig = PopsHandler.handleEventConfig(
117
- config,
118
- guid,
119
- $shadowContainer,
120
- $shadowRoot,
121
- popsType,
122
- $anim,
123
- $pops,
124
- $mask
125
- );
126
- const result = PopsHandler.handleResultConfig(evtConfig);
127
- PopsHandler.handleClickEvent("close", $btnClose, evtConfig, config.btn.close.callback);
128
- PopsHandler.handleClickEvent("ok", $btnOk, evtConfig, config.btn.ok.callback);
129
- PopsHandler.handleClickEvent("cancel", $btnCancel, evtConfig, config.btn.cancel.callback);
130
- PopsHandler.handleClickEvent("other", $btnOther, evtConfig, config.btn.other.callback);
131
-
132
- // 创建到页面中
133
-
134
- popsDOMUtils.append($shadowRoot, $elList);
135
- if (typeof config.beforeAppendToPageCallBack === "function") {
136
- config.beforeAppendToPageCallBack($shadowRoot, $shadowContainer);
137
- }
138
-
139
- popsDOMUtils.appendBody($shadowContainer);
140
- if ($mask != null) {
141
- $anim.after($mask);
142
- }
143
- PopsHandler.handlePush(popsType, {
144
- guid: guid,
145
- $anim: $anim,
146
- $pops: $pops!,
147
- $mask: $mask!,
148
- $shadowContainer: $shadowContainer,
149
- $shadowRoot: $shadowRoot,
150
- config: config,
151
- destory: result.close,
152
- });
153
- // 拖拽
154
- if (config.drag) {
155
- PopsInstanceUtils.drag($pops!, {
156
- dragElement: $title!,
157
- limit: config.dragLimit,
158
- extraDistance: config.dragExtraDistance,
159
- moveCallBack: config.dragMoveCallBack,
160
- endCallBack: config.dragEndCallBack,
161
- });
162
- }
163
- return result;
164
- },
165
- };
1
+ import { GlobalConfig } from "../../config/GlobalConfig";
2
+ import { PopsElementHandler } from "../../handler/PopsElementHandler";
3
+ import { PopsHandler } from "../../handler/PopsHandler";
4
+ import { PopsCSS } from "../../PopsCSS";
5
+ import type { PopsType } from "../../types/main";
6
+ import { popsDOMUtils } from "../../utils/PopsDOMUtils";
7
+ import { PopsInstanceUtils } from "../../utils/PopsInstanceUtils";
8
+ import { popsUtils } from "../../utils/PopsUtils";
9
+ import { PopsConfirmDefaultConfig } from "./defaultConfig";
10
+ import type { PopsConfirmConfig } from "./types";
11
+
12
+ export const PopsConfirm = {
13
+ init(__config__: PopsConfirmConfig) {
14
+ const guid = popsUtils.getRandomGUID();
15
+ // 设置当前类型
16
+ const popsType: PopsType = "confirm";
17
+
18
+ let config = PopsConfirmDefaultConfig();
19
+ config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
20
+ config = popsUtils.assign(config, __config__);
21
+ config = PopsHandler.handleOnly(popsType, config);
22
+
23
+ const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
24
+ PopsHandler.handleInit($shadowRoot, [
25
+ {
26
+ name: "index",
27
+ css: PopsCSS.index,
28
+ },
29
+ {
30
+ name: "ninePalaceGridPosition",
31
+ css: PopsCSS.ninePalaceGridPosition,
32
+ },
33
+ {
34
+ name: "scrollbar",
35
+ css: PopsCSS.scrollbar,
36
+ },
37
+ {
38
+ name: "button",
39
+ css: PopsCSS.button,
40
+ },
41
+ {
42
+ name: "anim",
43
+ css: PopsCSS.anim,
44
+ },
45
+ {
46
+ name: "common",
47
+ css: PopsCSS.common,
48
+ },
49
+ {
50
+ name: "confirmCSS",
51
+ css: PopsCSS.confirmCSS,
52
+ },
53
+ ]);
54
+
55
+ // 先把z-index提取出来
56
+ const zIndex = PopsHandler.handleZIndex(config.zIndex);
57
+ const maskHTML = PopsElementHandler.createMask(guid, zIndex);
58
+
59
+ const headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
60
+ const bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
61
+ const { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(popsType, config);
62
+ const { contentStyle, contentPStyle } = PopsElementHandler.createContentStyle(popsType, config);
63
+ const animHTML = PopsElementHandler.createAnim(
64
+ guid,
65
+ popsType,
66
+ config,
67
+ /*html*/ `
68
+ <div class="pops-title pops-${popsType}-title" style="text-align: ${
69
+ config.title.position
70
+ };${headerStyle}">${
71
+ config.title.html
72
+ ? config.title.text
73
+ : `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`
74
+ }${headerBtnHTML}</div>
75
+ <div class="pops-content pops-${popsType}-content" style="${contentStyle}">${
76
+ config.content.html
77
+ ? config.content.text
78
+ : `<p pops class="pops-${popsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`
79
+ }</div>${bottomBtnHTML}`,
80
+ bottomBtnHTML,
81
+ zIndex
82
+ );
83
+ /**
84
+ * 弹窗的主元素,包括动画层
85
+ */
86
+ const $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
87
+ const {
88
+ $pops: $pops,
89
+ $title: $title,
90
+ $headerBtnClose: $btnClose,
91
+ $btnOk: $btnOk,
92
+ $btnCancel: $btnCancel,
93
+ $btnOther: $btnOther,
94
+ } = PopsHandler.handleQueryElement($anim, popsType);
95
+ /**
96
+ * 遮罩层元素
97
+ */
98
+ let $mask: HTMLDivElement | undefined = void 0;
99
+ /**
100
+ * 已创建的元素列表
101
+ */
102
+ const $elList: HTMLElement[] = [$anim];
103
+
104
+ if (config.mask.enable) {
105
+ // 启用遮罩层
106
+ const handleMask = PopsHandler.handleMask({
107
+ type: popsType,
108
+ guid: guid,
109
+ config: config,
110
+ animElement: $anim,
111
+ maskHTML: maskHTML,
112
+ });
113
+ $mask = handleMask.maskElement;
114
+ $elList.push($mask);
115
+ }
116
+ const evtConfig = PopsHandler.handleEventConfig(
117
+ config,
118
+ guid,
119
+ $shadowContainer,
120
+ $shadowRoot,
121
+ popsType,
122
+ $anim,
123
+ $pops,
124
+ $mask
125
+ );
126
+ const result = PopsHandler.handleResultConfig(evtConfig);
127
+ PopsHandler.handleClickEvent("close", $btnClose, evtConfig, config.btn.close.callback);
128
+ PopsHandler.handleClickEvent("ok", $btnOk, evtConfig, config.btn.ok.callback);
129
+ PopsHandler.handleClickEvent("cancel", $btnCancel, evtConfig, config.btn.cancel.callback);
130
+ PopsHandler.handleClickEvent("other", $btnOther, evtConfig, config.btn.other.callback);
131
+
132
+ // 创建到页面中
133
+
134
+ popsDOMUtils.append($shadowRoot, $elList);
135
+ if (typeof config.beforeAppendToPageCallBack === "function") {
136
+ config.beforeAppendToPageCallBack($shadowRoot, $shadowContainer);
137
+ }
138
+
139
+ popsDOMUtils.appendBody($shadowContainer);
140
+ if ($mask != null) {
141
+ $anim.after($mask);
142
+ }
143
+ PopsHandler.handlePush(popsType, {
144
+ guid: guid,
145
+ $anim: $anim,
146
+ $pops: $pops!,
147
+ $mask: $mask!,
148
+ $shadowContainer: $shadowContainer,
149
+ $shadowRoot: $shadowRoot,
150
+ config: config,
151
+ destory: result.close,
152
+ });
153
+ // 拖拽
154
+ if (config.drag) {
155
+ PopsInstanceUtils.drag($pops!, {
156
+ dragElement: $title!,
157
+ limit: config.dragLimit,
158
+ extraDistance: config.dragExtraDistance,
159
+ moveCallBack: config.dragMoveCallBack,
160
+ endCallBack: config.dragEndCallBack,
161
+ });
162
+ }
163
+ return result;
164
+ },
165
+ };
@@ -1,17 +1,13 @@
1
- import type {
2
- PopsTitleConfig,
3
- PopsContentConfig,
4
- PopsDragConfig,
5
- PopsGeneralConfig,
6
- PopsMoreButtonConfig,
7
- } from "../../../types/components";
8
-
9
- /**
10
- * pops.confirm
11
- */
12
- export interface PopsConfirmConfig
13
- extends PopsTitleConfig,
14
- PopsContentConfig,
15
- PopsMoreButtonConfig,
16
- PopsDragConfig,
17
- PopsGeneralConfig {}
1
+ import type {
2
+ PopsTitleConfig,
3
+ PopsContentConfig,
4
+ PopsDragConfig,
5
+ PopsGeneralConfig,
6
+ PopsMoreButtonConfig,
7
+ } from "../../../types/components";
8
+
9
+ /**
10
+ * pops.confirm
11
+ */
12
+ export interface PopsConfirmConfig
13
+ extends PopsTitleConfig, PopsContentConfig, PopsMoreButtonConfig, PopsDragConfig, PopsGeneralConfig {}
@@ -1,89 +1,89 @@
1
- import type { PopsDrawerConfig } from "./types";
2
-
3
- export const PopsDrawerDefaultConfig = (): DeepRequired<PopsDrawerConfig> => {
4
- return {
5
- title: {
6
- enable: true,
7
- position: "center",
8
- text: "默认标题",
9
- html: false,
10
- style: "",
11
- },
12
- content: {
13
- text: "默认内容",
14
- html: false,
15
- style: "",
16
- },
17
- btn: {
18
- merge: false,
19
- mergeReverse: false,
20
- reverse: false,
21
- position: "flex-end",
22
- ok: {
23
- enable: true,
24
- size: void 0 as any,
25
- icon: void 0 as any,
26
- rightIcon: false,
27
- iconIsLoading: false,
28
- text: "确定",
29
- type: "primary",
30
- callback(eventConfig) {
31
- eventConfig.close();
32
- },
33
- },
34
- cancel: {
35
- enable: true,
36
- size: void 0 as any,
37
- icon: void 0 as any,
38
- rightIcon: false,
39
- iconIsLoading: false,
40
- text: "关闭",
41
- type: "default",
42
- callback(eventConfig) {
43
- eventConfig.close();
44
- },
45
- },
46
- other: {
47
- enable: false,
48
- size: void 0 as any,
49
- icon: void 0 as any,
50
- rightIcon: false,
51
- iconIsLoading: false,
52
- text: "其它按钮",
53
- type: "default",
54
- callback(eventConfig) {
55
- eventConfig.close();
56
- },
57
- },
58
- close: {
59
- enable: true,
60
- callback(eventConfig) {
61
- eventConfig.close();
62
- },
63
- },
64
- },
65
- mask: {
66
- enable: true,
67
- clickEvent: {
68
- toClose: true,
69
- toHide: false,
70
- },
71
- clickCallBack: null,
72
- },
73
- useShadowRoot: true,
74
- class: "",
75
- zIndex: 10000,
76
- only: false,
77
- direction: "right",
78
- size: "30%",
79
- lockScroll: false,
80
- closeOnPressEscape: true,
81
- openDelay: 0,
82
- closeDelay: 0,
83
- borderRadius: 0,
84
-
85
- style: null,
86
- beforeAppendToPageCallBack() {},
87
- forbiddenScroll: false,
88
- };
89
- };
1
+ import type { PopsDrawerConfig } from "./types";
2
+
3
+ export const PopsDrawerDefaultConfig = (): DeepRequired<PopsDrawerConfig> => {
4
+ return {
5
+ title: {
6
+ enable: true,
7
+ position: "center",
8
+ text: "默认标题",
9
+ html: false,
10
+ style: "",
11
+ },
12
+ content: {
13
+ text: "默认内容",
14
+ html: false,
15
+ style: "",
16
+ },
17
+ btn: {
18
+ merge: false,
19
+ mergeReverse: false,
20
+ reverse: false,
21
+ position: "flex-end",
22
+ ok: {
23
+ enable: true,
24
+ size: void 0 as any,
25
+ icon: void 0 as any,
26
+ rightIcon: false,
27
+ iconIsLoading: false,
28
+ text: "确定",
29
+ type: "primary",
30
+ callback(eventConfig) {
31
+ eventConfig.close();
32
+ },
33
+ },
34
+ cancel: {
35
+ enable: true,
36
+ size: void 0 as any,
37
+ icon: void 0 as any,
38
+ rightIcon: false,
39
+ iconIsLoading: false,
40
+ text: "关闭",
41
+ type: "default",
42
+ callback(eventConfig) {
43
+ eventConfig.close();
44
+ },
45
+ },
46
+ other: {
47
+ enable: false,
48
+ size: void 0 as any,
49
+ icon: void 0 as any,
50
+ rightIcon: false,
51
+ iconIsLoading: false,
52
+ text: "其它按钮",
53
+ type: "default",
54
+ callback(eventConfig) {
55
+ eventConfig.close();
56
+ },
57
+ },
58
+ close: {
59
+ enable: true,
60
+ callback(eventConfig) {
61
+ eventConfig.close();
62
+ },
63
+ },
64
+ },
65
+ mask: {
66
+ enable: true,
67
+ clickEvent: {
68
+ toClose: true,
69
+ toHide: false,
70
+ },
71
+ clickCallBack: null,
72
+ },
73
+ useShadowRoot: true,
74
+ class: "",
75
+ zIndex: 10000,
76
+ only: false,
77
+ direction: "right",
78
+ size: "30%",
79
+ lockScroll: false,
80
+ closeOnPressEscape: true,
81
+ openDelay: 0,
82
+ closeDelay: 0,
83
+ borderRadius: 0,
84
+
85
+ style: null,
86
+ beforeAppendToPageCallBack() {},
87
+ forbiddenScroll: false,
88
+ };
89
+ };
@@ -1,37 +1,37 @@
1
- .pops[type-value="drawer"] {
2
- position: fixed;
3
- box-sizing: border-box;
4
- display: flex;
5
- flex-direction: column;
6
- box-shadow:
7
- 0px 16px 48px 16px rgba(0, 0, 0, 0.08),
8
- 0px 12px 32px rgba(0, 0, 0, 0.12),
9
- 0px 8px 16px -8px rgba(0, 0, 0, 0.16);
10
- overflow: hidden;
11
- transition: all 0.3s;
12
- }
13
-
14
- .pops[type-value="drawer"][direction="top"] {
15
- width: 100%;
16
- left: 0;
17
- right: 0;
18
- top: 0;
19
- }
20
- .pops[type-value="drawer"][direction="bottom"] {
21
- width: 100%;
22
- left: 0;
23
- right: 0;
24
- bottom: 0;
25
- }
26
- .pops[type-value="drawer"][direction="left"] {
27
- height: 100%;
28
- top: 0;
29
- bottom: 0;
30
- left: 0;
31
- }
32
- .pops[type-value="drawer"][direction="right"] {
33
- height: 100%;
34
- top: 0;
35
- bottom: 0;
36
- right: 0;
37
- }
1
+ .pops[type-value="drawer"] {
2
+ position: fixed;
3
+ box-sizing: border-box;
4
+ display: flex;
5
+ flex-direction: column;
6
+ box-shadow:
7
+ 0px 16px 48px 16px rgba(0, 0, 0, 0.08),
8
+ 0px 12px 32px rgba(0, 0, 0, 0.12),
9
+ 0px 8px 16px -8px rgba(0, 0, 0, 0.16);
10
+ overflow: hidden;
11
+ transition: all 0.3s;
12
+ }
13
+
14
+ .pops[type-value="drawer"][direction="top"] {
15
+ width: 100%;
16
+ left: 0;
17
+ right: 0;
18
+ top: 0;
19
+ }
20
+ .pops[type-value="drawer"][direction="bottom"] {
21
+ width: 100%;
22
+ left: 0;
23
+ right: 0;
24
+ bottom: 0;
25
+ }
26
+ .pops[type-value="drawer"][direction="left"] {
27
+ height: 100%;
28
+ top: 0;
29
+ bottom: 0;
30
+ left: 0;
31
+ }
32
+ .pops[type-value="drawer"][direction="right"] {
33
+ height: 100%;
34
+ top: 0;
35
+ bottom: 0;
36
+ right: 0;
37
+ }