@whitesev/pops 2.5.0 → 2.5.2
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 +319 -159
- package/dist/index.amd.js.map +1 -1
- package/dist/index.amd.min.js +1 -1
- package/dist/index.amd.min.js.map +1 -1
- package/dist/index.cjs.js +319 -159
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +319 -159
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +319 -159
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.system.js +319 -159
- package/dist/index.system.js.map +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/dist/index.umd.js +319 -159
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/dist/types/src/Pops.d.ts +23 -19
- package/dist/types/src/components/panel/handlerComponents.d.ts +40 -21
- package/dist/types/src/components/panel/types/components-button.d.ts +8 -19
- package/dist/types/src/components/panel/types/components-common.d.ts +23 -0
- package/dist/types/src/components/panel/types/components-deepMenu.d.ts +0 -18
- package/dist/types/src/components/panel/types/components-forms.d.ts +0 -18
- package/dist/types/src/components/panel/types/components-input.d.ts +0 -21
- package/dist/types/src/components/panel/types/components-own.d.ts +0 -14
- package/dist/types/src/components/panel/types/components-select.d.ts +0 -21
- package/dist/types/src/components/panel/types/components-selectMultiple.d.ts +0 -18
- package/dist/types/src/components/panel/types/components-slider.d.ts +0 -19
- package/dist/types/src/components/panel/types/components-switch.d.ts +0 -21
- package/dist/types/src/components/panel/types/components-textarea.d.ts +0 -21
- package/dist/types/src/components/panel/types/index.d.ts +76 -11
- package/dist/types/src/components/rightClickMenu/index.d.ts +2 -8
- package/dist/types/src/handler/PopsHandler.d.ts +44 -28
- package/dist/types/src/types/global.d.ts +11 -9
- package/dist/types/src/utils/PopsDOMUtils.d.ts +1 -1
- package/package.json +1 -1
- package/src/PopsAnimation.ts +6 -6
- package/src/components/alert/index.ts +4 -4
- package/src/components/confirm/index.ts +6 -6
- package/src/components/drawer/index.ts +7 -2
- package/src/components/folder/index.ts +22 -22
- package/src/components/iframe/index.ts +13 -12
- package/src/components/loading/index.ts +1 -1
- package/src/components/panel/config.ts +58 -5
- package/src/components/panel/handlerComponents.ts +161 -74
- package/src/components/panel/index.css +30 -6
- package/src/components/panel/index.ts +30 -15
- package/src/components/panel/types/components-button.ts +8 -21
- package/src/components/panel/types/components-common.ts +27 -0
- package/src/components/panel/types/components-deepMenu.ts +0 -20
- package/src/components/panel/types/components-forms.ts +0 -20
- package/src/components/panel/types/components-input.ts +0 -23
- package/src/components/panel/types/components-own.ts +0 -14
- package/src/components/panel/types/components-select.ts +0 -23
- package/src/components/panel/types/components-selectMultiple.ts +0 -20
- package/src/components/panel/types/components-slider.ts +0 -21
- package/src/components/panel/types/components-switch.ts +0 -23
- package/src/components/panel/types/components-textarea.ts +0 -23
- package/src/components/panel/types/index.ts +81 -13
- package/src/components/prompt/index.ts +7 -7
- package/src/components/searchSuggestion/index.ts +5 -11
- package/src/handler/PopsHandler.ts +47 -30
- package/src/types/global.d.ts +11 -9
- package/src/utils/PopsDOMUtils.ts +14 -14
|
@@ -54,107 +54,123 @@ export declare const PopsHandler: {
|
|
|
54
54
|
/**
|
|
55
55
|
* 主元素
|
|
56
56
|
*/
|
|
57
|
-
|
|
57
|
+
$pops: HTMLDivElement;
|
|
58
58
|
/**
|
|
59
59
|
* 确认按钮
|
|
60
60
|
*/
|
|
61
|
-
|
|
61
|
+
$btnOk: HTMLDivElement;
|
|
62
62
|
/**
|
|
63
63
|
* 取消按钮
|
|
64
64
|
*/
|
|
65
|
-
|
|
65
|
+
$btnCancel: HTMLDivElement;
|
|
66
66
|
/**
|
|
67
67
|
* 其它按钮
|
|
68
68
|
*/
|
|
69
|
-
|
|
69
|
+
$btnOther: HTMLDivElement;
|
|
70
70
|
/**
|
|
71
71
|
* 标题元素
|
|
72
72
|
*/
|
|
73
|
-
|
|
73
|
+
$title: HTMLDivElement;
|
|
74
74
|
/**
|
|
75
75
|
* 输入框元素
|
|
76
76
|
*/
|
|
77
|
-
|
|
77
|
+
$input: HTMLInputElement | HTMLTextAreaElement;
|
|
78
78
|
/**
|
|
79
79
|
* 顶部按钮控制层元素
|
|
80
80
|
*/
|
|
81
|
-
|
|
81
|
+
$headerControls: HTMLDivElement;
|
|
82
82
|
/**
|
|
83
83
|
* iframe元素
|
|
84
84
|
*/
|
|
85
|
-
|
|
85
|
+
$iframe: HTMLIFrameElement;
|
|
86
86
|
/**
|
|
87
87
|
* 加载中元素
|
|
88
88
|
*/
|
|
89
|
-
|
|
89
|
+
$loading: HTMLDivElement;
|
|
90
90
|
/**
|
|
91
91
|
* 内容元素
|
|
92
92
|
*/
|
|
93
|
-
|
|
93
|
+
$content: HTMLDivElement;
|
|
94
94
|
/**
|
|
95
95
|
* panel的右侧容器元素
|
|
96
96
|
*/
|
|
97
|
-
|
|
97
|
+
$panelRightSectionWrapper: HTMLDivElement;
|
|
98
98
|
/**
|
|
99
|
-
*
|
|
99
|
+
* panel侧边栏容器元素
|
|
100
100
|
*/
|
|
101
|
-
|
|
101
|
+
$panelLeftAside: HTMLDivElement;
|
|
102
102
|
/**
|
|
103
|
-
*
|
|
103
|
+
* panel主要区域容器元素
|
|
104
104
|
*/
|
|
105
|
-
|
|
105
|
+
$panelContentSectionContainer: HTMLDivElement;
|
|
106
|
+
/**
|
|
107
|
+
* panel底部区域
|
|
108
|
+
*/
|
|
109
|
+
$panelBottomWrapper: HTMLElement;
|
|
110
|
+
/**
|
|
111
|
+
* panel底部区域容器
|
|
112
|
+
*/
|
|
113
|
+
$panelBottomContainer: HTMLElement;
|
|
114
|
+
/**
|
|
115
|
+
* panel底部区域左侧容器
|
|
116
|
+
*/
|
|
117
|
+
$panelBottomLeftContainer: HTMLElement;
|
|
118
|
+
/**
|
|
119
|
+
* panel底部区域右侧容器
|
|
120
|
+
*/
|
|
121
|
+
$panelBottomRightContainer: HTMLElement;
|
|
106
122
|
/**
|
|
107
123
|
* 内容加载中元素
|
|
108
124
|
*/
|
|
109
|
-
|
|
125
|
+
$contentLoading: HTMLDivElement;
|
|
110
126
|
/**
|
|
111
127
|
* 顶部缩小按钮
|
|
112
128
|
*/
|
|
113
|
-
|
|
129
|
+
$headerBtnMin: HTMLDivElement;
|
|
114
130
|
/**
|
|
115
131
|
* 顶部放大按钮
|
|
116
132
|
*/
|
|
117
|
-
|
|
133
|
+
$headerBtnMax: HTMLDivElement;
|
|
118
134
|
/**
|
|
119
135
|
* 顶部恢复原样按钮
|
|
120
136
|
*/
|
|
121
|
-
|
|
137
|
+
$headerBtnMise: HTMLDivElement;
|
|
122
138
|
/**
|
|
123
139
|
* 顶部关闭按钮
|
|
124
140
|
*/
|
|
125
|
-
|
|
141
|
+
$headerBtnClose: HTMLDivElement;
|
|
126
142
|
/**
|
|
127
143
|
* 文件夹列表元素
|
|
128
144
|
*/
|
|
129
|
-
|
|
145
|
+
$folderList: HTMLDivElement;
|
|
130
146
|
/**
|
|
131
147
|
* 文件夹列表顶部元素
|
|
132
148
|
*/
|
|
133
|
-
|
|
149
|
+
$folderHeaderNav: HTMLDivElement;
|
|
134
150
|
/**
|
|
135
151
|
* 文件夹列表行元素
|
|
136
152
|
*/
|
|
137
|
-
|
|
153
|
+
$folderHeaderRow: HTMLTableRowElement;
|
|
138
154
|
/**
|
|
139
155
|
* 文件夹列表tbody元素
|
|
140
156
|
*/
|
|
141
|
-
|
|
157
|
+
$folderTbody: HTMLTableElement;
|
|
142
158
|
/**
|
|
143
159
|
* 文件夹列表primary元素
|
|
144
160
|
*/
|
|
145
|
-
|
|
161
|
+
$folderHeaderBreadcrumbPrimary: HTMLDivElement;
|
|
146
162
|
/**
|
|
147
163
|
* 文件夹排序按钮-文件名
|
|
148
164
|
*/
|
|
149
|
-
|
|
165
|
+
$folderSortFileName: HTMLDivElement;
|
|
150
166
|
/**
|
|
151
167
|
* 文件夹排序按钮-修改时间
|
|
152
168
|
*/
|
|
153
|
-
|
|
169
|
+
$folderSortLatestTime: HTMLDivElement;
|
|
154
170
|
/**
|
|
155
171
|
* 文件夹排序按钮-文件大小
|
|
156
172
|
*/
|
|
157
|
-
|
|
173
|
+
$folderSortFileSize: HTMLDivElement;
|
|
158
174
|
};
|
|
159
175
|
/**
|
|
160
176
|
* 获取事件配置
|
|
@@ -13,13 +13,15 @@ declare interface Window {
|
|
|
13
13
|
trustedTypes: any;
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
declare type DeepRequired<T> = T extends Function
|
|
16
|
+
declare type DeepRequired<T> = T extends any[]
|
|
18
17
|
? T
|
|
19
|
-
:
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
: // eslint-disable-next-line @typescript-eslint/no-unsafe-function-type
|
|
19
|
+
T extends Function
|
|
20
|
+
? T
|
|
21
|
+
: T extends object
|
|
22
|
+
? T extends Node
|
|
23
|
+
? T
|
|
24
|
+
: {
|
|
25
|
+
[K in keyof T]-?: DeepRequired<T[K]>;
|
|
26
|
+
}
|
|
27
|
+
: T;
|
|
@@ -657,7 +657,7 @@ declare class PopsDOMUtils extends PopsDOMUtilsEvent {
|
|
|
657
657
|
* DOMUtils.parseHTML("<a href='xxxx'></a><a href='xxxx'></a>",true, true)
|
|
658
658
|
* > #document
|
|
659
659
|
*/
|
|
660
|
-
|
|
660
|
+
toElement<T1 extends boolean, T2 extends boolean>(html: string, useParser?: T1, isComplete?: T2): ParseHTMLReturnType<T1, T2>;
|
|
661
661
|
/**
|
|
662
662
|
* 函数在元素内部末尾添加子元素或HTML字符串
|
|
663
663
|
* @param element 目标元素
|
package/package.json
CHANGED
package/src/PopsAnimation.ts
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { PopsCSS } from "./PopsCSS";
|
|
2
2
|
import { popsDOMUtils } from "./utils/PopsDOMUtils";
|
|
3
|
-
import { PopsSafeUtils } from "./utils/PopsSafeUtils";
|
|
4
3
|
import { popsUtils } from "./utils/PopsUtils";
|
|
5
4
|
|
|
6
5
|
export const PopsAnimation = {
|
|
@@ -13,13 +12,14 @@ export const PopsAnimation = {
|
|
|
13
12
|
if (!this.$flag.isInit) {
|
|
14
13
|
this.$flag.isInit = true;
|
|
15
14
|
/* 处理获取当前所有的动画名 */
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
const $style = popsDOMUtils.createElement("style", {
|
|
16
|
+
innerHTML: PopsCSS.anim,
|
|
17
|
+
});
|
|
18
|
+
popsDOMUtils.appendHead($style);
|
|
19
19
|
this.$data = null as any;
|
|
20
|
-
this.$data = popsDOMUtils.getKeyFrames(
|
|
20
|
+
this.$data = popsDOMUtils.getKeyFrames($style.sheet!);
|
|
21
21
|
popsUtils.setTimeout(() => {
|
|
22
|
-
|
|
22
|
+
$style.remove();
|
|
23
23
|
}, 50);
|
|
24
24
|
}
|
|
25
25
|
},
|
|
@@ -82,10 +82,10 @@ export const PopsAlert = {
|
|
|
82
82
|
const $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
|
|
83
83
|
|
|
84
84
|
const {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
btnOkElement,
|
|
88
|
-
|
|
85
|
+
$pops: $pops,
|
|
86
|
+
$headerBtnClose: $headerCloseBtn,
|
|
87
|
+
$btnOk: btnOkElement,
|
|
88
|
+
$title: $title,
|
|
89
89
|
} = PopsHandler.handleQueryElement($anim, popsType);
|
|
90
90
|
|
|
91
91
|
/** 遮罩层元素 */
|
|
@@ -84,12 +84,12 @@ export const PopsConfirm = {
|
|
|
84
84
|
*/
|
|
85
85
|
const $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
|
|
86
86
|
const {
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
87
|
+
$pops: $pops,
|
|
88
|
+
$title: $title,
|
|
89
|
+
$headerBtnClose: $btnClose,
|
|
90
|
+
$btnOk: $btnOk,
|
|
91
|
+
$btnCancel: $btnCancel,
|
|
92
|
+
$btnOther: $btnOther,
|
|
93
93
|
} = PopsHandler.handleQueryElement($anim, popsType);
|
|
94
94
|
/**
|
|
95
95
|
* 遮罩层元素
|
|
@@ -84,8 +84,13 @@ export const PopsDrawer = {
|
|
|
84
84
|
* 弹窗的主元素,包括动画层
|
|
85
85
|
*/
|
|
86
86
|
const $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
|
|
87
|
-
const {
|
|
88
|
-
|
|
87
|
+
const {
|
|
88
|
+
$pops: popsElement,
|
|
89
|
+
$headerBtnClose: headerCloseBtnElement,
|
|
90
|
+
$btnCancel: btnCancelElement,
|
|
91
|
+
$btnOk: btnOkElement,
|
|
92
|
+
$btnOther: btnOtherElement,
|
|
93
|
+
} = PopsHandler.handleQueryElement($anim, popsType);
|
|
89
94
|
const $pops = popsElement!;
|
|
90
95
|
const $headerCloseBtn = headerCloseBtnElement!;
|
|
91
96
|
const $btnCancel = btnCancelElement!;
|
|
@@ -232,21 +232,21 @@ export const PopsFolder = {
|
|
|
232
232
|
*/
|
|
233
233
|
const $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
|
|
234
234
|
const {
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
235
|
+
$pops: $pops,
|
|
236
|
+
$title: $title,
|
|
237
|
+
$content: $content,
|
|
238
238
|
// folderListElement,
|
|
239
239
|
// folderListHeaderElement,
|
|
240
240
|
// folderListHeaderRowElement,
|
|
241
|
-
folderListBodyElement,
|
|
242
|
-
folderFileListBreadcrumbPrimaryElement,
|
|
243
|
-
|
|
244
|
-
btnOkElement,
|
|
245
|
-
btnCancelElement,
|
|
246
|
-
btnOtherElement,
|
|
247
|
-
folderListSortFileNameElement,
|
|
248
|
-
folderListSortLatestTimeElement,
|
|
249
|
-
folderListSortFileSizeElement,
|
|
241
|
+
$folderTbody: folderListBodyElement,
|
|
242
|
+
$folderHeaderBreadcrumbPrimary: folderFileListBreadcrumbPrimaryElement,
|
|
243
|
+
$headerBtnClose: $btnCloseBtn,
|
|
244
|
+
$btnOk: btnOkElement,
|
|
245
|
+
$btnCancel: btnCancelElement,
|
|
246
|
+
$btnOther: btnOtherElement,
|
|
247
|
+
$folderSortFileName: folderListSortFileNameElement,
|
|
248
|
+
$folderSortLatestTime: folderListSortLatestTimeElement,
|
|
249
|
+
$folderSortFileSize: folderListSortFileSizeElement,
|
|
250
250
|
} = PopsHandler.handleQueryElement($anim, popsType);
|
|
251
251
|
|
|
252
252
|
/**
|
|
@@ -681,14 +681,14 @@ export const PopsFolder = {
|
|
|
681
681
|
}
|
|
682
682
|
if (downloadInfo.mode === "a" || downloadInfo.mode === "aBlank") {
|
|
683
683
|
/* a标签下载 */
|
|
684
|
-
const
|
|
684
|
+
const $anchor = popsDOMUtils.createElement("a");
|
|
685
685
|
|
|
686
686
|
if (downloadInfo.mode === "aBlank") {
|
|
687
|
-
|
|
687
|
+
$anchor.setAttribute("target", "_blank");
|
|
688
688
|
}
|
|
689
689
|
|
|
690
|
-
|
|
691
|
-
|
|
690
|
+
$anchor.href = downloadInfo.url;
|
|
691
|
+
$anchor.click();
|
|
692
692
|
} else if (downloadInfo.mode === "open" || downloadInfo.mode === "openBlank") {
|
|
693
693
|
/* window.open下载 */
|
|
694
694
|
|
|
@@ -699,18 +699,18 @@ export const PopsFolder = {
|
|
|
699
699
|
}
|
|
700
700
|
} else if (downloadInfo.mode === "iframe") {
|
|
701
701
|
/* iframe下载 */
|
|
702
|
-
const
|
|
702
|
+
const $downloadIframe = popsDOMUtils.createElement("iframe");
|
|
703
703
|
|
|
704
|
-
|
|
705
|
-
|
|
704
|
+
$downloadIframe.src = downloadInfo.url;
|
|
705
|
+
$downloadIframe.onload = function () {
|
|
706
706
|
popsUtils.setTimeout(() => {
|
|
707
|
-
|
|
707
|
+
$downloadIframe.remove();
|
|
708
708
|
}, 1000);
|
|
709
709
|
};
|
|
710
|
-
$shadowRoot.appendChild(
|
|
710
|
+
$shadowRoot.appendChild($downloadIframe);
|
|
711
711
|
popsUtils.setTimeout(
|
|
712
712
|
() => {
|
|
713
|
-
|
|
713
|
+
$downloadIframe.remove();
|
|
714
714
|
},
|
|
715
715
|
3 * 60 * 1000
|
|
716
716
|
);
|
|
@@ -92,21 +92,22 @@ export const PopsIframe = {
|
|
|
92
92
|
|
|
93
93
|
const $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
|
|
94
94
|
const {
|
|
95
|
-
|
|
96
|
-
headerCloseBtnElement,
|
|
97
|
-
headerControlsElement,
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
loadingElement,
|
|
101
|
-
|
|
102
|
-
headerMinBtnElement,
|
|
103
|
-
headerMaxBtnElement,
|
|
104
|
-
headerMiseBtnElement,
|
|
95
|
+
$pops: $pops,
|
|
96
|
+
$headerBtnClose: headerCloseBtnElement,
|
|
97
|
+
$headerControls: headerControlsElement,
|
|
98
|
+
$title: $title,
|
|
99
|
+
$iframe: $iframe,
|
|
100
|
+
$loading: loadingElement,
|
|
101
|
+
$contentLoading: $contentLoading,
|
|
102
|
+
$headerBtnMin: headerMinBtnElement,
|
|
103
|
+
$headerBtnMax: headerMaxBtnElement,
|
|
104
|
+
$headerBtnMise: headerMiseBtnElement,
|
|
105
105
|
} = PopsHandler.handleQueryElement($anim, popsType);
|
|
106
106
|
let $iframeContainer = PopsCore.document.querySelector<HTMLDivElement>(".pops-iframe-container");
|
|
107
107
|
if (!$iframeContainer) {
|
|
108
|
-
$iframeContainer =
|
|
109
|
-
|
|
108
|
+
$iframeContainer = popsDOMUtils.createElement("div", {
|
|
109
|
+
className: "pops-iframe-container",
|
|
110
|
+
});
|
|
110
111
|
$iframeContainer.style.cssText =
|
|
111
112
|
"display: flex;position: fixed;bottom: 0px;flex-flow: wrap-reverse;-webkit-user-select: none;-moz-user-select: none;-ms-user-select: none;user-select: none;";
|
|
112
113
|
popsDOMUtils.appendBody($iframeContainer);
|
|
@@ -52,7 +52,7 @@ export const PopsLoading = {
|
|
|
52
52
|
|
|
53
53
|
const $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
|
|
54
54
|
|
|
55
|
-
const {
|
|
55
|
+
const { $pops: $pops } = PopsHandler.handleQueryElement($anim, PopsType);
|
|
56
56
|
/**
|
|
57
57
|
* 遮罩层元素
|
|
58
58
|
*/
|
|
@@ -32,7 +32,11 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
32
32
|
className: "panel-switch",
|
|
33
33
|
text: "switch",
|
|
34
34
|
type: "switch",
|
|
35
|
-
|
|
35
|
+
disabled: false,
|
|
36
|
+
description: "",
|
|
37
|
+
afterAddToUListCallBack() {
|
|
38
|
+
// TODO
|
|
39
|
+
},
|
|
36
40
|
props: {},
|
|
37
41
|
attributes: [],
|
|
38
42
|
getValue() {
|
|
@@ -46,7 +50,16 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
46
50
|
className: "panel-slider",
|
|
47
51
|
text: "slider",
|
|
48
52
|
type: "slider",
|
|
49
|
-
|
|
53
|
+
description: "",
|
|
54
|
+
afterAddToUListCallBack() {
|
|
55
|
+
// TODO
|
|
56
|
+
},
|
|
57
|
+
disabled: false,
|
|
58
|
+
getToolTipContent(value) {
|
|
59
|
+
return String(value);
|
|
60
|
+
},
|
|
61
|
+
isShowHoverTip: true,
|
|
62
|
+
step: 1,
|
|
50
63
|
props: {},
|
|
51
64
|
attributes: [],
|
|
52
65
|
getValue() {
|
|
@@ -62,8 +75,13 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
62
75
|
className: "panel-button",
|
|
63
76
|
text: "button",
|
|
64
77
|
type: "button",
|
|
65
|
-
|
|
78
|
+
description: "",
|
|
79
|
+
disable: false,
|
|
80
|
+
buttonIsRightIcon: false,
|
|
66
81
|
props: {},
|
|
82
|
+
afterAddToUListCallBack() {
|
|
83
|
+
// TODO
|
|
84
|
+
},
|
|
67
85
|
attributes: [],
|
|
68
86
|
buttonIcon: "view",
|
|
69
87
|
buttonIconIsLoading: true,
|
|
@@ -77,7 +95,6 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
77
95
|
className: "panel-button",
|
|
78
96
|
text: "button",
|
|
79
97
|
type: "button",
|
|
80
|
-
// @ts-ignore
|
|
81
98
|
props: {},
|
|
82
99
|
attributes: [],
|
|
83
100
|
buttonIcon: "eleme",
|
|
@@ -138,7 +155,7 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
138
155
|
className: "panel-input",
|
|
139
156
|
text: "input",
|
|
140
157
|
type: "input",
|
|
141
|
-
|
|
158
|
+
isNumber: false,
|
|
142
159
|
props: {},
|
|
143
160
|
attributes: [],
|
|
144
161
|
getValue() {
|
|
@@ -480,6 +497,42 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
480
497
|
},
|
|
481
498
|
},
|
|
482
499
|
],
|
|
500
|
+
bottomContentConfig: [
|
|
501
|
+
{
|
|
502
|
+
text: "Github",
|
|
503
|
+
position: "left",
|
|
504
|
+
className: "user-home",
|
|
505
|
+
attributes: {
|
|
506
|
+
"data-url": "https://github.com/whitesevs",
|
|
507
|
+
},
|
|
508
|
+
props: {
|
|
509
|
+
"data-test": 1,
|
|
510
|
+
},
|
|
511
|
+
disableHoverCSS: false,
|
|
512
|
+
clickCallback() {
|
|
513
|
+
const userHomeUrl = (this.attributes as { [key: string]: any })["data-url"];
|
|
514
|
+
console.log("打开个人主页:" + userHomeUrl);
|
|
515
|
+
window.open(userHomeUrl, "_blank");
|
|
516
|
+
},
|
|
517
|
+
afterRender(config) {
|
|
518
|
+
console.log(config);
|
|
519
|
+
},
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
text: "0.0.1",
|
|
523
|
+
position: "right",
|
|
524
|
+
className: "script-version",
|
|
525
|
+
attributes: {},
|
|
526
|
+
props: {},
|
|
527
|
+
disableHoverCSS: true,
|
|
528
|
+
clickCallback() {
|
|
529
|
+
console.log("当前版本:" + this.text);
|
|
530
|
+
},
|
|
531
|
+
afterRender(config) {
|
|
532
|
+
console.log(config);
|
|
533
|
+
},
|
|
534
|
+
},
|
|
535
|
+
],
|
|
483
536
|
btn: {
|
|
484
537
|
close: {
|
|
485
538
|
enable: true,
|