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