@tarojs/runtime 3.6.16 → 3.6.18

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.
@@ -419,6 +419,7 @@ function hydrate(node) {
419
419
  const nodeName = node.nodeName;
420
420
  if (isText(node)) {
421
421
  return {
422
+ sid: node.sid,
422
423
  ["v" /* Shortcuts.Text */]: node.nodeValue,
423
424
  ["nn" /* Shortcuts.NodeName */]: ((_a = componentsAlias[nodeName]) === null || _a === void 0 ? void 0 : _a._num) || '8'
424
425
  };
@@ -1043,7 +1044,7 @@ function setStyle(newVal, styleKey) {
1043
1044
  if (old === newVal)
1044
1045
  return;
1045
1046
  !this._pending && recordCss(this);
1046
- if (isNull(newVal) || isUndefined(newVal)) {
1047
+ if (isNull(newVal) || isUndefined(newVal) || newVal === '') {
1047
1048
  this._usedStyleProp.delete(styleKey);
1048
1049
  delete this._value[styleKey];
1049
1050
  }
@@ -2467,13 +2468,14 @@ class TaroEvent {
2467
2468
  this.defaultPrevented = true;
2468
2469
  }
2469
2470
  get target() {
2470
- var _a, _b, _c;
2471
+ var _a, _b, _c, _d;
2471
2472
  const cacheTarget = this.cacheTarget;
2472
2473
  if (!cacheTarget) {
2473
2474
  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);
2475
+ // Note:优先判断冒泡场景alipay的targetDataset的sid, 不然冒泡场景target属性吐出不对,其余拿取当前绑定id
2476
+ 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
2477
  target.dataset = element !== null ? element.dataset : EMPTY_OBJ;
2476
- for (const key in (_c = this.mpEvent) === null || _c === void 0 ? void 0 : _c.detail) {
2478
+ for (const key in (_d = this.mpEvent) === null || _d === void 0 ? void 0 : _d.detail) {
2477
2479
  target[key] = this.mpEvent.detail[key];
2478
2480
  }
2479
2481
  this.cacheTarget = target;