@tarojs/runtime 3.7.0-beta.1 → 3.7.0-beta.3

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.
@@ -368,6 +368,7 @@ function hydrate(node) {
368
368
  const nodeName = node.nodeName;
369
369
  if (isText(node)) {
370
370
  return {
371
+ sid: node.sid,
371
372
  ["v" /* Shortcuts.Text */]: node.nodeValue,
372
373
  ["nn" /* Shortcuts.NodeName */]: ((_a = componentsAlias[nodeName]) === null || _a === void 0 ? void 0 : _a._num) || '8'
373
374
  };
@@ -992,7 +993,7 @@ function setStyle(newVal, styleKey) {
992
993
  if (old === newVal)
993
994
  return;
994
995
  !this._pending && recordCss(this);
995
- if (shared.isNull(newVal) || shared.isUndefined(newVal)) {
996
+ if (shared.isNull(newVal) || shared.isUndefined(newVal) || newVal === '') {
996
997
  this._usedStyleProp.delete(styleKey);
997
998
  delete this._value[styleKey];
998
999
  }
@@ -1530,13 +1531,14 @@ class TaroEvent {
1530
1531
  this.defaultPrevented = true;
1531
1532
  }
1532
1533
  get target() {
1533
- var _a, _b, _c;
1534
+ var _a, _b, _c, _d;
1534
1535
  const cacheTarget = this.cacheTarget;
1535
1536
  if (!cacheTarget) {
1536
1537
  const target = Object.create(((_a = this.mpEvent) === null || _a === void 0 ? void 0 : _a.target) || null);
1537
- const element = env.document.getElementById(((_b = target.dataset) === null || _b === void 0 ? void 0 : _b.sid) || target.id || null);
1538
+ // Note:优先判断冒泡场景alipay的targetDataset的sid, 不然冒泡场景target属性吐出不对,其余拿取当前绑定id
1539
+ 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);
1538
1540
  target.dataset = element !== null ? element.dataset : shared.EMPTY_OBJ;
1539
- for (const key in (_c = this.mpEvent) === null || _c === void 0 ? void 0 : _c.detail) {
1541
+ for (const key in (_d = this.mpEvent) === null || _d === void 0 ? void 0 : _d.detail) {
1540
1542
  target[key] = this.mpEvent.detail[key];
1541
1543
  }
1542
1544
  this.cacheTarget = target;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tarojs/runtime",
3
- "version": "3.7.0-beta.1",
3
+ "version": "3.7.0-beta.3",
4
4
  "description": "taro runtime for mini apps.",
5
5
  "main:h5": "dist/runtime.h5.js",
6
6
  "main": "dist/runtime.esm.js",
@@ -20,7 +20,7 @@
20
20
  },
21
21
  "dependencies": {
22
22
  "lodash-es": "4.17.21",
23
- "@tarojs/shared": "3.7.0-beta.1"
23
+ "@tarojs/shared": "3.7.0-beta.3"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@rollup/plugin-buble": "^0.21.3",