@whitesev/pops 2.2.8 → 2.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.
- package/dist/index.amd.js +2817 -3012
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +2817 -3012
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +2817 -3012
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +2817 -3012
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +2817 -3012
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +2817 -3012
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +497 -192
- package/dist/types/src/PopsIcon.d.ts +2 -2
- package/dist/types/src/components/panel/index.d.ts +1 -1
- package/dist/types/src/components/rightClickMenu/index.d.ts +487 -182
- package/dist/types/src/components/tooltip/index.d.ts +2 -2
- package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +256 -259
- package/dist/types/src/types/animation.d.ts +19 -19
- package/dist/types/src/types/button.d.ts +187 -196
- package/dist/types/src/types/components.d.ts +213 -229
- package/dist/types/src/types/event.d.ts +63 -63
- package/dist/types/src/types/global.d.ts +20 -20
- 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 +114 -122
- package/dist/types/src/types/mask.d.ts +49 -49
- package/dist/types/src/types/position.d.ts +60 -60
- package/package.json +13 -8
- package/src/Pops.ts +0 -209
- package/src/PopsAnimation.ts +0 -32
- package/src/PopsCSS.ts +0 -51
- package/src/PopsCore.ts +0 -44
- package/src/PopsIcon.ts +0 -95
- package/src/PopsInst.ts +0 -21
- package/src/components/alert/config.ts +0 -62
- package/src/components/alert/index.css +0 -0
- package/src/components/alert/index.ts +0 -181
- package/src/components/alert/types/index.ts +0 -30
- package/src/components/confirm/config.ts +0 -90
- package/src/components/confirm/index.css +0 -0
- package/src/components/confirm/index.ts +0 -192
- package/src/components/confirm/types/index.ts +0 -17
- package/src/components/drawer/config.ts +0 -89
- package/src/components/drawer/index.css +0 -35
- package/src/components/drawer/index.ts +0 -260
- package/src/components/drawer/types/index.ts +0 -61
- package/src/components/folder/config.ts +0 -147
- package/src/components/folder/folderIcon.ts +0 -28
- package/src/components/folder/index.css +0 -314
- package/src/components/folder/index.ts +0 -1050
- package/src/components/folder/types/index.ts +0 -101
- package/src/components/iframe/config.ts +0 -60
- package/src/components/iframe/index.css +0 -75
- package/src/components/iframe/index.ts +0 -351
- package/src/components/iframe/types/index.ts +0 -146
- package/src/components/loading/config.ts +0 -29
- package/src/components/loading/index.css +0 -66
- package/src/components/loading/index.ts +0 -114
- package/src/components/loading/types/index.ts +0 -40
- package/src/components/panel/config.ts +0 -550
- package/src/components/panel/handlerComponents.ts +0 -3277
- package/src/components/panel/index.css +0 -1292
- package/src/components/panel/index.ts +0 -213
- package/src/components/panel/types/components-button.ts +0 -69
- package/src/components/panel/types/components-common.ts +0 -55
- package/src/components/panel/types/components-deepMenu.ts +0 -85
- package/src/components/panel/types/components-forms.ts +0 -45
- package/src/components/panel/types/components-input.ts +0 -82
- package/src/components/panel/types/components-own.ts +0 -31
- package/src/components/panel/types/components-select.ts +0 -101
- package/src/components/panel/types/components-selectMultiple.ts +0 -133
- package/src/components/panel/types/components-slider.ts +0 -78
- package/src/components/panel/types/components-switch.ts +0 -57
- package/src/components/panel/types/components-textarea.ts +0 -69
- package/src/components/panel/types/index.ts +0 -177
- package/src/components/prompt/config.ts +0 -94
- package/src/components/prompt/index.css +0 -34
- package/src/components/prompt/index.ts +0 -222
- package/src/components/prompt/types/index.ts +0 -55
- package/src/components/rightClickMenu/config.ts +0 -130
- package/src/components/rightClickMenu/index.css +0 -88
- package/src/components/rightClickMenu/index.ts +0 -689
- package/src/components/rightClickMenu/types/index.ts +0 -91
- package/src/components/searchSuggestion/config.ts +0 -59
- package/src/components/searchSuggestion/index.ts +0 -708
- package/src/components/searchSuggestion/types/index.ts +0 -147
- package/src/components/tooltip/config.ts +0 -34
- package/src/components/tooltip/index.css +0 -196
- package/src/components/tooltip/index.ts +0 -655
- package/src/components/tooltip/types/index.ts +0 -125
- package/src/config/CommonCSSClassName.ts +0 -17
- package/src/config/GlobalConfig.ts +0 -80
- package/src/css/animation.css +0 -2245
- package/src/css/button.css +0 -542
- package/src/css/common.css +0 -52
- package/src/css/index.css +0 -254
- package/src/css/ninePalaceGridPosition.css +0 -50
- package/src/css/scrollbar.css +0 -22
- package/src/handler/PopsElementHandler.ts +0 -325
- package/src/handler/PopsHandler.ts +0 -719
- package/src/svg/arrowLeft.svg +0 -4
- package/src/svg/arrowRight.svg +0 -4
- package/src/svg/chromeFilled.svg +0 -14
- package/src/svg/circleClose.svg +0 -8
- package/src/svg/close.svg +0 -5
- package/src/svg/cpu.svg +0 -8
- package/src/svg/delete.svg +0 -5
- package/src/svg/documentCopy.svg +0 -5
- package/src/svg/edit.svg +0 -8
- package/src/svg/eleme.svg +0 -5
- package/src/svg/elemePlus.svg +0 -5
- package/src/svg/headset.svg +0 -5
- package/src/svg/hide.svg +0 -8
- package/src/svg/keyboard.svg +0 -8
- package/src/svg/loading.svg +0 -5
- package/src/svg/max.svg +0 -5
- package/src/svg/min.svg +0 -5
- package/src/svg/mise.svg +0 -5
- package/src/svg/monitor.svg +0 -5
- package/src/svg/next.svg +0 -5
- package/src/svg/picture.svg +0 -8
- package/src/svg/prev.svg +0 -5
- package/src/svg/search.svg +0 -5
- package/src/svg/share.svg +0 -5
- package/src/svg/upload.svg +0 -5
- package/src/svg/videoPause.svg +0 -5
- package/src/svg/videoPlay.svg +0 -5
- package/src/svg/view.svg +0 -5
- package/src/types/PopsDOMUtilsEventType.d.ts +0 -259
- package/src/types/animation.d.ts +0 -19
- package/src/types/button.d.ts +0 -196
- package/src/types/components.d.ts +0 -229
- package/src/types/event.d.ts +0 -63
- package/src/types/global.d.ts +0 -20
- package/src/types/icon.d.ts +0 -32
- package/src/types/inst.d.ts +0 -24
- package/src/types/main.d.ts +0 -122
- package/src/types/mask.d.ts +0 -49
- package/src/types/position.d.ts +0 -60
- package/src/utils/PopsDOMUtils.ts +0 -2649
- package/src/utils/PopsDOMUtilsEventsConfig.ts +0 -6
- package/src/utils/PopsInstanceUtils.ts +0 -801
- package/src/utils/PopsMathUtils.ts +0 -77
- package/src/utils/PopsSafeUtils.ts +0 -24
- package/src/utils/PopsUtils.ts +0 -430
|
@@ -1,222 +0,0 @@
|
|
|
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 { PopsPromptConfig } from "./config";
|
|
10
|
-
import type { PopsPromptDetails } from "./types/index";
|
|
11
|
-
|
|
12
|
-
export const PopsPrompt = {
|
|
13
|
-
init(details: PopsPromptDetails) {
|
|
14
|
-
const guid = popsUtils.getRandomGUID();
|
|
15
|
-
// 设置当前类型
|
|
16
|
-
const popsType: PopsType = "prompt";
|
|
17
|
-
|
|
18
|
-
let config = PopsPromptConfig();
|
|
19
|
-
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
20
|
-
config = popsUtils.assign(config, details);
|
|
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: "promptCSS",
|
|
51
|
-
css: PopsCSS.promptCSS,
|
|
52
|
-
},
|
|
53
|
-
]);
|
|
54
|
-
|
|
55
|
-
// 先把z-index提取出来
|
|
56
|
-
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
57
|
-
let maskHTML = PopsElementHandler.createMask(guid, zIndex);
|
|
58
|
-
|
|
59
|
-
let headerBtnHTML = PopsElementHandler.createHeader(popsType, config);
|
|
60
|
-
let bottomBtnHTML = PopsElementHandler.createBottom(popsType, config);
|
|
61
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.createHeaderStyle(
|
|
62
|
-
popsType,
|
|
63
|
-
config
|
|
64
|
-
);
|
|
65
|
-
let { contentPStyle } = PopsElementHandler.createContentStyle(
|
|
66
|
-
popsType,
|
|
67
|
-
config
|
|
68
|
-
);
|
|
69
|
-
let animHTML = PopsElementHandler.createAnim(
|
|
70
|
-
guid,
|
|
71
|
-
popsType,
|
|
72
|
-
config,
|
|
73
|
-
/*html*/ `
|
|
74
|
-
<div class="pops-title pops-${popsType}-title" style="text-align: ${
|
|
75
|
-
config.title.position
|
|
76
|
-
};${headerStyle}">${
|
|
77
|
-
config.title.html
|
|
78
|
-
? config.title.text
|
|
79
|
-
: `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`
|
|
80
|
-
}${headerBtnHTML}</div>
|
|
81
|
-
<div class="pops-content pops-${popsType}-content" style="${contentPStyle}">${
|
|
82
|
-
config.content.row
|
|
83
|
-
? '<textarea name="pops-input-text" pops="" placeholder="' +
|
|
84
|
-
config.content.placeholder +
|
|
85
|
-
'"></textarea>'
|
|
86
|
-
: '<input name="pops-input-text" pops="" placeholder="' +
|
|
87
|
-
config.content.placeholder +
|
|
88
|
-
'" type="' +
|
|
89
|
-
(config.content.password ? "password" : "text") +
|
|
90
|
-
'">'
|
|
91
|
-
}</div>${bottomBtnHTML}`,
|
|
92
|
-
bottomBtnHTML,
|
|
93
|
-
zIndex
|
|
94
|
-
);
|
|
95
|
-
/**
|
|
96
|
-
* 弹窗的主元素,包括动画层
|
|
97
|
-
*/
|
|
98
|
-
|
|
99
|
-
let $anim = PopsElementHandler.parseElement<HTMLDivElement>(animHTML);
|
|
100
|
-
|
|
101
|
-
let {
|
|
102
|
-
popsElement: $pops,
|
|
103
|
-
inputElement: $input,
|
|
104
|
-
headerCloseBtnElement: $btnClose,
|
|
105
|
-
btnOkElement: $btnOk,
|
|
106
|
-
btnCancelElement: $btnCancel,
|
|
107
|
-
btnOtherElement: $btnOther,
|
|
108
|
-
titleElement: $title,
|
|
109
|
-
} = PopsHandler.handleQueryElement($anim, popsType);
|
|
110
|
-
/**
|
|
111
|
-
* 遮罩层元素
|
|
112
|
-
*/
|
|
113
|
-
let $mask: HTMLDivElement | null = null;
|
|
114
|
-
|
|
115
|
-
/**
|
|
116
|
-
* 已创建的元素列表
|
|
117
|
-
*/
|
|
118
|
-
let elementList: HTMLElement[] = [$anim];
|
|
119
|
-
|
|
120
|
-
if (config.mask.enable) {
|
|
121
|
-
// 启用遮罩层
|
|
122
|
-
let _handleMask_ = PopsHandler.handleMask({
|
|
123
|
-
type: popsType,
|
|
124
|
-
guid: guid,
|
|
125
|
-
config: config,
|
|
126
|
-
animElement: $anim,
|
|
127
|
-
maskHTML: maskHTML,
|
|
128
|
-
});
|
|
129
|
-
$mask = _handleMask_.maskElement;
|
|
130
|
-
elementList.push($mask);
|
|
131
|
-
}
|
|
132
|
-
let eventDetails = PopsHandler.handleEventDetails(
|
|
133
|
-
guid,
|
|
134
|
-
$shadowContainer,
|
|
135
|
-
$shadowRoot,
|
|
136
|
-
popsType,
|
|
137
|
-
$anim,
|
|
138
|
-
|
|
139
|
-
$pops!,
|
|
140
|
-
$mask!,
|
|
141
|
-
config
|
|
142
|
-
);
|
|
143
|
-
/* 输入框赋值初始值 */
|
|
144
|
-
|
|
145
|
-
$input!.value = config.content.text;
|
|
146
|
-
PopsHandler.handlePromptClickEvent(
|
|
147
|
-
"close",
|
|
148
|
-
$input!,
|
|
149
|
-
$btnClose!,
|
|
150
|
-
eventDetails,
|
|
151
|
-
|
|
152
|
-
config.btn.close!.callback!
|
|
153
|
-
);
|
|
154
|
-
|
|
155
|
-
PopsHandler.handlePromptClickEvent(
|
|
156
|
-
"ok",
|
|
157
|
-
$input!,
|
|
158
|
-
$btnOk!,
|
|
159
|
-
eventDetails,
|
|
160
|
-
|
|
161
|
-
config.btn.ok!.callback!
|
|
162
|
-
);
|
|
163
|
-
PopsHandler.handlePromptClickEvent(
|
|
164
|
-
"cancel",
|
|
165
|
-
$input!,
|
|
166
|
-
$btnCancel!,
|
|
167
|
-
eventDetails,
|
|
168
|
-
|
|
169
|
-
config.btn.cancel!.callback!
|
|
170
|
-
);
|
|
171
|
-
|
|
172
|
-
PopsHandler.handlePromptClickEvent(
|
|
173
|
-
"other",
|
|
174
|
-
$input!,
|
|
175
|
-
$btnOther!,
|
|
176
|
-
eventDetails,
|
|
177
|
-
|
|
178
|
-
config.btn.other!.callback!
|
|
179
|
-
);
|
|
180
|
-
/* 创建到页面中 */
|
|
181
|
-
|
|
182
|
-
popsDOMUtils.append($shadowRoot, elementList);
|
|
183
|
-
if (typeof config.beforeAppendToPageCallBack === "function") {
|
|
184
|
-
config.beforeAppendToPageCallBack($shadowRoot, $shadowContainer);
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
popsDOMUtils.appendBody($shadowContainer);
|
|
188
|
-
if ($mask != null) {
|
|
189
|
-
$anim.after($mask);
|
|
190
|
-
}
|
|
191
|
-
PopsHandler.handlePush(popsType, {
|
|
192
|
-
guid: guid,
|
|
193
|
-
animElement: $anim,
|
|
194
|
-
|
|
195
|
-
popsElement: $pops!,
|
|
196
|
-
|
|
197
|
-
maskElement: $mask!,
|
|
198
|
-
$shadowContainer: $shadowContainer,
|
|
199
|
-
$shadowRoot: $shadowRoot,
|
|
200
|
-
});
|
|
201
|
-
/* 拖拽 */
|
|
202
|
-
if (config.drag) {
|
|
203
|
-
PopsInstanceUtils.drag($pops!, {
|
|
204
|
-
dragElement: $title!,
|
|
205
|
-
limit: config.dragLimit,
|
|
206
|
-
extraDistance: config.dragExtraDistance,
|
|
207
|
-
moveCallBack: config.dragMoveCallBack,
|
|
208
|
-
endCallBack: config.dragEndCallBack,
|
|
209
|
-
});
|
|
210
|
-
}
|
|
211
|
-
/* 设置自动获取焦点 */
|
|
212
|
-
if (config.content.focus) {
|
|
213
|
-
$input.focus();
|
|
214
|
-
}
|
|
215
|
-
/* 设置自动选中所有文字 */
|
|
216
|
-
if (config.content.select) {
|
|
217
|
-
$input.select();
|
|
218
|
-
}
|
|
219
|
-
let result = PopsHandler.handleResultDetails(eventDetails);
|
|
220
|
-
return result;
|
|
221
|
-
},
|
|
222
|
-
};
|
|
@@ -1,55 +0,0 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
PopsTitleConfig,
|
|
3
|
-
PopsDragConfig,
|
|
4
|
-
PopsCommonConfig,
|
|
5
|
-
PopsMoreButtonConfig,
|
|
6
|
-
} from "../../../types/components";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* pops.prompt
|
|
10
|
-
*/
|
|
11
|
-
export interface PopsPromptDetails
|
|
12
|
-
extends PopsTitleConfig,
|
|
13
|
-
PopsDragConfig,
|
|
14
|
-
PopsMoreButtonConfig<{
|
|
15
|
-
text: string;
|
|
16
|
-
}>,
|
|
17
|
-
PopsCommonConfig {
|
|
18
|
-
/**
|
|
19
|
-
* 内容配置
|
|
20
|
-
*/
|
|
21
|
-
content: {
|
|
22
|
-
/**
|
|
23
|
-
* 内容文字
|
|
24
|
-
*/
|
|
25
|
-
text: string;
|
|
26
|
-
/**
|
|
27
|
-
* 是否是密码
|
|
28
|
-
*/
|
|
29
|
-
password?: boolean;
|
|
30
|
-
/**
|
|
31
|
-
* 是否支持多行输入
|
|
32
|
-
* @default false
|
|
33
|
-
*/
|
|
34
|
-
row?: boolean;
|
|
35
|
-
/**
|
|
36
|
-
* 是否自动获取焦点
|
|
37
|
-
* @default true
|
|
38
|
-
*/
|
|
39
|
-
focus?: boolean;
|
|
40
|
-
/**
|
|
41
|
-
* 是否自动选择输入框的所有文字
|
|
42
|
-
* @default false
|
|
43
|
-
*/
|
|
44
|
-
select?: boolean;
|
|
45
|
-
/**
|
|
46
|
-
* 输入框内的提示文字
|
|
47
|
-
* @default ""
|
|
48
|
-
*/
|
|
49
|
-
placeholder?: string;
|
|
50
|
-
/**
|
|
51
|
-
* (可选)文字的自定义CSS
|
|
52
|
-
*/
|
|
53
|
-
style?: string;
|
|
54
|
-
};
|
|
55
|
-
}
|
|
@@ -1,130 +0,0 @@
|
|
|
1
|
-
import { PopsIcon } from "../../PopsIcon";
|
|
2
|
-
import type { PopsRightClickMenuDetails } from "./types";
|
|
3
|
-
|
|
4
|
-
export const rightClickMenuConfig =
|
|
5
|
-
(): DeepRequired<PopsRightClickMenuDetails> => {
|
|
6
|
-
return {
|
|
7
|
-
target: document.documentElement,
|
|
8
|
-
targetSelector: null,
|
|
9
|
-
data: [
|
|
10
|
-
{
|
|
11
|
-
icon: PopsIcon.getIcon("search")!,
|
|
12
|
-
iconIsLoading: false,
|
|
13
|
-
text: "搜索",
|
|
14
|
-
item: [],
|
|
15
|
-
callback(clickEvent, contextMenuEvent, liElement) {
|
|
16
|
-
console.log("点击:" + this.text, [
|
|
17
|
-
clickEvent,
|
|
18
|
-
contextMenuEvent,
|
|
19
|
-
liElement,
|
|
20
|
-
]);
|
|
21
|
-
},
|
|
22
|
-
},
|
|
23
|
-
{
|
|
24
|
-
icon: PopsIcon.getIcon("documentCopy")!,
|
|
25
|
-
iconIsLoading: false,
|
|
26
|
-
text: "复制",
|
|
27
|
-
item: [],
|
|
28
|
-
callback(clickEvent, contextMenuEvent, liElement) {
|
|
29
|
-
console.log("点击:" + this.text, [
|
|
30
|
-
clickEvent,
|
|
31
|
-
contextMenuEvent,
|
|
32
|
-
liElement,
|
|
33
|
-
]);
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
{
|
|
37
|
-
icon: PopsIcon.getIcon("delete")!,
|
|
38
|
-
text: "删除",
|
|
39
|
-
iconIsLoading: false,
|
|
40
|
-
item: [],
|
|
41
|
-
callback(clickEvent, contextMenuEvent, liElement) {
|
|
42
|
-
console.log("点击:" + this.text, [
|
|
43
|
-
clickEvent,
|
|
44
|
-
contextMenuEvent,
|
|
45
|
-
liElement,
|
|
46
|
-
]);
|
|
47
|
-
},
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
icon: PopsIcon.getIcon("loading")!,
|
|
51
|
-
iconIsLoading: true,
|
|
52
|
-
text: "加载",
|
|
53
|
-
item: [],
|
|
54
|
-
callback(clickEvent, contextMenuEvent, liElement) {
|
|
55
|
-
console.log("点击:" + this.text, [
|
|
56
|
-
clickEvent,
|
|
57
|
-
contextMenuEvent,
|
|
58
|
-
liElement,
|
|
59
|
-
]);
|
|
60
|
-
return false;
|
|
61
|
-
},
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
icon: PopsIcon.getIcon("elemePlus")!,
|
|
65
|
-
iconIsLoading: true,
|
|
66
|
-
text: "饿了么",
|
|
67
|
-
callback(clickEvent, contextMenuEvent, liElement) {
|
|
68
|
-
console.log("点击:" + this.text, [
|
|
69
|
-
clickEvent,
|
|
70
|
-
contextMenuEvent,
|
|
71
|
-
liElement,
|
|
72
|
-
]);
|
|
73
|
-
return false;
|
|
74
|
-
},
|
|
75
|
-
item: [
|
|
76
|
-
{
|
|
77
|
-
icon: "",
|
|
78
|
-
iconIsLoading: false,
|
|
79
|
-
text: "处理文件",
|
|
80
|
-
item: [],
|
|
81
|
-
callback(clickEvent, contextMenuEvent, liElement) {
|
|
82
|
-
console.log("点击:" + this.text, [
|
|
83
|
-
clickEvent,
|
|
84
|
-
contextMenuEvent,
|
|
85
|
-
liElement,
|
|
86
|
-
]);
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
icon: "",
|
|
91
|
-
iconIsLoading: false,
|
|
92
|
-
text: "其它处理",
|
|
93
|
-
callback(clickEvent, contextMenuEvent, liElement) {
|
|
94
|
-
console.log("点击:" + this.text, [
|
|
95
|
-
clickEvent,
|
|
96
|
-
contextMenuEvent,
|
|
97
|
-
liElement,
|
|
98
|
-
]);
|
|
99
|
-
},
|
|
100
|
-
item: [
|
|
101
|
-
{
|
|
102
|
-
icon: PopsIcon.getIcon("view")!,
|
|
103
|
-
iconIsLoading: false,
|
|
104
|
-
text: "查看",
|
|
105
|
-
item: [],
|
|
106
|
-
callback(clickEvent, contextMenuEvent, liElement) {
|
|
107
|
-
console.log("点击:" + this.text, [
|
|
108
|
-
clickEvent,
|
|
109
|
-
contextMenuEvent,
|
|
110
|
-
liElement,
|
|
111
|
-
]);
|
|
112
|
-
},
|
|
113
|
-
},
|
|
114
|
-
],
|
|
115
|
-
},
|
|
116
|
-
],
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
chileMenuLeftOrRightDistance: 0,
|
|
120
|
-
childMenuTopOrBottomDistance: 0,
|
|
121
|
-
useShadowRoot: true,
|
|
122
|
-
className: "",
|
|
123
|
-
isAnimation: true,
|
|
124
|
-
only: false,
|
|
125
|
-
zIndex: 10000,
|
|
126
|
-
preventDefault: true,
|
|
127
|
-
style: null,
|
|
128
|
-
beforeAppendToPageCallBack() {},
|
|
129
|
-
};
|
|
130
|
-
};
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
.pops-rightClickMenu {
|
|
2
|
-
--pops-right-context-color: #000000;
|
|
3
|
-
--pops-right-context-bg-color: #ffffff;
|
|
4
|
-
--pops-right-context-z-index: 10000;
|
|
5
|
-
--pops-right-context-menu-shadow-color: #cacaca;
|
|
6
|
-
--pops-right-context-menu-row-visited-color: #dfdfdf;
|
|
7
|
-
--pops-right-context-menu-row-hover-color: #dfdfdf;
|
|
8
|
-
}
|
|
9
|
-
.pops-rightClickMenu * {
|
|
10
|
-
-webkit-box-sizing: border-box;
|
|
11
|
-
box-sizing: border-box;
|
|
12
|
-
margin: 0;
|
|
13
|
-
padding: 0;
|
|
14
|
-
-webkit-tap-highlight-color: transparent;
|
|
15
|
-
scrollbar-width: thin;
|
|
16
|
-
}
|
|
17
|
-
.pops-rightClickMenu {
|
|
18
|
-
position: fixed;
|
|
19
|
-
z-index: var(--pops-right-context-z-index);
|
|
20
|
-
text-align: center;
|
|
21
|
-
border-radius: 3px;
|
|
22
|
-
font-size: 16px;
|
|
23
|
-
font-weight: 500;
|
|
24
|
-
color: var(--pops-right-context-color);
|
|
25
|
-
background-color: var(--pops-right-context-bg-color);
|
|
26
|
-
box-shadow: 0px 1px 6px 1px var(--pops-right-context-menu-shadow-color);
|
|
27
|
-
}
|
|
28
|
-
.pops-rightClickMenu-anim-grid {
|
|
29
|
-
display: grid;
|
|
30
|
-
transition: 0.3s;
|
|
31
|
-
grid-template-rows: 0fr;
|
|
32
|
-
}
|
|
33
|
-
.pops-rightClickMenu-anim-show {
|
|
34
|
-
grid-template-rows: 1fr;
|
|
35
|
-
}
|
|
36
|
-
.pops-rightClickMenu-is-visited {
|
|
37
|
-
background: var(--pops-right-context-menu-row-visited-color);
|
|
38
|
-
}
|
|
39
|
-
i.pops-rightClickMenu-icon {
|
|
40
|
-
height: 1em;
|
|
41
|
-
width: 1em;
|
|
42
|
-
line-height: normal;
|
|
43
|
-
align-content: center;
|
|
44
|
-
display: inline-flex;
|
|
45
|
-
justify-content: center;
|
|
46
|
-
align-items: center;
|
|
47
|
-
position: relative;
|
|
48
|
-
fill: currentColor;
|
|
49
|
-
color: inherit;
|
|
50
|
-
font-size: inherit;
|
|
51
|
-
margin-right: 6px;
|
|
52
|
-
}
|
|
53
|
-
i.pops-rightClickMenu-icon[is-loading="true"] {
|
|
54
|
-
animation: rotating 2s linear infinite;
|
|
55
|
-
}
|
|
56
|
-
.pops-rightClickMenu li:hover {
|
|
57
|
-
background: var(--pops-right-context-menu-row-hover-color);
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
}
|
|
60
|
-
.pops-rightClickMenu ul {
|
|
61
|
-
margin: 0;
|
|
62
|
-
padding: 0;
|
|
63
|
-
display: flex;
|
|
64
|
-
flex-direction: column;
|
|
65
|
-
align-items: flex-start;
|
|
66
|
-
justify-content: center;
|
|
67
|
-
overflow: hidden;
|
|
68
|
-
}
|
|
69
|
-
.pops-rightClickMenu ul li {
|
|
70
|
-
padding: 5px 10px;
|
|
71
|
-
margin: 5px 5px;
|
|
72
|
-
border-radius: 3px;
|
|
73
|
-
display: flex;
|
|
74
|
-
width: -webkit-fill-available;
|
|
75
|
-
width: -moz-available;
|
|
76
|
-
text-align: left;
|
|
77
|
-
user-select: none;
|
|
78
|
-
-webkit-user-select: none;
|
|
79
|
-
-moz-user-select: none;
|
|
80
|
-
-ms-user-select: none;
|
|
81
|
-
align-items: center;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
@media (prefers-color-scheme: dark) {
|
|
85
|
-
.pops-rightClickMenu {
|
|
86
|
-
--pops-right-context-menu-shadow-color: #3c3c3c;
|
|
87
|
-
}
|
|
88
|
-
}
|