@tarojs/runtime 4.0.0-alpha.39 → 4.0.0-alpha.42
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/dom/event.js +5 -4
- package/dist/dom/event.js.map +1 -1
- package/dist/index.cjs.js +5 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/runtime.esm.js +5 -4
- package/dist/runtime.esm.js.map +1 -1
- package/package.json +2 -2
package/dist/runtime.esm.js
CHANGED
|
@@ -3375,14 +3375,15 @@ class TaroEvent {
|
|
|
3375
3375
|
this.defaultPrevented = true;
|
|
3376
3376
|
}
|
|
3377
3377
|
get target() {
|
|
3378
|
-
var _a, _b, _c, _d;
|
|
3378
|
+
var _a, _b, _c, _d, _e;
|
|
3379
3379
|
const cacheTarget = this.cacheTarget;
|
|
3380
3380
|
if (!cacheTarget) {
|
|
3381
3381
|
const target = Object.create(((_a = this.mpEvent) === null || _a === void 0 ? void 0 : _a.target) || null);
|
|
3382
|
+
const currentEle = env.document.getElementById(((_b = target.dataset) === null || _b === void 0 ? void 0 : _b.sid) || target.id || null);
|
|
3382
3383
|
// Note:优先判断冒泡场景alipay的targetDataset的sid, 不然冒泡场景target属性吐出不对,其余拿取当前绑定id
|
|
3383
|
-
const element = env.document.getElementById(((
|
|
3384
|
-
target.dataset = element !== null ? element.dataset : EMPTY_OBJ;
|
|
3385
|
-
for (const key in (
|
|
3384
|
+
const element = env.document.getElementById(((_c = target.targetDataset) === null || _c === void 0 ? void 0 : _c.sid) || ((_d = target.dataset) === null || _d === void 0 ? void 0 : _d.sid) || target.id || null);
|
|
3385
|
+
target.dataset = Object.assign(Object.assign({}, (currentEle !== null ? currentEle.dataset : EMPTY_OBJ)), (element !== null ? element.dataset : EMPTY_OBJ));
|
|
3386
|
+
for (const key in (_e = this.mpEvent) === null || _e === void 0 ? void 0 : _e.detail) {
|
|
3386
3387
|
target[key] = this.mpEvent.detail[key];
|
|
3387
3388
|
}
|
|
3388
3389
|
this.cacheTarget = target;
|