@tarojs/runtime 3.7.0-alpha.19 → 3.7.0-alpha.20

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.
@@ -2542,13 +2542,14 @@ TaroEvent.prototype.preventDefault = function preventDefault () {
2542
2542
  this.defaultPrevented = true;
2543
2543
  };
2544
2544
  prototypeAccessors$1.target.get = function () {
2545
- var _a, _b, _c;
2545
+ var _a, _b, _c, _d;
2546
2546
  var cacheTarget = this.cacheTarget;
2547
2547
  if (!cacheTarget) {
2548
2548
  var target = Object.create(((_a = this.mpEvent) === null || _a === void 0 ? void 0 : _a.target) || null);
2549
- var element = env.document.getElementById(((_b = target.dataset) === null || _b === void 0 ? void 0 : _b.sid) || target.id || null);
2549
+ // Note:优先判断冒泡场景alipay的targetDataset的sid, 不然冒泡场景target属性吐出不对,其余拿取当前绑定id
2550
+ var 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);
2550
2551
  target.dataset = element !== null ? element.dataset : shared.EMPTY_OBJ;
2551
- for (var key in (_c = this.mpEvent) === null || _c === void 0 ? void 0 : _c.detail) {
2552
+ for (var key in (_d = this.mpEvent) === null || _d === void 0 ? void 0 : _d.detail) {
2552
2553
  target[key] = this.mpEvent.detail[key];
2553
2554
  }
2554
2555
  this.cacheTarget = target;
@@ -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;