@whitesev/pops 2.6.1 → 3.0.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.
Files changed (165) hide show
  1. package/dist/index.amd.js +2513 -1534
  2. package/dist/index.amd.js.map +1 -1
  3. package/dist/index.amd.min.js +1 -1
  4. package/dist/index.amd.min.js.map +1 -1
  5. package/dist/index.cjs.js +2513 -1534
  6. package/dist/index.cjs.js.map +1 -1
  7. package/dist/index.cjs.min.js +1 -1
  8. package/dist/index.cjs.min.js.map +1 -1
  9. package/dist/index.esm.js +2513 -1534
  10. package/dist/index.esm.js.map +1 -1
  11. package/dist/index.esm.min.js +1 -1
  12. package/dist/index.esm.min.js.map +1 -1
  13. package/dist/index.iife.js +2513 -1534
  14. package/dist/index.iife.js.map +1 -1
  15. package/dist/index.iife.min.js +1 -1
  16. package/dist/index.iife.min.js.map +1 -1
  17. package/dist/index.system.js +2513 -1534
  18. package/dist/index.system.js.map +1 -1
  19. package/dist/index.system.min.js +1 -1
  20. package/dist/index.system.min.js.map +1 -1
  21. package/dist/index.umd.js +2513 -1534
  22. package/dist/index.umd.js.map +1 -1
  23. package/dist/index.umd.min.js +1 -1
  24. package/dist/index.umd.min.js.map +1 -1
  25. package/dist/types/eslint.config.d.mts +2 -0
  26. package/dist/types/src/Pops.d.ts +449 -103
  27. package/dist/types/src/PopsCSS.d.ts +3 -1
  28. package/dist/types/src/PopsIcon.d.ts +1 -1
  29. package/dist/types/src/PopsInst.d.ts +2 -2
  30. package/dist/types/src/components/alert/defaultConfig.d.ts +2 -0
  31. package/dist/types/src/components/alert/index.d.ts +2 -2
  32. package/dist/types/src/components/alert/types/index.d.ts +4 -4
  33. package/dist/types/src/components/confirm/defaultConfig.d.ts +2 -0
  34. package/dist/types/src/components/confirm/index.d.ts +2 -2
  35. package/dist/types/src/components/confirm/types/index.d.ts +2 -2
  36. package/dist/types/src/components/drawer/defaultConfig.d.ts +2 -0
  37. package/dist/types/src/components/drawer/index.d.ts +2 -2
  38. package/dist/types/src/components/drawer/types/index.d.ts +2 -2
  39. package/dist/types/src/components/folder/defaultConfig.d.ts +2 -0
  40. package/dist/types/src/components/folder/index.d.ts +2 -2
  41. package/dist/types/src/components/folder/types/index.d.ts +31 -7
  42. package/dist/types/src/components/iframe/defaultConfig.d.ts +2 -0
  43. package/dist/types/src/components/iframe/index.d.ts +2 -5
  44. package/dist/types/src/components/iframe/types/index.d.ts +13 -42
  45. package/dist/types/src/components/loading/defaultConfig.d.ts +2 -0
  46. package/dist/types/src/components/loading/index.d.ts +2 -2
  47. package/dist/types/src/components/loading/types/index.d.ts +4 -4
  48. package/dist/types/src/components/panel/defaultConfig.d.ts +2 -0
  49. package/dist/types/src/components/panel/handlerComponents.d.ts +988 -49
  50. package/dist/types/src/components/panel/index.d.ts +2 -2
  51. package/dist/types/src/components/panel/types/components-button.d.ts +7 -6
  52. package/dist/types/src/components/panel/types/components-common.d.ts +7 -7
  53. package/dist/types/src/components/panel/types/components-container.d.ts +24 -0
  54. package/dist/types/src/components/panel/types/components-deepMenu.d.ts +14 -14
  55. package/dist/types/src/components/panel/types/components-input.d.ts +46 -21
  56. package/dist/types/src/components/panel/types/components-own.d.ts +5 -5
  57. package/dist/types/src/components/panel/types/components-select.d.ts +95 -36
  58. package/dist/types/src/components/panel/types/components-selectMultiple.d.ts +15 -20
  59. package/dist/types/src/components/panel/types/components-slider.d.ts +7 -8
  60. package/dist/types/src/components/panel/types/components-switch.d.ts +6 -6
  61. package/dist/types/src/components/panel/types/components-textarea.d.ts +6 -6
  62. package/dist/types/src/components/panel/types/index.d.ts +36 -28
  63. package/dist/types/src/components/prompt/defaultConfig.d.ts +2 -0
  64. package/dist/types/src/components/prompt/index.d.ts +2 -2
  65. package/dist/types/src/components/prompt/types/index.d.ts +4 -3
  66. package/dist/types/src/components/rightClickMenu/defaultConfig.d.ts +2 -0
  67. package/dist/types/src/components/rightClickMenu/index.d.ts +29 -27
  68. package/dist/types/src/components/rightClickMenu/types/index.d.ts +32 -11
  69. package/dist/types/src/components/searchSuggestion/defaultConfig.d.ts +2 -0
  70. package/dist/types/src/components/searchSuggestion/index.d.ts +24 -9
  71. package/dist/types/src/components/searchSuggestion/types/index.d.ts +15 -13
  72. package/dist/types/src/components/tooltip/defaultConfig.d.ts +2 -0
  73. package/dist/types/src/components/tooltip/index.d.ts +6 -21
  74. package/dist/types/src/components/tooltip/types/index.d.ts +8 -6
  75. package/dist/types/src/config/GlobalConfig.d.ts +3 -3
  76. package/dist/types/src/handler/PopsElementHandler.d.ts +6 -6
  77. package/dist/types/src/handler/PopsHandler.d.ts +18 -18
  78. package/dist/types/src/types/button.d.ts +4 -97
  79. package/dist/types/src/types/components.d.ts +8 -8
  80. package/dist/types/src/types/event.d.ts +0 -30
  81. package/dist/types/src/types/global.d.ts +4 -0
  82. package/dist/types/src/types/inst.d.ts +5 -5
  83. package/dist/types/src/types/main.d.ts +35 -80
  84. package/dist/types/src/types/mask.d.ts +18 -15
  85. package/dist/types/src/utils/PopsInstanceUtils.d.ts +15 -15
  86. package/dist/types/src/utils/PopsUtils.d.ts +4 -0
  87. package/package.json +12 -12
  88. package/src/Pops.ts +44 -44
  89. package/src/PopsAnimation.ts +1 -1
  90. package/src/PopsCSS.ts +4 -1
  91. package/src/PopsInst.ts +2 -2
  92. package/src/components/alert/{config.ts → defaultConfig.ts} +7 -7
  93. package/src/components/alert/index.ts +16 -18
  94. package/src/components/alert/types/index.ts +4 -4
  95. package/src/components/confirm/{config.ts → defaultConfig.ts} +11 -11
  96. package/src/components/confirm/index.ts +11 -13
  97. package/src/components/confirm/types/index.ts +3 -3
  98. package/src/components/drawer/{config.ts → defaultConfig.ts} +10 -10
  99. package/src/components/drawer/index.ts +18 -17
  100. package/src/components/drawer/types/index.ts +3 -3
  101. package/src/components/folder/{config.ts → defaultConfig.ts} +22 -18
  102. package/src/components/folder/index.ts +61 -60
  103. package/src/components/folder/types/index.ts +31 -18
  104. package/src/components/iframe/{config.ts → defaultConfig.ts} +2 -2
  105. package/src/components/iframe/index.ts +24 -29
  106. package/src/components/iframe/types/index.ts +13 -56
  107. package/src/components/loading/{config.ts → defaultConfig.ts} +3 -3
  108. package/src/components/loading/index.ts +13 -11
  109. package/src/components/loading/types/index.ts +5 -5
  110. package/src/components/panel/css/components-select.css +84 -0
  111. package/src/components/panel/defaultConfig.ts +818 -0
  112. package/src/components/panel/handlerComponents.ts +1431 -762
  113. package/src/components/panel/index.css +90 -6
  114. package/src/components/panel/index.ts +15 -28
  115. package/src/components/panel/types/components-button.ts +7 -6
  116. package/src/components/panel/types/components-common.ts +7 -7
  117. package/src/components/panel/types/components-container.ts +25 -0
  118. package/src/components/panel/types/components-deepMenu.ts +14 -14
  119. package/src/components/panel/types/components-input.ts +56 -21
  120. package/src/components/panel/types/components-own.ts +5 -5
  121. package/src/components/panel/types/components-select.ts +100 -38
  122. package/src/components/panel/types/components-selectMultiple.ts +16 -22
  123. package/src/components/panel/types/components-slider.ts +7 -8
  124. package/src/components/panel/types/components-switch.ts +6 -6
  125. package/src/components/panel/types/components-textarea.ts +6 -6
  126. package/src/components/panel/types/index.ts +45 -38
  127. package/src/components/prompt/{config.ts → defaultConfig.ts} +10 -10
  128. package/src/components/prompt/index.ts +13 -15
  129. package/src/components/prompt/types/index.ts +4 -3
  130. package/src/components/rightClickMenu/{config.ts → defaultConfig.ts} +20 -19
  131. package/src/components/rightClickMenu/index.ts +125 -108
  132. package/src/components/rightClickMenu/types/index.ts +36 -14
  133. package/src/components/searchSuggestion/{config.ts → defaultConfig.ts} +18 -11
  134. package/src/components/searchSuggestion/index.ts +130 -155
  135. package/src/components/searchSuggestion/types/index.ts +17 -15
  136. package/src/components/tooltip/{config.ts → defaultConfig.ts} +5 -6
  137. package/src/components/tooltip/index.ts +21 -21
  138. package/src/components/tooltip/types/index.ts +9 -7
  139. package/src/config/GlobalConfig.ts +2 -2
  140. package/src/handler/PopsElementHandler.ts +29 -30
  141. package/src/handler/PopsHandler.ts +43 -43
  142. package/src/types/button.d.ts +4 -97
  143. package/src/types/components.d.ts +8 -8
  144. package/src/types/event.d.ts +0 -30
  145. package/src/types/global.d.ts +4 -0
  146. package/src/types/inst.d.ts +5 -5
  147. package/src/types/main.d.ts +35 -80
  148. package/src/types/mask.d.ts +18 -15
  149. package/src/utils/PopsDOMUtils.ts +34 -34
  150. package/src/utils/PopsInstanceUtils.ts +129 -139
  151. package/src/utils/PopsUtils.ts +60 -45
  152. package/dist/types/src/components/alert/config.d.ts +0 -2
  153. package/dist/types/src/components/confirm/config.d.ts +0 -2
  154. package/dist/types/src/components/drawer/config.d.ts +0 -2
  155. package/dist/types/src/components/folder/config.d.ts +0 -2
  156. package/dist/types/src/components/iframe/config.d.ts +0 -2
  157. package/dist/types/src/components/loading/config.d.ts +0 -2
  158. package/dist/types/src/components/panel/config.d.ts +0 -2
  159. package/dist/types/src/components/panel/types/components-forms.d.ts +0 -23
  160. package/dist/types/src/components/prompt/config.d.ts +0 -2
  161. package/dist/types/src/components/rightClickMenu/config.d.ts +0 -2
  162. package/dist/types/src/components/searchSuggestion/config.d.ts +0 -2
  163. package/dist/types/src/components/tooltip/config.d.ts +0 -2
  164. package/src/components/panel/config.ts +0 -530
  165. package/src/components/panel/types/components-forms.ts +0 -24
