@whitesev/pops 2.2.1 → 2.2.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 +256 -257
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +256 -257
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +256 -257
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +256 -257
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +256 -257
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +256 -257
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +1 -1
- package/dist/types/src/components/panel/index.d.ts +2 -1
- package/dist/types/src/components/searchSuggestion/index.d.ts +1 -1
- package/dist/types/src/handler/PopsElementHandler.d.ts +6 -6
- package/dist/types/src/handler/PopsHandler.d.ts +3 -3
- package/dist/types/src/types/components.d.ts +5 -5
- package/dist/types/src/types/main.d.ts +34 -31
- package/package.json +1 -1
- package/src/components/alert/index.ts +15 -15
- package/src/components/confirm/index.ts +16 -15
- package/src/components/drawer/index.ts +16 -15
- package/src/components/folder/index.ts +141 -152
- package/src/components/iframe/index.ts +14 -13
- package/src/components/panel/index.ts +19 -18
- package/src/components/prompt/index.ts +15 -14
- package/src/components/rightClickMenu/index.ts +17 -16
- package/src/components/searchSuggestion/index.ts +21 -20
- package/src/components/tooltip/index.ts +3 -2
- package/src/handler/PopsElementHandler.ts +18 -18
- package/src/handler/PopsHandler.ts +13 -7
- package/src/types/components.d.ts +5 -5
- package/src/types/main.d.ts +34 -31
package/dist/index.amd.js
CHANGED
|
@@ -3948,6 +3948,10 @@ define((function () { 'use strict';
|
|
|
3948
3948
|
*/
|
|
3949
3949
|
handleOnly(type, config) {
|
|
3950
3950
|
if (config.only) {
|
|
3951
|
+
// .loading
|
|
3952
|
+
// .tooltip
|
|
3953
|
+
// .rightClickMenu
|
|
3954
|
+
// 单独处理
|
|
3951
3955
|
if (type === "loading" ||
|
|
3952
3956
|
type === "tooltip" ||
|
|
3953
3957
|
type === "rightClickMenu") {
|
|
@@ -4054,11 +4058,11 @@ define((function () { 'use strict';
|
|
|
4054
4058
|
init(details) {
|
|
4055
4059
|
const guid = popsUtils.getRandomGUID();
|
|
4056
4060
|
// 设置当前类型
|
|
4057
|
-
const
|
|
4061
|
+
const popsType = "alert";
|
|
4058
4062
|
let config = PopsAlertConfig();
|
|
4059
4063
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4060
4064
|
config = popsUtils.assign(config, details);
|
|
4061
|
-
config = PopsHandler.handleOnly(
|
|
4065
|
+
config = PopsHandler.handleOnly(popsType, config);
|
|
4062
4066
|
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4063
4067
|
PopsHandler.handleInit($shadowRoot, [
|
|
4064
4068
|
{
|
|
@@ -4093,23 +4097,23 @@ define((function () { 'use strict';
|
|
|
4093
4097
|
// 先把z-index提取出来
|
|
4094
4098
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4095
4099
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
4096
|
-
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(
|
|
4097
|
-
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(
|
|
4098
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(
|
|
4099
|
-
let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(
|
|
4100
|
-
let animHTML = PopsElementHandler.getAnimHTML(guid,
|
|
4100
|
+
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
|
|
4101
|
+
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(popsType, config);
|
|
4102
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
|
|
4103
|
+
let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(popsType, config);
|
|
4104
|
+
let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
|
|
4101
4105
|
/*html*/ `
|
|
4102
|
-
<div class="pops-title pops-${
|
|
4106
|
+
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
4103
4107
|
? config.title.text
|
|
4104
|
-
: `<p pops class="pops-${
|
|
4105
|
-
<div class="pops-content pops-${
|
|
4108
|
+
: `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
|
|
4109
|
+
<div class="pops-content pops-${popsType}-content" style="${contentStyle}">${config.content.html
|
|
4106
4110
|
? config.content.text
|
|
4107
|
-
: `<p pops class="pops-${
|
|
4111
|
+
: `<p pops class="pops-${popsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
|
|
4108
4112
|
/**
|
|
4109
4113
|
* 弹窗的主元素,包括动画层
|
|
4110
4114
|
*/
|
|
4111
4115
|
let $anim = PopsElementHandler.parseElement(animHTML);
|
|
4112
|
-
let { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, btnOkElement, titleElement: $title, } = PopsHandler.handleQueryElement($anim,
|
|
4116
|
+
let { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, btnOkElement, titleElement: $title, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
4113
4117
|
/** 遮罩层元素 */
|
|
4114
4118
|
let $mask = null;
|
|
4115
4119
|
/** 已创建的元素列表 */
|
|
@@ -4117,7 +4121,7 @@ define((function () { 'use strict';
|
|
|
4117
4121
|
/* 遮罩层元素 */
|
|
4118
4122
|
if (config.mask.enable) {
|
|
4119
4123
|
let _handleMask_ = PopsHandler.handleMask({
|
|
4120
|
-
type:
|
|
4124
|
+
type: popsType,
|
|
4121
4125
|
guid: guid,
|
|
4122
4126
|
config: config,
|
|
4123
4127
|
animElement: $anim,
|
|
@@ -4127,7 +4131,7 @@ define((function () { 'use strict';
|
|
|
4127
4131
|
elementList.push($mask);
|
|
4128
4132
|
}
|
|
4129
4133
|
/* 处理返回的配置 */
|
|
4130
|
-
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot,
|
|
4134
|
+
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
4131
4135
|
/* 为顶部右边的关闭按钮添加点击事件 */
|
|
4132
4136
|
PopsHandler.handleClickEvent("close", $headerCloseBtn, eventDetails, config.btn.close.callback);
|
|
4133
4137
|
/* 为底部ok按钮添加点击事件 */
|
|
@@ -4143,7 +4147,7 @@ define((function () { 'use strict';
|
|
|
4143
4147
|
$anim.after($mask);
|
|
4144
4148
|
}
|
|
4145
4149
|
/* 保存 */
|
|
4146
|
-
PopsHandler.handlePush(
|
|
4150
|
+
PopsHandler.handlePush(popsType, {
|
|
4147
4151
|
guid: guid,
|
|
4148
4152
|
animElement: $anim,
|
|
4149
4153
|
popsElement: $pops,
|
|
@@ -4258,11 +4262,11 @@ define((function () { 'use strict';
|
|
|
4258
4262
|
init(details) {
|
|
4259
4263
|
const guid = popsUtils.getRandomGUID();
|
|
4260
4264
|
// 设置当前类型
|
|
4261
|
-
const
|
|
4265
|
+
const popsType = "confirm";
|
|
4262
4266
|
let config = PopsConfirmConfig();
|
|
4263
4267
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4264
4268
|
config = popsUtils.assign(config, details);
|
|
4265
|
-
config = PopsHandler.handleOnly(
|
|
4269
|
+
config = PopsHandler.handleOnly(popsType, config);
|
|
4266
4270
|
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4267
4271
|
PopsHandler.handleInit($shadowRoot, [
|
|
4268
4272
|
{
|
|
@@ -4297,23 +4301,23 @@ define((function () { 'use strict';
|
|
|
4297
4301
|
// 先把z-index提取出来
|
|
4298
4302
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4299
4303
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
4300
|
-
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(
|
|
4301
|
-
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(
|
|
4302
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(
|
|
4303
|
-
let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(
|
|
4304
|
-
let animHTML = PopsElementHandler.getAnimHTML(guid,
|
|
4304
|
+
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
|
|
4305
|
+
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(popsType, config);
|
|
4306
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
|
|
4307
|
+
let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(popsType, config);
|
|
4308
|
+
let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
|
|
4305
4309
|
/*html*/ `
|
|
4306
|
-
<div class="pops-title pops-${
|
|
4310
|
+
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
4307
4311
|
? config.title.text
|
|
4308
|
-
: `<p pops class="pops-${
|
|
4309
|
-
<div class="pops-content pops-${
|
|
4312
|
+
: `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
|
|
4313
|
+
<div class="pops-content pops-${popsType}-content" style="${contentStyle}">${config.content.html
|
|
4310
4314
|
? config.content.text
|
|
4311
|
-
: `<p pops class="pops-${
|
|
4315
|
+
: `<p pops class="pops-${popsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
|
|
4312
4316
|
/**
|
|
4313
4317
|
* 弹窗的主元素,包括动画层
|
|
4314
4318
|
*/
|
|
4315
4319
|
let $anim = PopsElementHandler.parseElement(animHTML);
|
|
4316
|
-
let { popsElement: $pops, titleElement: $title, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, } = PopsHandler.handleQueryElement($anim,
|
|
4320
|
+
let { popsElement: $pops, titleElement: $title, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
4317
4321
|
/**
|
|
4318
4322
|
* 遮罩层元素
|
|
4319
4323
|
*/
|
|
@@ -4325,7 +4329,7 @@ define((function () { 'use strict';
|
|
|
4325
4329
|
if (config.mask.enable) {
|
|
4326
4330
|
// 启用遮罩层
|
|
4327
4331
|
let _handleMask_ = PopsHandler.handleMask({
|
|
4328
|
-
type:
|
|
4332
|
+
type: popsType,
|
|
4329
4333
|
guid: guid,
|
|
4330
4334
|
config: config,
|
|
4331
4335
|
animElement: $anim,
|
|
@@ -4334,7 +4338,7 @@ define((function () { 'use strict';
|
|
|
4334
4338
|
$mask = _handleMask_.maskElement;
|
|
4335
4339
|
elementList.push($mask);
|
|
4336
4340
|
}
|
|
4337
|
-
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot,
|
|
4341
|
+
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
4338
4342
|
PopsHandler.handleClickEvent("close", $btnClose, eventDetails, config.btn.close.callback);
|
|
4339
4343
|
PopsHandler.handleClickEvent("ok", $btnOk, eventDetails, config.btn.ok.callback);
|
|
4340
4344
|
PopsHandler.handleClickEvent("cancel", $btnCancel, eventDetails, config.btn.cancel.callback);
|
|
@@ -4348,7 +4352,7 @@ define((function () { 'use strict';
|
|
|
4348
4352
|
if ($mask != null) {
|
|
4349
4353
|
$anim.after($mask);
|
|
4350
4354
|
}
|
|
4351
|
-
PopsHandler.handlePush(
|
|
4355
|
+
PopsHandler.handlePush(popsType, {
|
|
4352
4356
|
guid: guid,
|
|
4353
4357
|
animElement: $anim,
|
|
4354
4358
|
popsElement: $pops,
|
|
@@ -4467,11 +4471,11 @@ define((function () { 'use strict';
|
|
|
4467
4471
|
init(details) {
|
|
4468
4472
|
const guid = popsUtils.getRandomGUID();
|
|
4469
4473
|
// 设置当前类型
|
|
4470
|
-
const
|
|
4474
|
+
const popsType = "prompt";
|
|
4471
4475
|
let config = PopsPromptConfig();
|
|
4472
4476
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4473
4477
|
config = popsUtils.assign(config, details);
|
|
4474
|
-
config = PopsHandler.handleOnly(
|
|
4478
|
+
config = PopsHandler.handleOnly(popsType, config);
|
|
4475
4479
|
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4476
4480
|
PopsHandler.handleInit($shadowRoot, [
|
|
4477
4481
|
{
|
|
@@ -4506,16 +4510,16 @@ define((function () { 'use strict';
|
|
|
4506
4510
|
// 先把z-index提取出来
|
|
4507
4511
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4508
4512
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
4509
|
-
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(
|
|
4510
|
-
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(
|
|
4511
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(
|
|
4512
|
-
let { contentPStyle } = PopsElementHandler.getContentStyle(
|
|
4513
|
-
let animHTML = PopsElementHandler.getAnimHTML(guid,
|
|
4513
|
+
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
|
|
4514
|
+
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(popsType, config);
|
|
4515
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
|
|
4516
|
+
let { contentPStyle } = PopsElementHandler.getContentStyle(popsType, config);
|
|
4517
|
+
let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
|
|
4514
4518
|
/*html*/ `
|
|
4515
|
-
<div class="pops-title pops-${
|
|
4519
|
+
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
4516
4520
|
? config.title.text
|
|
4517
|
-
: `<p pops class="pops-${
|
|
4518
|
-
<div class="pops-content pops-${
|
|
4521
|
+
: `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
|
|
4522
|
+
<div class="pops-content pops-${popsType}-content" style="${contentPStyle}">${config.content.row
|
|
4519
4523
|
? '<textarea name="pops-input-text" pops="" placeholder="' +
|
|
4520
4524
|
config.content.placeholder +
|
|
4521
4525
|
'"></textarea>'
|
|
@@ -4528,7 +4532,7 @@ define((function () { 'use strict';
|
|
|
4528
4532
|
* 弹窗的主元素,包括动画层
|
|
4529
4533
|
*/
|
|
4530
4534
|
let $anim = PopsElementHandler.parseElement(animHTML);
|
|
4531
|
-
let { popsElement: $pops, inputElement: $input, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, titleElement: $title, } = PopsHandler.handleQueryElement($anim,
|
|
4535
|
+
let { popsElement: $pops, inputElement: $input, headerCloseBtnElement: $btnClose, btnOkElement: $btnOk, btnCancelElement: $btnCancel, btnOtherElement: $btnOther, titleElement: $title, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
4532
4536
|
/**
|
|
4533
4537
|
* 遮罩层元素
|
|
4534
4538
|
*/
|
|
@@ -4540,7 +4544,7 @@ define((function () { 'use strict';
|
|
|
4540
4544
|
if (config.mask.enable) {
|
|
4541
4545
|
// 启用遮罩层
|
|
4542
4546
|
let _handleMask_ = PopsHandler.handleMask({
|
|
4543
|
-
type:
|
|
4547
|
+
type: popsType,
|
|
4544
4548
|
guid: guid,
|
|
4545
4549
|
config: config,
|
|
4546
4550
|
animElement: $anim,
|
|
@@ -4549,7 +4553,7 @@ define((function () { 'use strict';
|
|
|
4549
4553
|
$mask = _handleMask_.maskElement;
|
|
4550
4554
|
elementList.push($mask);
|
|
4551
4555
|
}
|
|
4552
|
-
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot,
|
|
4556
|
+
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
4553
4557
|
/* 输入框赋值初始值 */
|
|
4554
4558
|
$input.value = config.content.text;
|
|
4555
4559
|
PopsHandler.handlePromptClickEvent("close", $input, $btnClose, eventDetails, config.btn.close.callback);
|
|
@@ -4565,7 +4569,7 @@ define((function () { 'use strict';
|
|
|
4565
4569
|
if ($mask != null) {
|
|
4566
4570
|
$anim.after($mask);
|
|
4567
4571
|
}
|
|
4568
|
-
PopsHandler.handlePush(
|
|
4572
|
+
PopsHandler.handlePush(popsType, {
|
|
4569
4573
|
guid: guid,
|
|
4570
4574
|
animElement: $anim,
|
|
4571
4575
|
popsElement: $pops,
|
|
@@ -4760,14 +4764,14 @@ define((function () { 'use strict';
|
|
|
4760
4764
|
init(details) {
|
|
4761
4765
|
const guid = popsUtils.getRandomGUID();
|
|
4762
4766
|
// 设置当前类型
|
|
4763
|
-
const
|
|
4767
|
+
const popsType = "iframe";
|
|
4764
4768
|
let config = PopsIframeConfig();
|
|
4765
4769
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
4766
4770
|
config = popsUtils.assign(config, details);
|
|
4767
4771
|
if (config.url == null) {
|
|
4768
4772
|
throw new Error("config.url不能为空");
|
|
4769
4773
|
}
|
|
4770
|
-
config = PopsHandler.handleOnly(
|
|
4774
|
+
config = PopsHandler.handleOnly(popsType, config);
|
|
4771
4775
|
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
4772
4776
|
PopsHandler.handleInit($shadowRoot, [
|
|
4773
4777
|
{
|
|
@@ -4803,17 +4807,17 @@ define((function () { 'use strict';
|
|
|
4803
4807
|
// 先把z-index提取出来
|
|
4804
4808
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
4805
4809
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex, maskExtraStyle);
|
|
4806
|
-
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(
|
|
4810
|
+
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
|
|
4807
4811
|
let iframeLoadingHTML = '<div class="pops-loading"></div>';
|
|
4808
4812
|
let titleText = config.title.text.trim() !== "" ? config.title.text : config.url;
|
|
4809
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(
|
|
4810
|
-
let animHTML = PopsElementHandler.getAnimHTML(guid,
|
|
4813
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
|
|
4814
|
+
let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
|
|
4811
4815
|
/*html*/ `
|
|
4812
|
-
<div class="pops-title pops-${
|
|
4816
|
+
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
4813
4817
|
? titleText
|
|
4814
|
-
: `<p pops class="pops-${
|
|
4815
|
-
<div class="pops-content pops-${
|
|
4816
|
-
<div class="pops-${
|
|
4818
|
+
: `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${titleText}</p>`}${headerBtnHTML}</div>
|
|
4819
|
+
<div class="pops-content pops-${popsType}-content">
|
|
4820
|
+
<div class="pops-${popsType}-content-global-loading"></div>
|
|
4817
4821
|
<iframe src="${config.url}" pops ${config.sandbox
|
|
4818
4822
|
? "sandbox='allow-forms allow-same-origin allow-scripts'"
|
|
4819
4823
|
: ""}>
|
|
@@ -4823,7 +4827,7 @@ define((function () { 'use strict';
|
|
|
4823
4827
|
* 弹窗的主元素,包括动画层
|
|
4824
4828
|
*/
|
|
4825
4829
|
let $anim = PopsElementHandler.parseElement(animHTML);
|
|
4826
|
-
let { popsElement: $pops, headerCloseBtnElement, headerControlsElement, titleElement: $title, iframeElement: $iframe, loadingElement, contentLoadingElement: $contentLoading, headerMinBtnElement, headerMaxBtnElement, headerMiseBtnElement, } = PopsHandler.handleQueryElement($anim,
|
|
4830
|
+
let { popsElement: $pops, headerCloseBtnElement, headerControlsElement, titleElement: $title, iframeElement: $iframe, loadingElement, contentLoadingElement: $contentLoading, headerMinBtnElement, headerMaxBtnElement, headerMiseBtnElement, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
4827
4831
|
let $iframeContainer = PopsCore.document.querySelector(".pops-iframe-container");
|
|
4828
4832
|
if (!$iframeContainer) {
|
|
4829
4833
|
$iframeContainer = PopsCore.document.createElement("div");
|
|
@@ -4842,7 +4846,7 @@ define((function () { 'use strict';
|
|
|
4842
4846
|
let elementList = [$anim];
|
|
4843
4847
|
if (config.mask.enable) {
|
|
4844
4848
|
let _handleMask_ = PopsHandler.handleMask({
|
|
4845
|
-
type:
|
|
4849
|
+
type: popsType,
|
|
4846
4850
|
guid: guid,
|
|
4847
4851
|
config: config,
|
|
4848
4852
|
animElement: $anim,
|
|
@@ -4851,7 +4855,7 @@ define((function () { 'use strict';
|
|
|
4851
4855
|
$mask = _handleMask_.maskElement;
|
|
4852
4856
|
elementList.push($mask);
|
|
4853
4857
|
}
|
|
4854
|
-
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot,
|
|
4858
|
+
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
4855
4859
|
eventDetails["iframeElement"] = $iframe;
|
|
4856
4860
|
popsDOMUtils.on($anim, popsDOMUtils.getAnimationEndNameList(), function () {
|
|
4857
4861
|
/* 动画加载完毕 */
|
|
@@ -4995,7 +4999,7 @@ define((function () { 'use strict';
|
|
|
4995
4999
|
}, {
|
|
4996
5000
|
capture: true,
|
|
4997
5001
|
});
|
|
4998
|
-
PopsHandler.handlePush(
|
|
5002
|
+
PopsHandler.handlePush(popsType, {
|
|
4999
5003
|
guid: guid,
|
|
5000
5004
|
animElement: $anim,
|
|
5001
5005
|
popsElement: $pops,
|
|
@@ -5099,11 +5103,11 @@ define((function () { 'use strict';
|
|
|
5099
5103
|
init(details) {
|
|
5100
5104
|
const guid = popsUtils.getRandomGUID();
|
|
5101
5105
|
// 设置当前类型
|
|
5102
|
-
const
|
|
5106
|
+
const popsType = "drawer";
|
|
5103
5107
|
let config = PopsDrawerConfig();
|
|
5104
5108
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
5105
5109
|
config = popsUtils.assign(config, details);
|
|
5106
|
-
config = PopsHandler.handleOnly(
|
|
5110
|
+
config = PopsHandler.handleOnly(popsType, config);
|
|
5107
5111
|
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
5108
5112
|
PopsHandler.handleInit($shadowRoot, [
|
|
5109
5113
|
{
|
|
@@ -5138,25 +5142,25 @@ define((function () { 'use strict';
|
|
|
5138
5142
|
// 先把z-index提取出来
|
|
5139
5143
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
5140
5144
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
5141
|
-
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(
|
|
5142
|
-
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(
|
|
5143
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(
|
|
5144
|
-
let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(
|
|
5145
|
-
let animHTML = PopsElementHandler.getAnimHTML(guid,
|
|
5145
|
+
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
|
|
5146
|
+
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(popsType, config);
|
|
5147
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
|
|
5148
|
+
let { contentStyle, contentPStyle } = PopsElementHandler.getContentStyle(popsType, config);
|
|
5149
|
+
let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
|
|
5146
5150
|
/*html*/ `
|
|
5147
5151
|
${config.title.enable
|
|
5148
|
-
? /*html*/ `<div class="pops-title pops-${
|
|
5152
|
+
? /*html*/ `<div class="pops-title pops-${popsType}-title" style="${headerStyle}">${config.title.html
|
|
5149
5153
|
? config.title.text
|
|
5150
|
-
: /*html*/ `<p pops class="pops-${
|
|
5154
|
+
: /*html*/ `<p pops class="pops-${popsType}-title-text" style="width: 100%;text-align: ${config.title.position};${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>`
|
|
5151
5155
|
: ""}
|
|
5152
|
-
<div class="pops-content pops-${
|
|
5156
|
+
<div class="pops-content pops-${popsType}-content" style="${contentStyle}">${config.content.html
|
|
5153
5157
|
? config.content.text
|
|
5154
|
-
: `<p pops class="pops-${
|
|
5158
|
+
: `<p pops class="pops-${popsType}-content-text" style="${contentPStyle}">${config.content.text}</p>`}</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
|
|
5155
5159
|
/**
|
|
5156
5160
|
* 弹窗的主元素,包括动画层
|
|
5157
5161
|
*/
|
|
5158
5162
|
let $anim = PopsElementHandler.parseElement(animHTML);
|
|
5159
|
-
let { popsElement, headerCloseBtnElement, btnCancelElement, btnOkElement, btnOtherElement, } = PopsHandler.handleQueryElement($anim,
|
|
5163
|
+
let { popsElement, headerCloseBtnElement, btnCancelElement, btnOkElement, btnOtherElement, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
5160
5164
|
let $pops = popsElement;
|
|
5161
5165
|
let $headerCloseBtn = headerCloseBtnElement;
|
|
5162
5166
|
let $btnCancel = btnCancelElement;
|
|
@@ -5172,7 +5176,7 @@ define((function () { 'use strict';
|
|
|
5172
5176
|
let elementList = [$anim];
|
|
5173
5177
|
if (config.mask.enable) {
|
|
5174
5178
|
let _handleMask_ = PopsHandler.handleMask({
|
|
5175
|
-
type:
|
|
5179
|
+
type: popsType,
|
|
5176
5180
|
guid: guid,
|
|
5177
5181
|
config: config,
|
|
5178
5182
|
animElement: $anim,
|
|
@@ -5181,7 +5185,7 @@ define((function () { 'use strict';
|
|
|
5181
5185
|
$mask = _handleMask_.maskElement;
|
|
5182
5186
|
elementList.push($mask);
|
|
5183
5187
|
}
|
|
5184
|
-
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot,
|
|
5188
|
+
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
5185
5189
|
/* 处理方向 */
|
|
5186
5190
|
$pops.setAttribute("direction", config.direction);
|
|
5187
5191
|
/* 处理border-radius */
|
|
@@ -5269,7 +5273,7 @@ define((function () { 'use strict';
|
|
|
5269
5273
|
if ($mask != null) {
|
|
5270
5274
|
$anim.after($mask);
|
|
5271
5275
|
}
|
|
5272
|
-
PopsHandler.handlePush(
|
|
5276
|
+
PopsHandler.handlePush(popsType, {
|
|
5273
5277
|
guid: guid,
|
|
5274
5278
|
animElement: $anim,
|
|
5275
5279
|
popsElement: $pops,
|
|
@@ -5460,11 +5464,11 @@ define((function () { 'use strict';
|
|
|
5460
5464
|
init(details) {
|
|
5461
5465
|
const guid = popsUtils.getRandomGUID();
|
|
5462
5466
|
// 设置当前类型
|
|
5463
|
-
const
|
|
5467
|
+
const popsType = "folder";
|
|
5464
5468
|
let config = PopsFolderConfig();
|
|
5465
5469
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
5466
5470
|
config = popsUtils.assign(config, details);
|
|
5467
|
-
config = PopsHandler.handleOnly(
|
|
5471
|
+
config = PopsHandler.handleOnly(popsType, config);
|
|
5468
5472
|
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
5469
5473
|
PopsHandler.handleInit($shadowRoot, [
|
|
5470
5474
|
{
|
|
@@ -5544,19 +5548,15 @@ define((function () { 'use strict';
|
|
|
5544
5548
|
/* Android安装包 */
|
|
5545
5549
|
let androidIconList = ["apk", "apkm", "xapk"];
|
|
5546
5550
|
zipIconList.forEach((keyName) => {
|
|
5547
|
-
// @ts-ignore
|
|
5548
5551
|
Folder_ICON[keyName] = Folder_ICON.zip;
|
|
5549
5552
|
});
|
|
5550
5553
|
imageIconList.forEach((keyName) => {
|
|
5551
|
-
// @ts-ignore
|
|
5552
5554
|
Folder_ICON[keyName] = Folder_ICON.png;
|
|
5553
5555
|
});
|
|
5554
5556
|
codeLanguageIconList.forEach((keyName) => {
|
|
5555
|
-
// @ts-ignore
|
|
5556
5557
|
Folder_ICON[keyName] = Folder_ICON.html;
|
|
5557
5558
|
});
|
|
5558
5559
|
androidIconList.forEach((keyName) => {
|
|
5559
|
-
// @ts-ignore
|
|
5560
5560
|
Folder_ICON[keyName] = Folder_ICON.apk;
|
|
5561
5561
|
});
|
|
5562
5562
|
if (details?.folder) {
|
|
@@ -5566,108 +5566,105 @@ define((function () { 'use strict';
|
|
|
5566
5566
|
// 先把z-index提取出来
|
|
5567
5567
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
5568
5568
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
5569
|
-
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(
|
|
5570
|
-
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(
|
|
5571
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(
|
|
5572
|
-
let animHTML = PopsElementHandler.getAnimHTML(guid,
|
|
5569
|
+
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
|
|
5570
|
+
let bottomBtnHTML = PopsElementHandler.getBottomBtnHTML(popsType, config);
|
|
5571
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
|
|
5572
|
+
let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
|
|
5573
5573
|
/*html*/ `
|
|
5574
|
-
<div class="pops-title pops-${
|
|
5574
|
+
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
5575
5575
|
? config.title.text
|
|
5576
|
-
: `<p pops class="pops-${
|
|
5577
|
-
<div class="pops-content pops-${
|
|
5576
|
+
: `<p pops class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
|
|
5577
|
+
<div class="pops-content pops-${popsType}-content ${popsUtils.isPhone() ? "pops-mobile-folder-content" : ""}">
|
|
5578
5578
|
<div class="pops-folder-list">
|
|
5579
5579
|
<div class="pops-folder-file-list-breadcrumb">
|
|
5580
|
-
|
|
5581
|
-
|
|
5582
|
-
|
|
5583
|
-
|
|
5584
|
-
|
|
5580
|
+
<div class="pops-folder-file-list-breadcrumb-primary">
|
|
5581
|
+
<span class="pops-folder-file-list-breadcrumb-allFiles cursor-p" title="全部文件">
|
|
5582
|
+
<a>全部文件</a>
|
|
5583
|
+
</span>
|
|
5584
|
+
</div>
|
|
5585
5585
|
</div>
|
|
5586
5586
|
<div class="pops-folder-list-table__header-div">
|
|
5587
|
-
|
|
5588
|
-
|
|
5589
|
-
|
|
5590
|
-
|
|
5591
|
-
|
|
5592
|
-
|
|
5593
|
-
|
|
5594
|
-
|
|
5595
|
-
|
|
5596
|
-
|
|
5597
|
-
|
|
5598
|
-
|
|
5599
|
-
|
|
5600
|
-
|
|
5601
|
-
|
|
5602
|
-
|
|
5603
|
-
|
|
5604
|
-
|
|
5605
|
-
|
|
5606
|
-
|
|
5607
|
-
|
|
5608
|
-
|
|
5609
|
-
|
|
5610
|
-
|
|
5611
|
-
|
|
5612
|
-
|
|
5613
|
-
|
|
5614
|
-
|
|
5615
|
-
|
|
5616
|
-
|
|
5617
|
-
|
|
5618
|
-
|
|
5619
|
-
|
|
5620
|
-
|
|
5621
|
-
|
|
5622
|
-
|
|
5623
|
-
|
|
5624
|
-
|
|
5625
|
-
|
|
5626
|
-
|
|
5627
|
-
|
|
5628
|
-
|
|
5629
|
-
|
|
5630
|
-
|
|
5631
|
-
|
|
5632
|
-
|
|
5633
|
-
|
|
5634
|
-
|
|
5635
|
-
|
|
5636
|
-
|
|
5637
|
-
|
|
5638
|
-
|
|
5639
|
-
|
|
5640
|
-
|
|
5641
|
-
|
|
5642
|
-
|
|
5643
|
-
|
|
5644
|
-
|
|
5645
|
-
|
|
5646
|
-
|
|
5647
|
-
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5652
|
-
|
|
5653
|
-
|
|
5654
|
-
|
|
5587
|
+
<table class="pops-folder-list-table__header">
|
|
5588
|
+
<colgroup>
|
|
5589
|
+
<col width="52%">
|
|
5590
|
+
<col width="24%">
|
|
5591
|
+
<col width="16%">
|
|
5592
|
+
</colgroup>
|
|
5593
|
+
<thead>
|
|
5594
|
+
<tr class="pops-folder-list-table__header-row">
|
|
5595
|
+
<th class="pops-folder-list-table__header-th cursor-p">
|
|
5596
|
+
<div class="text-ellip content flex-a-i-center">
|
|
5597
|
+
<span>文件名</span>
|
|
5598
|
+
<div class="pops-folder-list-table__sort" data-sort="fileName">
|
|
5599
|
+
<div class="pops-folder-icon-arrow" data-sort="按文件名排序">
|
|
5600
|
+
<svg
|
|
5601
|
+
viewBox="0 0 1024 1024"
|
|
5602
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
5603
|
+
<path
|
|
5604
|
+
d="M509.624392 5.882457 57.127707 458.379143 962.121078 458.379143Z"
|
|
5605
|
+
class="pops-folder-icon-arrow-up"></path>
|
|
5606
|
+
<path
|
|
5607
|
+
d="M509.624392 1024 962.121078 571.503314 57.127707 571.503314Z"
|
|
5608
|
+
class="pops-folder-icon-arrow-down"></path>
|
|
5609
|
+
</svg>
|
|
5610
|
+
</div>
|
|
5611
|
+
</div>
|
|
5612
|
+
</div>
|
|
5613
|
+
</th>
|
|
5614
|
+
<th class="pops-folder-list-table__header-th cursor-p">
|
|
5615
|
+
<div class="text-ellip content flex-a-i-center">
|
|
5616
|
+
<span>修改时间</span>
|
|
5617
|
+
<div class="pops-folder-list-table__sort" data-sort="latestTime">
|
|
5618
|
+
<div class="pops-folder-icon-arrow" title="按修改时间排序">
|
|
5619
|
+
<svg
|
|
5620
|
+
viewBox="0 0 1024 1024"
|
|
5621
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
5622
|
+
<path
|
|
5623
|
+
d="M509.624392 5.882457 57.127707 458.379143 962.121078 458.379143Z"
|
|
5624
|
+
class="pops-folder-icon-arrow-up"></path>
|
|
5625
|
+
<path
|
|
5626
|
+
d="M509.624392 1024 962.121078 571.503314 57.127707 571.503314Z"
|
|
5627
|
+
class="pops-folder-icon-arrow-down"></path>
|
|
5628
|
+
</svg>
|
|
5629
|
+
</div>
|
|
5630
|
+
</div>
|
|
5631
|
+
</div>
|
|
5632
|
+
</th>
|
|
5633
|
+
<th class="pops-folder-list-table__header-th cursor-p">
|
|
5634
|
+
<div class="text-ellip content flex-a-i-center">
|
|
5635
|
+
<span>大小</span>
|
|
5636
|
+
<div class="pops-folder-list-table__sort" data-sort="fileSize">
|
|
5637
|
+
<div class="pops-folder-icon-arrow" title="按大小排序">
|
|
5638
|
+
<svg
|
|
5639
|
+
viewBox="0 0 1024 1024"
|
|
5640
|
+
xmlns="http://www.w3.org/2000/svg">
|
|
5641
|
+
<path
|
|
5642
|
+
d="M509.624392 5.882457 57.127707 458.379143 962.121078 458.379143Z"
|
|
5643
|
+
class="pops-folder-icon-arrow-up"></path>
|
|
5644
|
+
<path
|
|
5645
|
+
d="M509.624392 1024 962.121078 571.503314 57.127707 571.503314Z"
|
|
5646
|
+
class="pops-folder-icon-arrow-down"></path>
|
|
5647
|
+
</svg>
|
|
5648
|
+
</div>
|
|
5649
|
+
</div>
|
|
5650
|
+
</div>
|
|
5651
|
+
</th>
|
|
5652
|
+
</tr>
|
|
5653
|
+
</thead>
|
|
5654
|
+
</table>
|
|
5655
5655
|
</div>
|
|
5656
5656
|
<div class="pops-folder-list-table__body-div">
|
|
5657
|
-
|
|
5658
|
-
|
|
5659
|
-
|
|
5657
|
+
<table class="pops-folder-list-table__body">
|
|
5658
|
+
<colgroup>
|
|
5659
|
+
${popsUtils.isPhone()
|
|
5660
5660
|
? `<col width="100%">`
|
|
5661
5661
|
: `
|
|
5662
|
-
|
|
5663
|
-
|
|
5664
|
-
|
|
5665
|
-
|
|
5666
|
-
|
|
5667
|
-
|
|
5668
|
-
|
|
5669
|
-
</tbody>
|
|
5670
|
-
</table>
|
|
5662
|
+
<col width="52%">
|
|
5663
|
+
<col width="24%">
|
|
5664
|
+
<col width="16%">`}
|
|
5665
|
+
</colgroup>
|
|
5666
|
+
<tbody></tbody>
|
|
5667
|
+
</table>
|
|
5671
5668
|
</div>
|
|
5672
5669
|
</div>
|
|
5673
5670
|
</div>${bottomBtnHTML}`, bottomBtnHTML, zIndex);
|
|
@@ -5679,7 +5676,7 @@ define((function () { 'use strict';
|
|
|
5679
5676
|
// folderListElement,
|
|
5680
5677
|
// folderListHeaderElement,
|
|
5681
5678
|
// folderListHeaderRowElement,
|
|
5682
|
-
folderListBodyElement, folderFileListBreadcrumbPrimaryElement, headerCloseBtnElement: $btnCloseBtn, btnOkElement, btnCancelElement, btnOtherElement, folderListSortFileNameElement, folderListSortLatestTimeElement, folderListSortFileSizeElement, } = PopsHandler.handleQueryElement($anim,
|
|
5679
|
+
folderListBodyElement, folderFileListBreadcrumbPrimaryElement, headerCloseBtnElement: $btnCloseBtn, btnOkElement, btnCancelElement, btnOtherElement, folderListSortFileNameElement, folderListSortLatestTimeElement, folderListSortFileSizeElement, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
5683
5680
|
/**
|
|
5684
5681
|
* 遮罩层元素
|
|
5685
5682
|
*/
|
|
@@ -5690,7 +5687,7 @@ define((function () { 'use strict';
|
|
|
5690
5687
|
let elementList = [$anim];
|
|
5691
5688
|
if (config.mask.enable) {
|
|
5692
5689
|
let _handleMask_ = PopsHandler.handleMask({
|
|
5693
|
-
type:
|
|
5690
|
+
type: popsType,
|
|
5694
5691
|
guid: guid,
|
|
5695
5692
|
config: config,
|
|
5696
5693
|
animElement: $anim,
|
|
@@ -5700,7 +5697,7 @@ define((function () { 'use strict';
|
|
|
5700
5697
|
elementList.push($mask);
|
|
5701
5698
|
}
|
|
5702
5699
|
/* 事件 */
|
|
5703
|
-
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot,
|
|
5700
|
+
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
5704
5701
|
PopsHandler.handleClickEvent("close", $btnCloseBtn, eventDetails, config.btn.close.callback);
|
|
5705
5702
|
PopsHandler.handleClickEvent("ok", btnOkElement, eventDetails, config.btn.ok.callback);
|
|
5706
5703
|
PopsHandler.handleClickEvent("cancel", btnCancelElement, eventDetails, config.btn.cancel.callback);
|
|
@@ -5793,10 +5790,10 @@ define((function () { 'use strict';
|
|
|
5793
5790
|
fileSize: origin_fileSize,
|
|
5794
5791
|
isFolder: isFolder,
|
|
5795
5792
|
};
|
|
5796
|
-
fileNameElement
|
|
5797
|
-
fileTimeElement
|
|
5798
|
-
fileFormatSize
|
|
5799
|
-
folderELement
|
|
5793
|
+
Reflect.set(fileNameElement, "__value__", __value__);
|
|
5794
|
+
Reflect.set(fileTimeElement, "__value__", __value__);
|
|
5795
|
+
Reflect.set(fileFormatSize, "__value__", __value__);
|
|
5796
|
+
Reflect.set(folderELement, "__value__", __value__);
|
|
5800
5797
|
folderELement.appendChild(fileNameElement);
|
|
5801
5798
|
folderELement.appendChild(fileTimeElement);
|
|
5802
5799
|
folderELement.appendChild(fileFormatSize);
|
|
@@ -5863,8 +5860,8 @@ define((function () { 'use strict';
|
|
|
5863
5860
|
fileSize: origin_fileSize,
|
|
5864
5861
|
isFolder: isFolder,
|
|
5865
5862
|
};
|
|
5866
|
-
fileNameElement
|
|
5867
|
-
folderELement
|
|
5863
|
+
Reflect.set(fileNameElement, "__value__", __value__);
|
|
5864
|
+
Reflect.set(folderELement, "__value__", __value__);
|
|
5868
5865
|
folderELement.appendChild(fileNameElement);
|
|
5869
5866
|
return {
|
|
5870
5867
|
folderELement,
|
|
@@ -5874,10 +5871,13 @@ define((function () { 'use strict';
|
|
|
5874
5871
|
/**
|
|
5875
5872
|
* 清空每行的元素
|
|
5876
5873
|
*/
|
|
5877
|
-
function
|
|
5874
|
+
function clearFolderRow() {
|
|
5878
5875
|
PopsSafeUtils.setSafeHTML(folderListBodyElement, "");
|
|
5879
5876
|
}
|
|
5880
|
-
|
|
5877
|
+
/**
|
|
5878
|
+
* 创建顶部导航的箭头图标
|
|
5879
|
+
*/
|
|
5880
|
+
function createHeaderArrowIcon() {
|
|
5881
5881
|
let iconArrowElement = popsDOMUtils.createElement("div", {
|
|
5882
5882
|
className: "iconArrow",
|
|
5883
5883
|
});
|
|
@@ -5885,17 +5885,16 @@ define((function () { 'use strict';
|
|
|
5885
5885
|
}
|
|
5886
5886
|
/**
|
|
5887
5887
|
* 添加顶部导航
|
|
5888
|
-
* @param
|
|
5889
|
-
* @param
|
|
5890
|
-
* @returns
|
|
5888
|
+
* @param folderName 文件夹名
|
|
5889
|
+
* @param folderDataConfig 文件夹配置
|
|
5891
5890
|
*/
|
|
5892
|
-
function
|
|
5891
|
+
function createHeaderFileLinkNavgiation(folderName, folderDataConfig) {
|
|
5893
5892
|
let spanElement = popsDOMUtils.createElement("span", {
|
|
5894
5893
|
className: "pops-folder-file-list-breadcrumb-allFiles cursor-p",
|
|
5895
|
-
innerHTML: `<a>${
|
|
5896
|
-
_config_:
|
|
5894
|
+
innerHTML: `<a>${folderName}</a>`,
|
|
5895
|
+
_config_: folderDataConfig,
|
|
5897
5896
|
}, {
|
|
5898
|
-
title:
|
|
5897
|
+
title: folderName,
|
|
5899
5898
|
});
|
|
5900
5899
|
return spanElement;
|
|
5901
5900
|
}
|
|
@@ -5903,10 +5902,10 @@ define((function () { 'use strict';
|
|
|
5903
5902
|
* 顶部导航的点击事件
|
|
5904
5903
|
* @param event
|
|
5905
5904
|
* @param isTop 是否是全部文件按钮
|
|
5906
|
-
* @param
|
|
5905
|
+
* @param folderDataConfigList 配置
|
|
5907
5906
|
*/
|
|
5908
|
-
function breadcrumbAllFilesElementClickEvent(event, isTop,
|
|
5909
|
-
|
|
5907
|
+
function breadcrumbAllFilesElementClickEvent(event, isTop, folderDataConfigList) {
|
|
5908
|
+
clearFolderRow();
|
|
5910
5909
|
/* 获取当前的导航元素 */
|
|
5911
5910
|
let $click = event.target;
|
|
5912
5911
|
let currentBreadcrumb = $click.closest("span.pops-folder-file-list-breadcrumb-allFiles");
|
|
@@ -5932,16 +5931,16 @@ define((function () { 'use strict';
|
|
|
5932
5931
|
},
|
|
5933
5932
|
addIndexCSS: false,
|
|
5934
5933
|
});
|
|
5935
|
-
addFolderElement(
|
|
5934
|
+
addFolderElement(folderDataConfigList);
|
|
5936
5935
|
loadingMask.close();
|
|
5937
5936
|
}
|
|
5938
5937
|
/**
|
|
5939
5938
|
* 刷新文件列表界面信息
|
|
5940
5939
|
* @param event
|
|
5941
|
-
* @param
|
|
5940
|
+
* @param folderDataConfig
|
|
5942
5941
|
*/
|
|
5943
|
-
async function refreshFolderInfoClickEvent(event,
|
|
5944
|
-
|
|
5942
|
+
async function refreshFolderInfoClickEvent(event, folderDataConfig) {
|
|
5943
|
+
clearFolderRow();
|
|
5945
5944
|
let loadingMask = PopsLoading.init({
|
|
5946
5945
|
parent: $content,
|
|
5947
5946
|
content: {
|
|
@@ -5952,12 +5951,12 @@ define((function () { 'use strict';
|
|
|
5952
5951
|
},
|
|
5953
5952
|
addIndexCSS: false,
|
|
5954
5953
|
});
|
|
5955
|
-
if (typeof
|
|
5956
|
-
let childConfig = await
|
|
5954
|
+
if (typeof folderDataConfig.clickEvent === "function") {
|
|
5955
|
+
let childConfig = await folderDataConfig.clickEvent(event, folderDataConfig);
|
|
5957
5956
|
/* 添加顶部导航的箭头 */
|
|
5958
|
-
folderFileListBreadcrumbPrimaryElement.appendChild(
|
|
5959
|
-
/*
|
|
5960
|
-
let breadcrumbAllFilesElement =
|
|
5957
|
+
folderFileListBreadcrumbPrimaryElement.appendChild(createHeaderArrowIcon());
|
|
5958
|
+
/* 添加顶部导航的链接文字 */
|
|
5959
|
+
let breadcrumbAllFilesElement = createHeaderFileLinkNavgiation(folderDataConfig.fileName, childConfig);
|
|
5961
5960
|
folderFileListBreadcrumbPrimaryElement.appendChild(breadcrumbAllFilesElement);
|
|
5962
5961
|
/* 设置顶部导航点击事件 */
|
|
5963
5962
|
popsDOMUtils.on(breadcrumbAllFilesElement, "click", function (event) {
|
|
@@ -6252,7 +6251,7 @@ define((function () { 'use strict';
|
|
|
6252
6251
|
endCallBack: config.dragEndCallBack,
|
|
6253
6252
|
});
|
|
6254
6253
|
}
|
|
6255
|
-
PopsHandler.handlePush(
|
|
6254
|
+
PopsHandler.handlePush(popsType, {
|
|
6256
6255
|
guid: guid,
|
|
6257
6256
|
animElement: $anim,
|
|
6258
6257
|
popsElement: $pops,
|
|
@@ -7344,14 +7343,14 @@ define((function () { 'use strict';
|
|
|
7344
7343
|
init(details) {
|
|
7345
7344
|
const guid = popsUtils.getRandomGUID();
|
|
7346
7345
|
// 设置当前类型
|
|
7347
|
-
const
|
|
7346
|
+
const popsType = "tooltip";
|
|
7348
7347
|
let config = PopsTooltipConfig();
|
|
7349
7348
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
7350
7349
|
config = popsUtils.assign(config, details);
|
|
7351
7350
|
if (!(config.target instanceof HTMLElement)) {
|
|
7352
7351
|
throw new TypeError("config.target 必须是HTMLElement类型");
|
|
7353
7352
|
}
|
|
7354
|
-
config = PopsHandler.handleOnly(
|
|
7353
|
+
config = PopsHandler.handleOnly(popsType, config);
|
|
7355
7354
|
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
7356
7355
|
PopsHandler.handleInit($shadowRoot, [
|
|
7357
7356
|
{
|
|
@@ -10083,14 +10082,14 @@ define((function () { 'use strict';
|
|
|
10083
10082
|
init(details) {
|
|
10084
10083
|
const guid = popsUtils.getRandomGUID();
|
|
10085
10084
|
// 设置当前类型
|
|
10086
|
-
const
|
|
10085
|
+
const popsType = "panel";
|
|
10087
10086
|
let config = PopsPanelConfig();
|
|
10088
10087
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
10089
10088
|
config = popsUtils.assign(config, details);
|
|
10090
10089
|
if (details && Array.isArray(details.content)) {
|
|
10091
10090
|
config.content = details.content;
|
|
10092
10091
|
}
|
|
10093
|
-
config = PopsHandler.handleOnly(
|
|
10092
|
+
config = PopsHandler.handleOnly(popsType, config);
|
|
10094
10093
|
const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
|
|
10095
10094
|
PopsHandler.handleInit($shadowRoot, [
|
|
10096
10095
|
{
|
|
@@ -10125,21 +10124,21 @@ define((function () { 'use strict';
|
|
|
10125
10124
|
// 先把z-index提取出来
|
|
10126
10125
|
let zIndex = PopsHandler.handleZIndex(config.zIndex);
|
|
10127
10126
|
let maskHTML = PopsElementHandler.getMaskHTML(guid, zIndex);
|
|
10128
|
-
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(
|
|
10129
|
-
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(
|
|
10130
|
-
let animHTML = PopsElementHandler.getAnimHTML(guid,
|
|
10127
|
+
let headerBtnHTML = PopsElementHandler.getHeaderBtnHTML(popsType, config);
|
|
10128
|
+
let { headerStyle, headerPStyle } = PopsElementHandler.getHeaderStyle(popsType, config);
|
|
10129
|
+
let animHTML = PopsElementHandler.getAnimHTML(guid, popsType, config,
|
|
10131
10130
|
/*html*/ `
|
|
10132
|
-
<div class="pops-title pops-${
|
|
10131
|
+
<div class="pops-title pops-${popsType}-title" style="text-align: ${config.title.position};${headerStyle}">${config.title.html
|
|
10133
10132
|
? config.title.text
|
|
10134
|
-
: `<p pops class="pops-${
|
|
10135
|
-
<div class="pops-content pops-${
|
|
10136
|
-
<aside class="pops-${
|
|
10137
|
-
<ul class="pops-${
|
|
10138
|
-
<ul class="pops-${
|
|
10133
|
+
: `<p pops class="pops-${popsType}-title-text" class="pops-${popsType}-title-text" style="${headerPStyle}">${config.title.text}</p>`}${headerBtnHTML}</div>
|
|
10134
|
+
<div class="pops-content pops-${popsType}-content">
|
|
10135
|
+
<aside class="pops-${popsType}-aside">
|
|
10136
|
+
<ul class="pops-${popsType}-aside-top-container"></ul>
|
|
10137
|
+
<ul class="pops-${popsType}-aside-bottom-container"></ul>
|
|
10139
10138
|
</aside>
|
|
10140
|
-
<section class="pops-${
|
|
10141
|
-
<ul class="pops-${
|
|
10142
|
-
<ul class="pops-${
|
|
10139
|
+
<section class="pops-${popsType}-container">
|
|
10140
|
+
<ul class="pops-${popsType}-container-header-ul"></ul>
|
|
10141
|
+
<ul class="pops-${popsType}-container-main-ul"></ul>
|
|
10143
10142
|
</section>
|
|
10144
10143
|
</div>`, "", zIndex);
|
|
10145
10144
|
/**
|
|
@@ -10147,7 +10146,7 @@ define((function () { 'use strict';
|
|
|
10147
10146
|
*/
|
|
10148
10147
|
let $anim = PopsElementHandler.parseElement(animHTML);
|
|
10149
10148
|
/* 结构元素 */
|
|
10150
|
-
let { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, titleElement: $title, contentElement: $content, contentAsideElement: $contentAside, contentSectionContainerElement: $contentSectionContainer, } = PopsHandler.handleQueryElement($anim,
|
|
10149
|
+
let { popsElement: $pops, headerCloseBtnElement: $headerCloseBtn, titleElement: $title, contentElement: $content, contentAsideElement: $contentAside, contentSectionContainerElement: $contentSectionContainer, } = PopsHandler.handleQueryElement($anim, popsType);
|
|
10151
10150
|
if (config.isMobile || popsUtils.isPhone()) {
|
|
10152
10151
|
popsDOMUtils.addClassName($pops, config.mobileClassName);
|
|
10153
10152
|
}
|
|
@@ -10162,7 +10161,7 @@ define((function () { 'use strict';
|
|
|
10162
10161
|
/* 遮罩层元素 */
|
|
10163
10162
|
if (config.mask.enable) {
|
|
10164
10163
|
let { maskElement } = PopsHandler.handleMask({
|
|
10165
|
-
type:
|
|
10164
|
+
type: popsType,
|
|
10166
10165
|
guid: guid,
|
|
10167
10166
|
config: config,
|
|
10168
10167
|
animElement: $anim,
|
|
@@ -10172,7 +10171,7 @@ define((function () { 'use strict';
|
|
|
10172
10171
|
isCreatedElementList.push($mask);
|
|
10173
10172
|
}
|
|
10174
10173
|
/* 处理返回的配置 */
|
|
10175
|
-
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot,
|
|
10174
|
+
let eventDetails = PopsHandler.handleEventDetails(guid, $shadowContainer, $shadowRoot, popsType, $anim, $pops, $mask, config);
|
|
10176
10175
|
/* 为顶部右边的关闭按钮添加点击事件 */
|
|
10177
10176
|
PopsHandler.handleClickEvent("close", $headerCloseBtn, eventDetails, config.btn.close.callback);
|
|
10178
10177
|
/* 创建到页面中 */
|
|
@@ -10198,7 +10197,7 @@ define((function () { 'use strict';
|
|
|
10198
10197
|
$contentSectionContainer: $contentSectionContainer,
|
|
10199
10198
|
},
|
|
10200
10199
|
});
|
|
10201
|
-
PopsHandler.handlePush(
|
|
10200
|
+
PopsHandler.handlePush(popsType, {
|
|
10202
10201
|
guid: guid,
|
|
10203
10202
|
animElement: $anim,
|
|
10204
10203
|
popsElement: $pops,
|
|
@@ -10360,11 +10359,11 @@ define((function () { 'use strict';
|
|
|
10360
10359
|
init(details) {
|
|
10361
10360
|
const guid = popsUtils.getRandomGUID();
|
|
10362
10361
|
// 设置当前类型
|
|
10363
|
-
const
|
|
10362
|
+
const popsType = "rightClickMenu";
|
|
10364
10363
|
let config = rightClickMenuConfig();
|
|
10365
10364
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
10366
10365
|
config = popsUtils.assign(config, details);
|
|
10367
|
-
config = PopsHandler.handleOnly(
|
|
10366
|
+
config = PopsHandler.handleOnly(popsType, config);
|
|
10368
10367
|
if (config.target == null) {
|
|
10369
10368
|
throw new Error("config.target 不能为空");
|
|
10370
10369
|
}
|
|
@@ -10413,7 +10412,7 @@ define((function () { 'use strict';
|
|
|
10413
10412
|
return;
|
|
10414
10413
|
}
|
|
10415
10414
|
let $click = event.target;
|
|
10416
|
-
if ($click.closest(`.pops-${
|
|
10415
|
+
if ($click.closest(`.pops-${popsType}`)) {
|
|
10417
10416
|
return;
|
|
10418
10417
|
}
|
|
10419
10418
|
if ($click.className &&
|
|
@@ -10432,7 +10431,7 @@ define((function () { 'use strict';
|
|
|
10432
10431
|
return;
|
|
10433
10432
|
}
|
|
10434
10433
|
let $click = event.target;
|
|
10435
|
-
if ($click.closest(`.pops-${
|
|
10434
|
+
if ($click.closest(`.pops-${popsType}`)) {
|
|
10436
10435
|
return;
|
|
10437
10436
|
}
|
|
10438
10437
|
PopsContextMenu.closeAllMenu(PopsContextMenu.rootElement);
|
|
@@ -10478,14 +10477,14 @@ define((function () { 'use strict';
|
|
|
10478
10477
|
if (config.preventDefault) {
|
|
10479
10478
|
popsDOMUtils.preventEvent(event);
|
|
10480
10479
|
}
|
|
10481
|
-
PopsHandler.handleOnly(
|
|
10480
|
+
PopsHandler.handleOnly(popsType, config);
|
|
10482
10481
|
if (PopsContextMenu.rootElement) {
|
|
10483
10482
|
PopsContextMenu.closeAllMenu(PopsContextMenu.rootElement);
|
|
10484
10483
|
}
|
|
10485
10484
|
let rootElement = PopsContextMenu.showMenu(event, config.data, selectorTarget);
|
|
10486
10485
|
PopsContextMenu.rootElement = rootElement;
|
|
10487
10486
|
if (config.only) {
|
|
10488
|
-
PopsHandler.handlePush(
|
|
10487
|
+
PopsHandler.handlePush(popsType, {
|
|
10489
10488
|
$shadowRoot: $shadowRoot,
|
|
10490
10489
|
$shadowContainer: $shadowContainer,
|
|
10491
10490
|
guid: guid,
|
|
@@ -10527,12 +10526,12 @@ define((function () { 'use strict';
|
|
|
10527
10526
|
});
|
|
10528
10527
|
element.remove();
|
|
10529
10528
|
}
|
|
10530
|
-
if (element.classList.contains(`pops-${
|
|
10529
|
+
if (element.classList.contains(`pops-${popsType}-anim-show`)) {
|
|
10531
10530
|
/* 有动画 */
|
|
10532
10531
|
popsDOMUtils.on(element, popsDOMUtils.getTransitionEndNameList(), transitionEndEvent, {
|
|
10533
10532
|
capture: true,
|
|
10534
10533
|
});
|
|
10535
|
-
element.classList.remove(`pops-${
|
|
10534
|
+
element.classList.remove(`pops-${popsType}-anim-show`);
|
|
10536
10535
|
}
|
|
10537
10536
|
else {
|
|
10538
10537
|
/* 无动画 */
|
|
@@ -10564,7 +10563,7 @@ define((function () { 'use strict';
|
|
|
10564
10563
|
*/
|
|
10565
10564
|
getMenuContainerElement(isChildren) {
|
|
10566
10565
|
let $menu = popsDOMUtils.createElement("div", {
|
|
10567
|
-
className: `pops-${
|
|
10566
|
+
className: `pops-${popsType}`,
|
|
10568
10567
|
innerHTML: /*html*/ `
|
|
10569
10568
|
<ul></ul>
|
|
10570
10569
|
`,
|
|
@@ -10578,7 +10577,7 @@ define((function () { 'use strict';
|
|
|
10578
10577
|
}
|
|
10579
10578
|
/* 添加动画 */
|
|
10580
10579
|
if (config.isAnimation) {
|
|
10581
|
-
popsDOMUtils.addClassName($menu, `pops-${
|
|
10580
|
+
popsDOMUtils.addClassName($menu, `pops-${popsType}-anim-grid`);
|
|
10582
10581
|
}
|
|
10583
10582
|
return $menu;
|
|
10584
10583
|
},
|
|
@@ -10718,7 +10717,7 @@ define((function () { 'use strict';
|
|
|
10718
10717
|
});
|
|
10719
10718
|
/* 过渡动画 */
|
|
10720
10719
|
if (config.isAnimation) {
|
|
10721
|
-
popsDOMUtils.addClassName(menuElement, `pops-${
|
|
10720
|
+
popsDOMUtils.addClassName(menuElement, `pops-${popsType}-anim-show`);
|
|
10722
10721
|
}
|
|
10723
10722
|
return menuElement;
|
|
10724
10723
|
},
|
|
@@ -10758,7 +10757,7 @@ define((function () { 'use strict';
|
|
|
10758
10757
|
popsDOMUtils.css(menuElement, { ...offset, display: "" });
|
|
10759
10758
|
/* 过渡动画 */
|
|
10760
10759
|
if (config.isAnimation) {
|
|
10761
|
-
popsDOMUtils.addClassName(menuElement, `pops-${
|
|
10760
|
+
popsDOMUtils.addClassName(menuElement, `pops-${popsType}-anim-show`);
|
|
10762
10761
|
}
|
|
10763
10762
|
return menuElement;
|
|
10764
10763
|
},
|
|
@@ -10779,19 +10778,19 @@ define((function () { 'use strict';
|
|
|
10779
10778
|
if (typeof item.icon === "string" && item.icon.trim() !== "") {
|
|
10780
10779
|
let iconSVGHTML = PopsIcon.getIcon(item.icon) ?? item.icon;
|
|
10781
10780
|
let iconElement = popsDOMUtils.parseTextToDOM(
|
|
10782
|
-
/*html*/ `<i class="pops-${
|
|
10781
|
+
/*html*/ `<i class="pops-${popsType}-icon" is-loading="${item.iconIsLoading ?? false}">${iconSVGHTML}</i>`);
|
|
10783
10782
|
menuLiElement.appendChild(iconElement);
|
|
10784
10783
|
}
|
|
10785
10784
|
/* 插入文字 */
|
|
10786
10785
|
menuLiElement.insertAdjacentHTML("beforeend", PopsSafeUtils.getSafeHTML(`<span>${item.text}</span>`));
|
|
10787
10786
|
/* 如果存在子数据,显示 */
|
|
10788
10787
|
if (item.item && Array.isArray(item.item)) {
|
|
10789
|
-
popsDOMUtils.addClassName(menuLiElement, `pops-${
|
|
10788
|
+
popsDOMUtils.addClassName(menuLiElement, `pops-${popsType}-item`);
|
|
10790
10789
|
}
|
|
10791
10790
|
/* 鼠标|触摸 移入事件 */
|
|
10792
10791
|
function liElementHoverEvent() {
|
|
10793
10792
|
Array.from(menuULElement.children).forEach((liElement) => {
|
|
10794
|
-
popsDOMUtils.removeClassName(liElement, `pops-${
|
|
10793
|
+
popsDOMUtils.removeClassName(liElement, `pops-${popsType}-is-visited`);
|
|
10795
10794
|
if (!liElement.__menuData__) {
|
|
10796
10795
|
return;
|
|
10797
10796
|
}
|
|
@@ -10816,7 +10815,7 @@ define((function () { 'use strict';
|
|
|
10816
10815
|
index--;
|
|
10817
10816
|
}
|
|
10818
10817
|
}
|
|
10819
|
-
popsDOMUtils.addClassName(menuLiElement, `pops-${
|
|
10818
|
+
popsDOMUtils.addClassName(menuLiElement, `pops-${popsType}-is-visited`);
|
|
10820
10819
|
if (!item.item) {
|
|
10821
10820
|
return;
|
|
10822
10821
|
}
|
|
@@ -10939,7 +10938,7 @@ define((function () { 'use strict';
|
|
|
10939
10938
|
init(details) {
|
|
10940
10939
|
const guid = popsUtils.getRandomGUID();
|
|
10941
10940
|
// 设置当前类型
|
|
10942
|
-
const
|
|
10941
|
+
const popsType = "searchSuggestion";
|
|
10943
10942
|
let config = searchSuggestionConfig();
|
|
10944
10943
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
10945
10944
|
config = popsUtils.assign(config, details);
|
|
@@ -11005,7 +11004,7 @@ define((function () { 'use strict';
|
|
|
11005
11004
|
SearchSuggestion.changeHintULElementPosition();
|
|
11006
11005
|
SearchSuggestion.hide();
|
|
11007
11006
|
if (config.isAnimation) {
|
|
11008
|
-
SearchSuggestion.$el.root.classList.add(`pops-${
|
|
11007
|
+
SearchSuggestion.$el.root.classList.add(`pops-${popsType}-animation`);
|
|
11009
11008
|
}
|
|
11010
11009
|
$shadowRoot.appendChild(SearchSuggestion.$el.root);
|
|
11011
11010
|
parentElement.appendChild($shadowContainer);
|
|
@@ -11022,16 +11021,16 @@ define((function () { 'use strict';
|
|
|
11022
11021
|
*/
|
|
11023
11022
|
getSearchSelectElement() {
|
|
11024
11023
|
let element = popsDOMUtils.createElement("div", {
|
|
11025
|
-
className: `pops pops-${
|
|
11024
|
+
className: `pops pops-${popsType}-search-suggestion`,
|
|
11026
11025
|
innerHTML: /*html*/ `
|
|
11027
11026
|
<style data-dynamic="true">
|
|
11028
11027
|
${this.getDynamicCSS()}
|
|
11029
11028
|
</style>
|
|
11030
|
-
<ul class="pops-${
|
|
11029
|
+
<ul class="pops-${popsType}-search-suggestion-hint">${config.toSearhNotResultHTML}</ul>
|
|
11031
11030
|
`,
|
|
11032
11031
|
}, {
|
|
11033
11032
|
"data-guid": guid,
|
|
11034
|
-
"type-value":
|
|
11033
|
+
"type-value": popsType,
|
|
11035
11034
|
});
|
|
11036
11035
|
if (config.className !== "" && config.className != null) {
|
|
11037
11036
|
popsDOMUtils.addClassName(element, config.className);
|
|
@@ -11041,24 +11040,24 @@ define((function () { 'use strict';
|
|
|
11041
11040
|
/** 动态获取CSS */
|
|
11042
11041
|
getDynamicCSS() {
|
|
11043
11042
|
return /*css*/ `
|
|
11044
|
-
.pops-${
|
|
11043
|
+
.pops-${popsType}-animation{
|
|
11045
11044
|
-moz-animation: searchSelectFalIn 0.5s 1 linear;
|
|
11046
11045
|
-webkit-animation: searchSelectFalIn 0.5s 1 linear;
|
|
11047
11046
|
-o-animation: searchSelectFalIn 0.5s 1 linear;
|
|
11048
11047
|
-ms-animation: searchSelectFalIn 0.5s 1 linear;
|
|
11049
11048
|
}
|
|
11050
|
-
.pops-${
|
|
11049
|
+
.pops-${popsType}-search-suggestion{
|
|
11051
11050
|
--search-suggestion-bg-color: #ffffff;
|
|
11052
11051
|
--search-suggestion-box-shadow-color: rgb(0 0 0 / 20%);
|
|
11053
11052
|
--search-suggestion-item-color: #515a6e;
|
|
11054
11053
|
--search-suggestion-item-none-color: #8e8e8e;
|
|
11055
11054
|
--search-suggestion-item-hover-bg-color: rgba(0, 0, 0, .1);
|
|
11056
11055
|
}
|
|
11057
|
-
.pops-${
|
|
11056
|
+
.pops-${popsType}-search-suggestion{
|
|
11058
11057
|
border: initial;
|
|
11059
11058
|
overflow: initial;
|
|
11060
11059
|
}
|
|
11061
|
-
ul.pops-${
|
|
11060
|
+
ul.pops-${popsType}-search-suggestion-hint{
|
|
11062
11061
|
position: ${config.isAbsolute ? "absolute" : "fixed"};
|
|
11063
11062
|
z-index: ${PopsHandler.handleZIndex(config.zIndex)};
|
|
11064
11063
|
width: 0;
|
|
@@ -11073,14 +11072,14 @@ define((function () { 'use strict';
|
|
|
11073
11072
|
box-shadow: 0 1px 6px var(--search-suggestion-box-shadow-color);
|
|
11074
11073
|
}
|
|
11075
11074
|
/* 建议框在上面时 */
|
|
11076
|
-
ul.pops-${
|
|
11075
|
+
ul.pops-${popsType}-search-suggestion-hint[data-top-reverse]{
|
|
11077
11076
|
display: flex;
|
|
11078
11077
|
flex-direction: column-reverse;
|
|
11079
11078
|
}
|
|
11080
|
-
ul.pops-${
|
|
11079
|
+
ul.pops-${popsType}-search-suggestion-hint[data-top-reverse] li{
|
|
11081
11080
|
flex-shrink: 0;
|
|
11082
11081
|
}
|
|
11083
|
-
ul.pops-${
|
|
11082
|
+
ul.pops-${popsType}-search-suggestion-hint li{
|
|
11084
11083
|
padding: 7px;
|
|
11085
11084
|
margin: 0;
|
|
11086
11085
|
clear: both;
|
|
@@ -11093,17 +11092,17 @@ define((function () { 'use strict';
|
|
|
11093
11092
|
text-overflow: ellipsis;
|
|
11094
11093
|
width: 100%;
|
|
11095
11094
|
}
|
|
11096
|
-
ul.pops-${
|
|
11095
|
+
ul.pops-${popsType}-search-suggestion-hint li[data-none]{
|
|
11097
11096
|
text-align: center;
|
|
11098
11097
|
font-size: 12px;
|
|
11099
11098
|
color: var(--search-suggestion-item-none-color);
|
|
11100
11099
|
}
|
|
11101
|
-
ul.pops-${
|
|
11100
|
+
ul.pops-${popsType}-search-suggestion-hint li:hover{
|
|
11102
11101
|
background-color: var(--search-suggestion-item-hover-bg-color);
|
|
11103
11102
|
}
|
|
11104
11103
|
|
|
11105
11104
|
@media (prefers-color-scheme: dark){
|
|
11106
|
-
.pops-${
|
|
11105
|
+
.pops-${popsType}-search-suggestion{
|
|
11107
11106
|
--search-suggestion-bg-color: #1d1e1f;
|
|
11108
11107
|
--search-suggestion-item-color: #cfd3d4;
|
|
11109
11108
|
--search-suggestion-item-hover-bg-color: rgba(175, 175, 175, .1);
|
|
@@ -11118,7 +11117,7 @@ define((function () { 'use strict';
|
|
|
11118
11117
|
*/
|
|
11119
11118
|
getSearchItemLiElement(data, index) {
|
|
11120
11119
|
return popsDOMUtils.createElement("li", {
|
|
11121
|
-
className: `pops-${
|
|
11120
|
+
className: `pops-${popsType}-search-suggestion-hint-item pops-flex-items-center pops-flex-y-center`,
|
|
11122
11121
|
"data-index": index,
|
|
11123
11122
|
"data-value": SearchSuggestion.getItemDataValue(data),
|
|
11124
11123
|
innerHTML: `${config.getItemHTML(data)}${config.deleteIcon.enable ? SearchSuggestion.getDeleteIconHTML() : ""}`,
|
|
@@ -11139,7 +11138,7 @@ define((function () { 'use strict';
|
|
|
11139
11138
|
popsDOMUtils.on(liElement, "click", void 0, (event) => {
|
|
11140
11139
|
popsDOMUtils.preventEvent(event);
|
|
11141
11140
|
let $click = event.target;
|
|
11142
|
-
if ($click.closest(`.pops-${
|
|
11141
|
+
if ($click.closest(`.pops-${popsType}-delete-icon`)) {
|
|
11143
11142
|
/* 点击的是删除按钮 */
|
|
11144
11143
|
if (typeof config.deleteIcon.callback === "function") {
|
|
11145
11144
|
config.deleteIcon.callback(event, liElement, liElement["data-value"]);
|
|
@@ -11331,7 +11330,7 @@ define((function () { 'use strict';
|
|
|
11331
11330
|
*/
|
|
11332
11331
|
getDeleteIconHTML(size = 16, fill = "#bababa") {
|
|
11333
11332
|
return /*html*/ `
|
|
11334
|
-
<svg class="pops-${
|
|
11333
|
+
<svg class="pops-${popsType}-delete-icon" viewBox="0 0 1024 1024" xmlns="http://www.w3.org/2000/svg" width="${size}" height="${size}" fill="${fill}">
|
|
11335
11334
|
<path d="M512 883.2A371.2 371.2 0 1 0 140.8 512 371.2 371.2 0 0 0 512 883.2z m0 64a435.2 435.2 0 1 1 435.2-435.2 435.2 435.2 0 0 1-435.2 435.2z"></path>
|
|
11336
11335
|
<path d="M557.056 512l122.368 122.368a31.744 31.744 0 1 1-45.056 45.056L512 557.056l-122.368 122.368a31.744 31.744 0 1 1-45.056-45.056L466.944 512 344.576 389.632a31.744 31.744 0 1 1 45.056-45.056L512 466.944l122.368-122.368a31.744 31.744 0 1 1 45.056 45.056z"></path>
|
|
11337
11336
|
</svg>
|
|
@@ -11342,7 +11341,7 @@ define((function () { 'use strict';
|
|
|
11342
11341
|
*/
|
|
11343
11342
|
setPromptsInSearch() {
|
|
11344
11343
|
let isSearchingElement = popsDOMUtils.createElement("li", {
|
|
11345
|
-
className: `pops-${
|
|
11344
|
+
className: `pops-${popsType}-search-suggestion-hint-searching-item`,
|
|
11346
11345
|
innerHTML: config.searchingTip,
|
|
11347
11346
|
});
|
|
11348
11347
|
SearchSuggestion.$el.$hintULContainer.appendChild(isSearchingElement);
|
|
@@ -11352,7 +11351,7 @@ define((function () { 'use strict';
|
|
|
11352
11351
|
*/
|
|
11353
11352
|
removePromptsInSearch() {
|
|
11354
11353
|
SearchSuggestion.$el.$hintULContainer
|
|
11355
|
-
.querySelector(`li.pops-${
|
|
11354
|
+
.querySelector(`li.pops-${popsType}-search-suggestion-hint-searching-item`)
|
|
11356
11355
|
?.remove();
|
|
11357
11356
|
},
|
|
11358
11357
|
/**
|