@lvce-editor/virtual-dom 7.2.0 → 7.4.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.js +16 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -342,6 +342,11 @@ const getEventListenerOptions = (eventName, value) => {
|
|
|
342
342
|
passive: true
|
|
343
343
|
};
|
|
344
344
|
}
|
|
345
|
+
if (value.capture) {
|
|
346
|
+
return {
|
|
347
|
+
capture: true
|
|
348
|
+
};
|
|
349
|
+
}
|
|
345
350
|
switch (eventName) {
|
|
346
351
|
case 'wheel':
|
|
347
352
|
return {
|
|
@@ -436,6 +441,11 @@ const getOptions = fn => {
|
|
|
436
441
|
passive: true
|
|
437
442
|
};
|
|
438
443
|
}
|
|
444
|
+
if (fn.capture) {
|
|
445
|
+
return {
|
|
446
|
+
capture: true
|
|
447
|
+
};
|
|
448
|
+
}
|
|
439
449
|
return undefined;
|
|
440
450
|
};
|
|
441
451
|
const attachEvent = ($Node, eventMap, key, value, newEventMap) => {
|
|
@@ -975,6 +985,8 @@ const getEventListenerArg = (param, event) => {
|
|
|
975
985
|
return event.target.className;
|
|
976
986
|
case 'event.target.dataset.groupIndex':
|
|
977
987
|
return event.target.dataset.groupIndex;
|
|
988
|
+
case 'event.target.dataset.id':
|
|
989
|
+
return event.target.dataset.id;
|
|
978
990
|
case 'event.target.dataset.index':
|
|
979
991
|
return event.target.dataset.index;
|
|
980
992
|
case 'event.target.dataset.name':
|
|
@@ -1066,6 +1078,10 @@ const createFn = (info, map) => {
|
|
|
1066
1078
|
// TODO avoid mutating function property, maybe return an object with function and options
|
|
1067
1079
|
fn.passive = true;
|
|
1068
1080
|
}
|
|
1081
|
+
if (info.capture) {
|
|
1082
|
+
// TODO avoid mutating function property, maybe return an object with function and options
|
|
1083
|
+
fn.capture = true;
|
|
1084
|
+
}
|
|
1069
1085
|
return fn;
|
|
1070
1086
|
};
|
|
1071
1087
|
|