@@ -1,2 +0,0 @@
1
- import type { PopsAlertDetails } from "./types";
2
- export declare const PopsAlertConfig: () => DeepRequired<PopsAlertDetails>;
@@ -1,2 +0,0 @@
1
- import type { PopsConfirmDetails } from "./types";
2
- export declare const PopsConfirmConfig: () => DeepRequired<PopsConfirmDetails>;
@@ -1,2 +0,0 @@
1
- import type { PopsDrawerDetails } from "./types";
2
- export declare const PopsDrawerConfig: () => DeepRequired<PopsDrawerDetails>;
@@ -1,2 +0,0 @@
1
- import type { PopsFolderDetails } from "./types";
2
- export declare const PopsFolderConfig: () => DeepRequired<PopsFolderDetails>;
@@ -1,2 +0,0 @@
1
- import type { PopsIframeDetails } from "./types";
2
- export declare const PopsIframeConfig: () => DeepRequired<PopsIframeDetails>;
@@ -1,2 +0,0 @@
1
- import type { PopsLoadingDetails } from "./types";
2
- export declare const PopsLoadingConfig: () => DeepRequired<PopsLoadingDetails>;
@@ -1,2 +0,0 @@
1
- import type { PopsPanelDetails } from "./types";
2
- export declare const PopsPanelConfig: () => DeepRequired<PopsPanelDetails>;
@@ -1,23 +0,0 @@
1
- import type { PopsPanelCommonDetails } from "./components-common";
2
- import type { PopsPanelFormsTotalDetails } from ".";
3
- /**
4
- * pops.panel的 forms
5
- */
6
- export interface PopsPanelFormsDetails extends PopsPanelCommonDetails<PopsPanelFormsDetails> {
7
- /**
8
- * 显示在左边的文字
9
- */
10
- text: string;
11
- /**
12
- * 是否进行折叠
13
- */
14
- isFold?: boolean;
15
- /**
16
- * 类型
17
- */
18
- type: "forms";
19
- /**
20
- * 子配置
21
- */
22
- forms: PopsPanelFormsTotalDetails[];
23
- }
@@ -1,2 +0,0 @@
1
- import type { PopsPromptDetails } from "./types/index";
2
- export declare const PopsPromptConfig: () => DeepRequired<PopsPromptDetails>;
@@ -1,2 +0,0 @@
1
- import type { PopsRightClickMenuDetails } from "./types";
2
- export declare const rightClickMenuConfig: () => DeepRequired<PopsRightClickMenuDetails>;
@@ -1,2 +0,0 @@
1
- import type { PopsSearchSuggestionDetails } from "./types/index";
2
- export declare const searchSuggestionConfig: () => DeepRequired<PopsSearchSuggestionDetails<any>>;
@@ -1,2 +0,0 @@
1
- import type { PopsToolTipDetails } from "./types/index";
2
- export declare const PopsTooltipConfig: () => DeepRequired<PopsToolTipDetails>;
@@ -1,530 +0,0 @@
1
- import { popsDOMUtils } from "../../utils/PopsDOMUtils";
2
- import type { PopsPanelDetails } from "./types";
3
-
4
- export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
5
- return {
6
- title: {
7
- text: "默认标题",
8
- position: "center",
9
- html: false,
10
- style: "",
11
- },
12
- content: [
13
- {
14
- id: "whitesev-panel-config-1",
15
- title: "菜单配置1",
16
- headerTitle: "菜单配置1",
17
- isDefault: false,
18
- attributes: {
19
- "data-test": "test",
20
- "data-test-2": "test2",
21
- },
22
- forms: [
23
- {
24
- className: "forms-1",
25
- text: "区域设置",
26
- type: "forms",
27
- attributes: {},
28
- forms: [
29
- {
30
- className: "panel-switch",
31
- text: "switch",
32
- type: "switch",
33
- disabled: false,
34
- description: "",
35
- afterAddToUListCallBack() {
36
- // TODO
37
- },
38
- props: {},
39
- attributes: {},
40
- getValue() {
41
- return true;
42
- },
43
- callback(event, value) {
44
- console.log("按钮开启状态:", value);
45
- },
46
- },
47
- {
48
- className: "panel-slider",
49
- text: "slider",
50
- type: "slider",
51
- description: "",
52
- afterAddToUListCallBack() {
53
- // TODO
54
- },
55
- disabled: false,
56
- getToolTipContent(value) {
57
- return String(value);
58
- },
59
- isShowHoverTip: true,
60
- step: 1,
61
- props: {},
62
- attributes: {},
63
- getValue() {
64
- return 50;
65
- },
66
- callback(event, value) {
67
- console.log("滑块当前数值:", value);
68
- },
69
- min: 1,
70
- max: 100,
71
- },
72
- {
73
- className: "panel-button",
74
- text: "button",
75
- type: "button",
76
- description: "",
77
- disable: false,
78
- buttonIsRightIcon: false,
79
- props: {},
80
- afterAddToUListCallBack() {
81
- // TODO
82
- },
83
- attributes: {},
84
- buttonIcon: "view",
85
- buttonIconIsLoading: true,
86
- buttonType: "default",
87
- buttonText: "default按钮",
88
- callback(event) {
89
- console.log("点击按钮", event);
90
- },
91
- },
92
- {
93
- className: "panel-button",
94
- text: "button",
95
- type: "button",
96
- props: {},
97
- attributes: {},
98
- buttonIcon: "eleme",
99
- buttonIconIsLoading: true,
100
- buttonType: "warning",
101
- buttonText: "warning按钮",
102
- callback(event) {
103
- console.log("点击按钮", event);
104
- },
105
- },
106
- {
107
- className: "panel-button",
108
- text: "button",
109
- // @ts-ignore
110
- props: {},
111
- type: "button",
112
- attributes: {},
113
- buttonIcon: "chromeFilled",
114
- buttonIconIsLoading: true,
115
- buttonType: "danger",
116
- buttonText: "danger按钮",
117
- callback(event) {
118
- console.log("点击按钮", event);
119
- },
120
- },
121
- {
122
- className: "panel-button",
123
- text: "button",
124
- type: "button",
125
- attributes: {},
126
- // @ts-ignore
127
- props: {},
128
- buttonIcon: "upload",
129
- buttonIconIsLoading: false,
130
- buttonType: "info",
131
- buttonText: "info按钮",
132
- callback(event) {
133
- console.log("点击按钮", event);
134
- },
135
- },
136
- ],
137
- },
138
- ],
139
- },
140
- {
141
- id: "whitesev-panel-config-2",
142
- title: "菜单配置2",
143
- headerTitle: "菜单配置2",
144
- isDefault: true,
145
- attributes: {
146
- "data-value": "value",
147
- "data-value-2": "value2",
148
- },
149
- forms: [
150
- {
151
- className: "panel-input",
152
- text: "input",
153
- type: "input",
154
- isNumber: false,
155
- props: {},
156
- attributes: {},
157
- getValue() {
158
- return "50";
159
- },
160
- callback(event, value) {
161
- popsDOMUtils.preventEvent(event);
162
- console.log("输入框内容改变:", value);
163
- },
164
- placeholder: "请输入内容",
165
- },
166
- {
167
- className: "panel-input-password",
168
- text: "input-password",
169
- type: "input",
170
- // @ts-ignore
171
- props: {},
172
- attributes: {},
173
- getValue() {
174
- return "123456";
175
- },
176
- callback(event, value) {
177
- popsDOMUtils.preventEvent(event);
178
- console.log("密码输入框内容改变:", value);
179
- },
180
- isPassword: true,
181
- placeholder: "请输入密码",
182
- },
183
- {
184
- className: "panel-textarea",
185
- text: "textarea",
186
- type: "textarea",
187
- // @ts-ignore
188
- props: {},
189
- attributes: {},
190
- getValue() {
191
- return "50";
192
- },
193
- callback(event, value) {
194
- popsDOMUtils.preventEvent(event);
195
- console.log("textarea输入框内容改变:", value);
196
- },
197
- placeholder: "请输入内容",
198
- },
199
- {
200
- className: "panel-select",
201
- text: "select",
202
- type: "select",
203
- disabled: true,
204
- // @ts-ignore
205
- props: {},
206
- attributes: {},
207
- getValue() {
208
- return 50;
209
- },
210
- callback(event, isSelectedValue, isSelectedText) {
211
- console.log(`select当前选项:${isSelectedValue},当前选项文本:${isSelectedText}`);
212
- },
213
- data: [
214
- {
215
- value: "all",
216
- text: "所有",
217
- disable() {
218
- return false;
219
- },
220
- forms: [],
221
- },
222
- {
223
- value: "text",
224
- text: "文本",
225
- disable() {
226
- return false;
227
- },
228
- forms: [],
229
- },
230
- {
231
- value: "html",
232
- text: "超文本",
233
- disable() {
234
- return false;
235
- },
236
- forms: [],
237
- },
238
- ],
239
- },
240
- {
241
- className: "panel-select-multiple",
242
- type: "select-multiple",
243
- text: "select-multiple",
244
- disabled: true,
245
- // @ts-ignore
246
- props: {},
247
-
248
- attributes: {},
249
- placeholder: "请至少选择一个选项",
250
- getValue() {
251
- return ["select-1", "select-2"];
252
- },
253
- callback(selectInfo) {
254
- console.log(`select值改变,多选信息`, selectInfo);
255
- },
256
- clickCallBack(event, isSelectedInfo) {
257
- console.log("点击", event, isSelectedInfo);
258
- },
259
- closeIconClickCallBack(event, data) {
260
- console.log("点击关闭图标的事件", data);
261
- },
262
- data: [
263
- {
264
- value: "select-1",
265
- text: "单选1",
266
- isHTML: false,
267
- disable(value, allSelectedInfo) {
268
- return allSelectedInfo.findIndex((it) => ["select-5"].includes(it.value)) !== -1;
269
- },
270
- },
271
- {
272
- value: "select-2",
273
- text: "单选2",
274
- isHTML: false,
275
- disable(value, allSelectedInfo) {
276
- return allSelectedInfo.findIndex((it) => ["select-5"].includes(it.value)) !== -1;
277
- },
278
- },
279
- {
280
- value: "select-3",
281
- text: "单选3",
282
- isHTML: false,
283
- disable(value, allSelectedInfo) {
284
- return allSelectedInfo.findIndex((it) => ["select-2", "select-5"].includes(it.value)) !== -1;
285
- },
286
- },
287
- {
288
- value: "select-4",
289
- text: "单选4",
290
- isHTML: false,
291
- disable(value, allSelectedInfo) {
292
- return allSelectedInfo.findIndex((it) => ["select-3", "select-5"].includes(it.value)) !== -1;
293
- },
294
- },
295
- {
296
- value: "select-5",
297
- text(value, allSelectedInfo) {
298
- return allSelectedInfo.findIndex((it) => ["select-4"].includes(it.value)) !== -1
299
- ? "单选5-禁用"
300
- : "单选5";
301
- },
302
- isHTML: false,
303
- disable(value, allSelectedInfo) {
304
- return allSelectedInfo.findIndex((it) => ["select-4"].includes(it.value)) !== -1;
305
- },
306
- },
307
- ],
308
- },
309
- {
310
- type: "forms",
311
- text: "deep菜单",
312
- forms: [
313
- {
314
- type: "deepMenu",
315
- className: "panel-deepMenu",
316
- text: "deepMenu",
317
- description: "二级菜单",
318
- rightText: "自定义配置",
319
- arrowRightIcon: true,
320
- afterAddToUListCallBack(formConfig, container) {
321
- console.log(formConfig, container);
322
- },
323
- clickCallBack(event, formConfig) {
324
- console.log("进入子配置", event, formConfig);
325
- },
326
- forms: [
327
- {
328
- className: "forms-1",
329
- text: "区域设置",
330
- type: "forms",
331
- attributes: {},
332
- props: {},
333
- forms: [
334
- {
335
- className: "panel-switch",
336
- text: "switch",
337
- type: "switch",
338
- // @ts-ignore
339
- props: {},
340
- attributes: {},
341
- getValue() {
342
- return true;
343
- },
344
- callback(event, value) {
345
- console.log("按钮开启状态:", value);
346
- },
347
- },
348
- {
349
- className: "panel-slider",
350
- text: "slider",
351
- // @ts-ignore
352
- props: {},
353
- type: "slider",
354
- attributes: {},
355
- getValue() {
356
- return 50;
357
- },
358
- callback(event, value) {
359
- console.log("滑块当前数值:", value);
360
- },
361
- min: 1,
362
- max: 100,
363
- },
364
- {
365
- className: "panel-button",
366
- text: "button",
367
- // @ts-ignore
368
- props: {},
369
- type: "button",
370
- attributes: {},
371
- buttonIcon: "eleme",
372
- buttonIconIsLoading: true,
373
- buttonType: "warning",
374
- buttonText: "warning按钮",
375
- callback(event) {
376
- console.log("点击按钮", event);
377
- },
378
- },
379
- {
380
- className: "panel-button",
381
- text: "button",
382
- type: "button",
383
- // @ts-ignore
384
- props: {},
385
- attributes: {},
386
- buttonIcon: "chromeFilled",
387
- buttonIconIsLoading: true,
388
- buttonType: "danger",
389
- buttonText: "danger按钮",
390
- callback(event) {
391
- console.log("点击按钮", event);
392
- },
393
- },
394
- {
395
- className: "panel-button",
396
- text: "button",
397
- // @ts-ignore
398
- props: {},
399
- type: "button",
400
- attributes: {},
401
- buttonIcon: "upload",
402
- buttonIconIsLoading: false,
403
- buttonType: "info",
404
- buttonText: "info按钮",
405
- callback(event) {
406
- console.log("点击按钮", event);
407
- },
408
- },
409
- ],
410
- },
411
- ],
412
- },
413
- {
414
- type: "deepMenu",
415
- className: "panel-deepMenu2",
416
- attributes: {},
417
- //@ts-ignore
418
- props: {},
419
- text: "deepMenu2",
420
- description: "二级菜单",
421
- rightText: "自定义配置",
422
- arrowRightIcon: true,
423
- afterAddToUListCallBack(formConfig, container) {
424
- console.log(formConfig, container);
425
- },
426
- clickCallBack(event, formConfig) {
427
- console.log("进入子配置", event, formConfig);
428
- },
429
- forms: [],
430
- },
431
- ],
432
- },
433
- {
434
- type: "forms",
435
- isFold: true,
436
- text: "折叠菜单",
437
- afterAddToUListCallBack(formConfig, container) {
438
- console.log(formConfig, container);
439
- },
440
- forms: [
441
- {
442
- className: "panel-switch",
443
- text: "switch",
444
- // @ts-ignore
445
- props: {},
446
- type: "switch",
447
- attributes: {},
448
- getValue() {
449
- return true;
450
- },
451
- callback(event, value) {
452
- console.log("按钮开启状态:", value);
453
- },
454
- },
455
- ],
456
- },
457
- ],
458
- },
459
- {
460
- id: "whitesev-panel-bottom-config-1",
461
- title: /*html*/ `
462
- <a rel="nofollow" href="https://www.npmjs.com/package/@whitesev/pops" target="_blank"><img src="https://img.shields.io/npm/v/@whitesev/pops?label=pops" alt="npm pops version"></a>
463
- `,
464
- isBottom: true,
465
- disableAsideItemHoverCSS: true,
466
- attributes: {
467
- "data-value": "value",
468
- "data-value-2": "value2",
469
- },
470
- // @ts-ignore
471
- props: {},
472
- forms: [],
473
- clickFirstCallback: function () {
474
- return false;
475
- },
476
- },
477
- {
478
- id: "whitesev-panel-bottom-config-2",
479
- title: "版本:xxx.xx.xx",
480
- isBottom: true,
481
- attributes: {
482
- "data-value": "value",
483
- "data-value-2": "value2",
484
- },
485
- // @ts-ignore
486
- props: {},
487
- forms: [],
488
- clickFirstCallback: function () {
489
- return false;
490
- },
491
- },
492
- ],
493
- bottomContentConfig: [],
494
- btn: {
495
- close: {
496
- enable: true,
497
- callback(event) {
498
- event.close();
499
- },
500
- },
501
- },
502
- mask: {
503
- enable: false,
504
- clickEvent: {
505
- toClose: false,
506
- toHide: false,
507
- },
508
- clickCallBack: null,
509
- },
510
- useShadowRoot: true,
511
- class: "",
512
- mobileClassName: "pops-panel-is-mobile",
513
- isMobile: false,
514
- only: false,
515
- width: window.innerWidth < 550 ? "88vw" : "700px",
516
- height: window.innerHeight < 450 ? "70vh" : "500px",
517
- position: "center",
518
- animation: "pops-anim-fadein-zoom",
519
- useDeepMenuSwtichAnimation: true,
520
- zIndex: 10000,
521
- drag: false,
522
- dragLimit: true,
523
- dragExtraDistance: 3,
524
- dragMoveCallBack() {},
525
- dragEndCallBack() {},
526
- forbiddenScroll: false,
527
- style: null,
528
- beforeAppendToPageCallBack() {},
529
- };
530
- };
@@ -1,24 +0,0 @@
1
- import type { PopsPanelCommonDetails } from "./components-common";
2
- import type { PopsPanelFormsTotalDetails } from ".";
3
-
4
- /**
5
- * pops.panel的 forms
6
- */
7
- export interface PopsPanelFormsDetails extends PopsPanelCommonDetails<PopsPanelFormsDetails> {
8
- /**
9
- * 显示在左边的文字
10
- */
11
- text: string;
12
- /**
13
- * 是否进行折叠
14
- */
15
- isFold?: boolean;
16
- /**
17
- * 类型
18
- */
19
- type: "forms";
20
- /**
21
- * 子配置
22
- */
23
- forms: PopsPanelFormsTotalDetails[];
24
- }