@tarojs/runtime 3.6.33 → 3.6.35

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.
@@ -2496,14 +2496,15 @@ class TaroEvent {
2496
2496
  this.defaultPrevented = true;
2497
2497
  }
2498
2498
  get target() {
2499
- var _a, _b, _c, _d;
2499
+ var _a, _b, _c, _d, _e;
2500
2500
  const cacheTarget = this.cacheTarget;
2501
2501
  if (!cacheTarget) {
2502
2502
  const target = Object.create(((_a = this.mpEvent) === null || _a === void 0 ? void 0 : _a.target) || null);
2503
+ const currentEle = env.document.getElementById(((_b = target.dataset) === null || _b === void 0 ? void 0 : _b.sid) || target.id || null);
2503
2504
  // Note:优先判断冒泡场景alipay的targetDataset的sid, 不然冒泡场景target属性吐出不对,其余拿取当前绑定id
2504
- const element = env.document.getElementById(((_b = target.targetDataset) === null || _b === void 0 ? void 0 : _b.sid) || ((_c = target.dataset) === null || _c === void 0 ? void 0 : _c.sid) || target.id || null);
2505
- target.dataset = element !== null ? element.dataset : EMPTY_OBJ;
2506
- for (const key in (_d = this.mpEvent) === null || _d === void 0 ? void 0 : _d.detail) {
2505
+ 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);
2506
+ target.dataset = Object.assign(Object.assign({}, (currentEle !== null ? currentEle.dataset : EMPTY_OBJ)), (element !== null ? element.dataset : EMPTY_OBJ));
2507
+ for (const key in (_e = this.mpEvent) === null || _e === void 0 ? void 0 : _e.detail) {
2507
2508
  target[key] = this.mpEvent.detail[key];
2508
2509
  }
2509
2510
  this.cacheTarget = target;