@tarojs/runtime 3.6.16-alpha.1 → 3.6.17

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.
@@ -2467,13 +2467,14 @@ class TaroEvent {
2467
2467
  this.defaultPrevented = true;
2468
2468
  }
2469
2469
  get target() {
2470
- var _a, _b, _c;
2470
+ var _a, _b, _c, _d;
2471
2471
  const cacheTarget = this.cacheTarget;
2472
2472
  if (!cacheTarget) {
2473
2473
  const target = Object.create(((_a = this.mpEvent) === null || _a === void 0 ? void 0 : _a.target) || null);
2474
- const element = env.document.getElementById(((_b = target.dataset) === null || _b === void 0 ? void 0 : _b.sid) || target.id || null);
2474
+ // Note:优先判断冒泡场景alipay的targetDataset的sid, 不然冒泡场景target属性吐出不对,其余拿取当前绑定id
2475
+ 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);
2475
2476
  target.dataset = element !== null ? element.dataset : EMPTY_OBJ;
2476
- for (const key in (_c = this.mpEvent) === null || _c === void 0 ? void 0 : _c.detail) {
2477
+ for (const key in (_d = this.mpEvent) === null || _d === void 0 ? void 0 : _d.detail) {
2477
2478
  target[key] = this.mpEvent.detail[key];
2478
2479
  }
2479
2480
  this.cacheTarget = target;