@whitesev/pops 3.0.2 → 3.1.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 +87 -66
- 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 +87 -66
- 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 +87 -66
- 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 +87 -66
- 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 +87 -66
- 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 +87 -66
- 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 +20 -20
- package/dist/types/src/components/panel/handlerComponents.d.ts +4 -6
- package/dist/types/src/components/tooltip/index.d.ts +2 -2
- package/dist/types/src/components/tooltip/types/index.d.ts +3 -3
- package/dist/types/src/types/PopsDOMUtilsEventType.d.ts +22 -0
- package/dist/types/src/utils/PopsDOMUtils.d.ts +29 -29
- package/dist/types/src/utils/PopsInstanceUtils.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/folder/index.ts +3 -3
- package/src/components/panel/handlerComponents.ts +8 -10
- package/src/components/rightClickMenu/index.ts +3 -3
- package/src/components/tooltip/defaultConfig.ts +2 -2
- package/src/components/tooltip/index.ts +4 -4
- package/src/components/tooltip/types/index.ts +3 -3
- package/src/types/PopsDOMUtilsEventType.d.ts +22 -0
- package/src/utils/PopsDOMUtils.ts +90 -59
- package/src/utils/PopsInstanceUtils.ts +5 -5
package/dist/index.umd.js
CHANGED
|
@@ -876,22 +876,25 @@
|
|
|
876
876
|
}
|
|
877
877
|
return option;
|
|
878
878
|
}
|
|
879
|
-
const
|
|
879
|
+
const that = this;
|
|
880
880
|
// eslint-disable-next-line prefer-rest-params
|
|
881
881
|
const args = arguments;
|
|
882
882
|
if (typeof element === "string") {
|
|
883
|
-
element =
|
|
883
|
+
element = that.selectorAll(element);
|
|
884
884
|
}
|
|
885
885
|
if (element == null) {
|
|
886
|
-
return
|
|
886
|
+
return {
|
|
887
|
+
off() { },
|
|
888
|
+
emit() { },
|
|
889
|
+
};
|
|
887
890
|
}
|
|
888
|
-
let
|
|
891
|
+
let $elList = [];
|
|
889
892
|
if (element instanceof NodeList || Array.isArray(element)) {
|
|
890
893
|
element = element;
|
|
891
|
-
|
|
894
|
+
$elList = [...element];
|
|
892
895
|
}
|
|
893
896
|
else {
|
|
894
|
-
|
|
897
|
+
$elList.push(element);
|
|
895
898
|
}
|
|
896
899
|
// 事件名
|
|
897
900
|
let eventTypeList = [];
|
|
@@ -933,10 +936,10 @@
|
|
|
933
936
|
*/
|
|
934
937
|
function checkOptionOnceToRemoveEventListener() {
|
|
935
938
|
if (listenerOption.once) {
|
|
936
|
-
|
|
939
|
+
that.off(element, eventType, selector, callback, option);
|
|
937
940
|
}
|
|
938
941
|
}
|
|
939
|
-
|
|
942
|
+
$elList.forEach((elementItem) => {
|
|
940
943
|
/**
|
|
941
944
|
* 事件回调
|
|
942
945
|
* @param event
|
|
@@ -956,12 +959,12 @@
|
|
|
956
959
|
}
|
|
957
960
|
const findValue = selectorList.find((selectorItem) => {
|
|
958
961
|
// 判断目标元素是否匹配选择器
|
|
959
|
-
if (
|
|
962
|
+
if (that.matches(eventTarget, selectorItem)) {
|
|
960
963
|
// 当前目标可以被selector所匹配到
|
|
961
964
|
return true;
|
|
962
965
|
}
|
|
963
966
|
// 在上层与主元素之间寻找可以被selector所匹配到的
|
|
964
|
-
const $closestMatches =
|
|
967
|
+
const $closestMatches = that.closest(eventTarget, selectorItem);
|
|
965
968
|
if ($closestMatches && totalParent?.contains($closestMatches)) {
|
|
966
969
|
eventTarget = $closestMatches;
|
|
967
970
|
return true;
|
|
@@ -1007,6 +1010,23 @@
|
|
|
1007
1010
|
Reflect.set(elementItem, SymbolEvents, elementEvents);
|
|
1008
1011
|
});
|
|
1009
1012
|
});
|
|
1013
|
+
return {
|
|
1014
|
+
/**
|
|
1015
|
+
* 取消绑定的监听事件
|
|
1016
|
+
* @param filter (可选)过滤函数,对元素属性上的事件进行过滤出想要删除的事件
|
|
1017
|
+
*/
|
|
1018
|
+
off: (filter) => {
|
|
1019
|
+
that.off($elList, eventTypeList, selectorList, listenerCallBack, listenerOption, filter);
|
|
1020
|
+
},
|
|
1021
|
+
/**
|
|
1022
|
+
* 主动触发事件
|
|
1023
|
+
* @param details 赋予触发的Event的额外属性,如果是Event类型,那么将自动代替默认new的Event对象
|
|
1024
|
+
* @param useDispatchToEmit 是否使用dispatchEvent来触发事件,默认true,如果为false,则直接调用callback,但是这种会让使用了selectorTarget的没有值
|
|
1025
|
+
*/
|
|
1026
|
+
emit: (details, useDispatchToEmit) => {
|
|
1027
|
+
that.emit($elList, eventTypeList, details, useDispatchToEmit);
|
|
1028
|
+
},
|
|
1029
|
+
};
|
|
1010
1030
|
}
|
|
1011
1031
|
off(element, eventType, selector, callback, option, filter) {
|
|
1012
1032
|
/**
|
|
@@ -1184,11 +1204,11 @@
|
|
|
1184
1204
|
* 等待文档加载完成后执行指定的函数
|
|
1185
1205
|
* @param callback 需要执行的函数
|
|
1186
1206
|
* @example
|
|
1187
|
-
* DOMUtils.
|
|
1207
|
+
* DOMUtils.onReady(function(){
|
|
1188
1208
|
* console.log("文档加载完毕")
|
|
1189
1209
|
* })
|
|
1190
1210
|
*/
|
|
1191
|
-
|
|
1211
|
+
onReady(callback) {
|
|
1192
1212
|
const that = this;
|
|
1193
1213
|
if (typeof callback !== "function") {
|
|
1194
1214
|
return;
|
|
@@ -1261,16 +1281,16 @@
|
|
|
1261
1281
|
* @param element 需要触发的元素|元素数组|window
|
|
1262
1282
|
* @param eventType 需要触发的事件
|
|
1263
1283
|
* @param details 赋予触发的Event的额外属性,如果是Event类型,那么将自动代替默认new的Event对象
|
|
1264
|
-
* @param
|
|
1284
|
+
* @param useDispatchToEmitEvent 是否使用dispatchEvent来触发事件,默认true
|
|
1265
1285
|
* @example
|
|
1266
1286
|
* // 触发元素a.xx的click事件
|
|
1267
|
-
* DOMUtils.
|
|
1268
|
-
* DOMUtils.
|
|
1287
|
+
* DOMUtils.emit(document.querySelector("a.xx"),"click")
|
|
1288
|
+
* DOMUtils.emit("a.xx","click")
|
|
1269
1289
|
* // 触发元素a.xx的click、tap、hover事件
|
|
1270
|
-
* DOMUtils.
|
|
1271
|
-
* DOMUtils.
|
|
1290
|
+
* DOMUtils.emit(document.querySelector("a.xx"),"click tap hover")
|
|
1291
|
+
* DOMUtils.emit("a.xx",["click","tap","hover"])
|
|
1272
1292
|
*/
|
|
1273
|
-
|
|
1293
|
+
emit(element, eventType, details, useDispatchToEmitEvent = true) {
|
|
1274
1294
|
if (typeof element === "string") {
|
|
1275
1295
|
element = PopsCore.document.querySelector(element);
|
|
1276
1296
|
}
|
|
@@ -1308,7 +1328,7 @@
|
|
|
1308
1328
|
});
|
|
1309
1329
|
}
|
|
1310
1330
|
}
|
|
1311
|
-
if (
|
|
1331
|
+
if (useDispatchToEmitEvent == false && _eventType_ in events) {
|
|
1312
1332
|
events[_eventType_].forEach((eventsItem) => {
|
|
1313
1333
|
eventsItem.callback(event);
|
|
1314
1334
|
});
|
|
@@ -1324,7 +1344,7 @@
|
|
|
1324
1344
|
* @param element 目标元素
|
|
1325
1345
|
* @param handler (可选)事件处理函数
|
|
1326
1346
|
* @param details (可选)赋予触发的Event的额外属性
|
|
1327
|
-
* @param
|
|
1347
|
+
* @param useDispatchToEmitEvent (可选)是否使用dispatchEvent来触发事件,默认true
|
|
1328
1348
|
* @example
|
|
1329
1349
|
* // 触发元素a.xx的click事件
|
|
1330
1350
|
* DOMUtils.click(document.querySelector("a.xx"))
|
|
@@ -1333,7 +1353,7 @@
|
|
|
1333
1353
|
* console.log("触发click事件成功")
|
|
1334
1354
|
* })
|
|
1335
1355
|
* */
|
|
1336
|
-
click(element, handler, details,
|
|
1356
|
+
click(element, handler, details, useDispatchToEmitEvent) {
|
|
1337
1357
|
const DOMUtilsContext = this;
|
|
1338
1358
|
if (typeof element === "string") {
|
|
1339
1359
|
element = PopsCore.document.querySelector(element);
|
|
@@ -1342,7 +1362,7 @@
|
|
|
1342
1362
|
return;
|
|
1343
1363
|
}
|
|
1344
1364
|
if (handler == null) {
|
|
1345
|
-
DOMUtilsContext.
|
|
1365
|
+
DOMUtilsContext.emit(element, "click", details, useDispatchToEmitEvent);
|
|
1346
1366
|
}
|
|
1347
1367
|
else {
|
|
1348
1368
|
DOMUtilsContext.on(element, "click", null, handler);
|
|
@@ -1353,7 +1373,7 @@
|
|
|
1353
1373
|
* @param element 目标元素
|
|
1354
1374
|
* @param handler (可选)事件处理函数
|
|
1355
1375
|
* @param details (可选)赋予触发的Event的额外属性
|
|
1356
|
-
* @param
|
|
1376
|
+
* @param useDispatchToEmitEvent (可选)是否使用dispatchEvent来触发事件,默认true
|
|
1357
1377
|
* @example
|
|
1358
1378
|
* // 触发元素a.xx的blur事件
|
|
1359
1379
|
* DOMUtils.blur(document.querySelector("a.xx"))
|
|
@@ -1362,7 +1382,7 @@
|
|
|
1362
1382
|
* console.log("触发blur事件成功")
|
|
1363
1383
|
* })
|
|
1364
1384
|
* */
|
|
1365
|
-
blur(element, handler, details,
|
|
1385
|
+
blur(element, handler, details, useDispatchToEmitEvent) {
|
|
1366
1386
|
const DOMUtilsContext = this;
|
|
1367
1387
|
if (typeof element === "string") {
|
|
1368
1388
|
element = PopsCore.document.querySelector(element);
|
|
@@ -1371,7 +1391,7 @@
|
|
|
1371
1391
|
return;
|
|
1372
1392
|
}
|
|
1373
1393
|
if (handler === null) {
|
|
1374
|
-
DOMUtilsContext.
|
|
1394
|
+
DOMUtilsContext.emit(element, "blur", details, useDispatchToEmitEvent);
|
|
1375
1395
|
}
|
|
1376
1396
|
else {
|
|
1377
1397
|
DOMUtilsContext.on(element, "blur", null, handler);
|
|
@@ -1382,7 +1402,7 @@
|
|
|
1382
1402
|
* @param element 目标元素
|
|
1383
1403
|
* @param handler (可选)事件处理函数
|
|
1384
1404
|
* @param details (可选)赋予触发的Event的额外属性
|
|
1385
|
-
* @param
|
|
1405
|
+
* @param useDispatchToEmitEvent (可选)是否使用dispatchEvent来触发事件,默认true
|
|
1386
1406
|
* @example
|
|
1387
1407
|
* // 触发元素a.xx的focus事件
|
|
1388
1408
|
* DOMUtils.focus(document.querySelector("a.xx"))
|
|
@@ -1391,7 +1411,7 @@
|
|
|
1391
1411
|
* console.log("触发focus事件成功")
|
|
1392
1412
|
* })
|
|
1393
1413
|
* */
|
|
1394
|
-
focus(element, handler, details,
|
|
1414
|
+
focus(element, handler, details, useDispatchToEmitEvent) {
|
|
1395
1415
|
const DOMUtilsContext = this;
|
|
1396
1416
|
if (typeof element === "string") {
|
|
1397
1417
|
element = PopsCore.document.querySelector(element);
|
|
@@ -1400,7 +1420,7 @@
|
|
|
1400
1420
|
return;
|
|
1401
1421
|
}
|
|
1402
1422
|
if (handler == null) {
|
|
1403
|
-
DOMUtilsContext.
|
|
1423
|
+
DOMUtilsContext.emit(element, "focus", details, useDispatchToEmitEvent);
|
|
1404
1424
|
}
|
|
1405
1425
|
else {
|
|
1406
1426
|
DOMUtilsContext.on(element, "focus", null, handler);
|
|
@@ -1420,7 +1440,7 @@
|
|
|
1420
1440
|
* console.log("移入/移除");
|
|
1421
1441
|
* })
|
|
1422
1442
|
*/
|
|
1423
|
-
|
|
1443
|
+
onHover(element, handler, option) {
|
|
1424
1444
|
const DOMUtilsContext = this;
|
|
1425
1445
|
if (typeof element === "string") {
|
|
1426
1446
|
element = PopsCore.document.querySelector(element);
|
|
@@ -1446,7 +1466,7 @@
|
|
|
1446
1466
|
* console.log("按键松开");
|
|
1447
1467
|
* })
|
|
1448
1468
|
*/
|
|
1449
|
-
|
|
1469
|
+
onKeyup(target, handler, option) {
|
|
1450
1470
|
const DOMUtilsContext = this;
|
|
1451
1471
|
if (target == null) {
|
|
1452
1472
|
return;
|
|
@@ -1471,7 +1491,7 @@
|
|
|
1471
1491
|
* console.log("按键按下");
|
|
1472
1492
|
* })
|
|
1473
1493
|
*/
|
|
1474
|
-
|
|
1494
|
+
onKeydown(target, handler, option) {
|
|
1475
1495
|
const DOMUtilsContext = this;
|
|
1476
1496
|
if (target == null) {
|
|
1477
1497
|
return;
|
|
@@ -1496,7 +1516,7 @@
|
|
|
1496
1516
|
* console.log("按键按下");
|
|
1497
1517
|
* })
|
|
1498
1518
|
*/
|
|
1499
|
-
|
|
1519
|
+
onKeypress(target, handler, option) {
|
|
1500
1520
|
const DOMUtilsContext = this;
|
|
1501
1521
|
if (target == null) {
|
|
1502
1522
|
return;
|
|
@@ -2555,6 +2575,9 @@
|
|
|
2555
2575
|
* 监input、textarea的输入框值改变的事件
|
|
2556
2576
|
*/
|
|
2557
2577
|
onInput($el, callback, option) {
|
|
2578
|
+
/**
|
|
2579
|
+
* 是否正在输入中
|
|
2580
|
+
*/
|
|
2558
2581
|
let isComposite = false;
|
|
2559
2582
|
const __callback = async (event) => {
|
|
2560
2583
|
if (isComposite)
|
|
@@ -2566,18 +2589,18 @@
|
|
|
2566
2589
|
};
|
|
2567
2590
|
const __composition_end_callback = () => {
|
|
2568
2591
|
isComposite = false;
|
|
2569
|
-
this.
|
|
2592
|
+
this.emit($el, "input", {
|
|
2570
2593
|
isComposite,
|
|
2571
2594
|
});
|
|
2572
2595
|
};
|
|
2573
|
-
this.on($el, "input", __callback, option);
|
|
2574
|
-
this.on($el, "compositionstart", __composition_start_callback, option);
|
|
2575
|
-
this.on($el, "compositionend", __composition_end_callback, option);
|
|
2596
|
+
const inputListener = this.on($el, "input", __callback, option);
|
|
2597
|
+
const compositionStartListener = this.on($el, "compositionstart", __composition_start_callback, option);
|
|
2598
|
+
const compositionEndListener = this.on($el, "compositionend", __composition_end_callback, option);
|
|
2576
2599
|
return {
|
|
2577
2600
|
off: () => {
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2601
|
+
inputListener.off();
|
|
2602
|
+
compositionStartListener.off();
|
|
2603
|
+
compositionEndListener.off();
|
|
2581
2604
|
},
|
|
2582
2605
|
};
|
|
2583
2606
|
}
|
|
@@ -3314,7 +3337,7 @@
|
|
|
3314
3337
|
popsDOMUtils.on($pops, popsDOMUtils.getTransitionEndNameList(), closeCallBack);
|
|
3315
3338
|
const popsTransForm = getComputedStyle($pops).transform;
|
|
3316
3339
|
if (popsTransForm !== "none") {
|
|
3317
|
-
popsDOMUtils.
|
|
3340
|
+
popsDOMUtils.emit($pops, popsDOMUtils.getTransitionEndNameList(), void 0, true);
|
|
3318
3341
|
return;
|
|
3319
3342
|
}
|
|
3320
3343
|
if (["top"].includes(drawerConfig.direction)) {
|
|
@@ -3357,7 +3380,7 @@
|
|
|
3357
3380
|
limit: true,
|
|
3358
3381
|
extraDistance: 3,
|
|
3359
3382
|
container: PopsCore.globalThis,
|
|
3360
|
-
|
|
3383
|
+
emitClick: true,
|
|
3361
3384
|
}, options);
|
|
3362
3385
|
let isMove = false;
|
|
3363
3386
|
// 点击元素,left偏移
|
|
@@ -3508,11 +3531,11 @@
|
|
|
3508
3531
|
}
|
|
3509
3532
|
}
|
|
3510
3533
|
});
|
|
3511
|
-
if (options.
|
|
3534
|
+
if (options.emitClick) {
|
|
3512
3535
|
// 因为会覆盖上面的点击事件,主动触发一下
|
|
3513
3536
|
anyTouchElement.on(["tap"], function (event) {
|
|
3514
3537
|
event.changedPoints.forEach((item) => {
|
|
3515
|
-
popsDOMUtils.
|
|
3538
|
+
popsDOMUtils.emit(item.target, "click", void 0, true);
|
|
3516
3539
|
});
|
|
3517
3540
|
});
|
|
3518
3541
|
}
|
|
@@ -5248,17 +5271,17 @@
|
|
|
5248
5271
|
});
|
|
5249
5272
|
// 设置默认触发的arrow
|
|
5250
5273
|
if (config.sort.name === "fileName") {
|
|
5251
|
-
popsDOMUtils.
|
|
5274
|
+
popsDOMUtils.emit(folderListSortFileNameElement, "click", {
|
|
5252
5275
|
notChangeSortRule: true,
|
|
5253
5276
|
});
|
|
5254
5277
|
}
|
|
5255
5278
|
else if (config.sort.name === "latestTime") {
|
|
5256
|
-
popsDOMUtils.
|
|
5279
|
+
popsDOMUtils.emit(folderListSortLatestTimeElement, "click", {
|
|
5257
5280
|
notChangeSortRule: true,
|
|
5258
5281
|
});
|
|
5259
5282
|
}
|
|
5260
5283
|
else if (config.sort.name === "fileSize") {
|
|
5261
|
-
popsDOMUtils.
|
|
5284
|
+
popsDOMUtils.emit(folderListSortFileSizeElement, "click", {
|
|
5262
5285
|
notChangeSortRule: true,
|
|
5263
5286
|
});
|
|
5264
5287
|
}
|
|
@@ -7054,8 +7077,8 @@
|
|
|
7054
7077
|
className: "",
|
|
7055
7078
|
isFixed: false,
|
|
7056
7079
|
alwaysShow: false,
|
|
7057
|
-
|
|
7058
|
-
|
|
7080
|
+
onShowEventName: "mouseenter touchstart",
|
|
7081
|
+
onCloseEventName: "mouseleave touchend",
|
|
7059
7082
|
zIndex: 10000,
|
|
7060
7083
|
only: false,
|
|
7061
7084
|
eventOption: {
|
|
@@ -7386,13 +7409,13 @@
|
|
|
7386
7409
|
* 绑定 显示事件
|
|
7387
7410
|
*/
|
|
7388
7411
|
onShowEvent() {
|
|
7389
|
-
popsDOMUtils.on(this.$data.config.$target, this.$data.config.
|
|
7412
|
+
popsDOMUtils.on(this.$data.config.$target, this.$data.config.onShowEventName, this.show, this.$data.config.eventOption);
|
|
7390
7413
|
}
|
|
7391
7414
|
/**
|
|
7392
7415
|
* 取消绑定 显示事件
|
|
7393
7416
|
*/
|
|
7394
7417
|
offShowEvent() {
|
|
7395
|
-
popsDOMUtils.off(this.$data.config.$target, this.$data.config.
|
|
7418
|
+
popsDOMUtils.off(this.$data.config.$target, this.$data.config.onShowEventName, this.show, {
|
|
7396
7419
|
capture: true,
|
|
7397
7420
|
});
|
|
7398
7421
|
}
|
|
@@ -7447,13 +7470,13 @@
|
|
|
7447
7470
|
* 绑定 关闭事件
|
|
7448
7471
|
*/
|
|
7449
7472
|
onCloseEvent() {
|
|
7450
|
-
popsDOMUtils.on(this.$data.config.$target, this.$data.config.
|
|
7473
|
+
popsDOMUtils.on(this.$data.config.$target, this.$data.config.onCloseEventName, this.close, this.$data.config.eventOption);
|
|
7451
7474
|
}
|
|
7452
7475
|
/**
|
|
7453
7476
|
* 取消绑定 关闭事件
|
|
7454
7477
|
*/
|
|
7455
7478
|
offCloseEvent() {
|
|
7456
|
-
popsDOMUtils.off(this.$data.config.$target, this.$data.config.
|
|
7479
|
+
popsDOMUtils.off(this.$data.config.$target, this.$data.config.onCloseEventName, this.close, {
|
|
7457
7480
|
capture: true,
|
|
7458
7481
|
});
|
|
7459
7482
|
}
|
|
@@ -8862,7 +8885,7 @@
|
|
|
8862
8885
|
/**
|
|
8863
8886
|
* 主动触发输入框改变事件
|
|
8864
8887
|
*/
|
|
8865
|
-
|
|
8888
|
+
emitValueChange() {
|
|
8866
8889
|
this.$el.input.dispatchEvent(new Event("input"));
|
|
8867
8890
|
},
|
|
8868
8891
|
/**
|
|
@@ -9632,7 +9655,6 @@
|
|
|
9632
9655
|
/**
|
|
9633
9656
|
* 添加选中信息
|
|
9634
9657
|
* @param data 选择项的数据
|
|
9635
|
-
* @param [triggerValueChangeCallBack=true] 主动触发值改变回调
|
|
9636
9658
|
*/
|
|
9637
9659
|
addSelectedItemInfo(data) {
|
|
9638
9660
|
this.resetCurrentSelectedInfo();
|
|
@@ -10042,7 +10064,6 @@
|
|
|
10042
10064
|
/**
|
|
10043
10065
|
* 添加选中信息
|
|
10044
10066
|
* @param data 选择项的数据
|
|
10045
|
-
* @param [triggerValueChangeCallBack=true] 主动触发值改变回调
|
|
10046
10067
|
*/
|
|
10047
10068
|
addSelectedItemInfo(data) {
|
|
10048
10069
|
this.resetCurrentSelectedInfo();
|
|
@@ -10753,11 +10774,11 @@
|
|
|
10753
10774
|
/**
|
|
10754
10775
|
* 从保存的已选中的信息列表中移除目标信息
|
|
10755
10776
|
* @param data 需要移除的信息
|
|
10756
|
-
* @param [
|
|
10777
|
+
* @param [emitValueChangeCallBack=true] 是否触发值改变的回调
|
|
10757
10778
|
* + true (默认)触发值改变的回调
|
|
10758
10779
|
* + false 不触发值改变的回调
|
|
10759
10780
|
*/
|
|
10760
|
-
removeSelectedInfo(data,
|
|
10781
|
+
removeSelectedInfo(data, emitValueChangeCallBack = true) {
|
|
10761
10782
|
for (let index = 0; index < this.$data.selectedDataList.length; index++) {
|
|
10762
10783
|
const selectInfo = this.$data.selectedDataList[index];
|
|
10763
10784
|
if (selectInfo.value === data.value) {
|
|
@@ -10765,7 +10786,7 @@
|
|
|
10765
10786
|
break;
|
|
10766
10787
|
}
|
|
10767
10788
|
}
|
|
10768
|
-
|
|
10789
|
+
emitValueChangeCallBack && this.onValueChange();
|
|
10769
10790
|
},
|
|
10770
10791
|
/** 显示输入框 */
|
|
10771
10792
|
showInputWrapper() {
|
|
@@ -11182,7 +11203,7 @@
|
|
|
11182
11203
|
else {
|
|
11183
11204
|
leaveViewTransition();
|
|
11184
11205
|
}
|
|
11185
|
-
that.
|
|
11206
|
+
that.emitRenderRightContainer($currentSection);
|
|
11186
11207
|
}, {
|
|
11187
11208
|
once: true,
|
|
11188
11209
|
});
|
|
@@ -11224,7 +11245,7 @@
|
|
|
11224
11245
|
$sectionBodyContainer: $deepMenuMain,
|
|
11225
11246
|
});
|
|
11226
11247
|
}
|
|
11227
|
-
that.
|
|
11248
|
+
that.emitRenderRightContainer($deepMenuSection);
|
|
11228
11249
|
},
|
|
11229
11250
|
/** 设置项的点击事件 */
|
|
11230
11251
|
onLiClick() {
|
|
@@ -11385,7 +11406,7 @@
|
|
|
11385
11406
|
* 主动触发触发渲染右侧容器的事件
|
|
11386
11407
|
* @param $container 容器
|
|
11387
11408
|
*/
|
|
11388
|
-
|
|
11409
|
+
emitRenderRightContainer($container) {
|
|
11389
11410
|
const dataViewConfig = Reflect.get($container, this.$data.nodeStoreConfigKey);
|
|
11390
11411
|
this.$el.$pops.dispatchEvent(new CustomEvent("pops:renderRightContainer", {
|
|
11391
11412
|
detail: {
|
|
@@ -11450,7 +11471,7 @@
|
|
|
11450
11471
|
return;
|
|
11451
11472
|
}
|
|
11452
11473
|
}
|
|
11453
|
-
this.
|
|
11474
|
+
this.emitRenderRightContainer(this.$el.$panelContentSectionContainer);
|
|
11454
11475
|
});
|
|
11455
11476
|
},
|
|
11456
11477
|
};
|
|
@@ -12384,15 +12405,15 @@
|
|
|
12384
12405
|
}
|
|
12385
12406
|
// 鼠标|触摸 移入事件
|
|
12386
12407
|
// 在移动端会先触发touchstart再然后mouseenter
|
|
12387
|
-
let
|
|
12408
|
+
let isEmitTouchEvent = false;
|
|
12388
12409
|
/**
|
|
12389
12410
|
* 鼠标|触摸 移入事件
|
|
12390
12411
|
*/
|
|
12391
12412
|
function liElementHoverEvent(event) {
|
|
12392
12413
|
if (event.type === "touchstart") {
|
|
12393
|
-
|
|
12414
|
+
isEmitTouchEvent = true;
|
|
12394
12415
|
}
|
|
12395
|
-
if (
|
|
12416
|
+
if (isEmitTouchEvent && event.type === "mouseenter") {
|
|
12396
12417
|
return;
|
|
12397
12418
|
}
|
|
12398
12419
|
Array.from(menuULElement.children).forEach((liElement) => {
|
|
@@ -13344,7 +13365,7 @@
|
|
|
13344
13365
|
},
|
|
13345
13366
|
};
|
|
13346
13367
|
|
|
13347
|
-
const version = "3.0
|
|
13368
|
+
const version = "3.1.0";
|
|
13348
13369
|
|
|
13349
13370
|
class Pops {
|
|
13350
13371
|
/** 配置 */
|