@ray-js/t-agent-ui-ray 0.2.4 → 0.2.5-beta-1

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.
@@ -34,13 +34,16 @@ const getItemContext = function (ownerInstance, instance) {
34
34
  return itemContext;
35
35
  }
36
36
 
37
- const itemUpdateObserver = function (newValue, oldValue, ownerInstance, instance) {
37
+ const itemUpdateObserver = function (newValue, _, ownerInstance, instance) {
38
+ const itemContext = getItemContext(ownerInstance, instance);
39
+
40
+ const oldValue = itemContext.oldValue;
41
+ itemContext.oldValue = newValue;
38
42
  // 没有旧值就表示第一次挂载,跳过,以防止刚挂载上时,由于外部 show === false,导致高度计算为 0。
39
43
  if (newValue === oldValue || !oldValue) {
40
44
  return;
41
45
  }
42
46
 
43
- const itemContext = getItemContext(ownerInstance, instance)
44
47
  itemContext.onUpdate(ownerInstance, instance);
45
48
  };
46
49
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ray-js/t-agent-ui-ray",
3
- "version": "0.2.4",
3
+ "version": "0.2.5-beta-1",
4
4
  "author": "Tuya.inc",
5
5
  "license": "MIT",
6
6
  "private": false,
@@ -40,5 +40,5 @@
40
40
  "@types/echarts": "^4.9.22",
41
41
  "@types/markdown-it": "^14.1.1"
42
42
  },
43
- "gitHead": "651120ff704ee5ff8430e4a3a5a741e1f913958a"
43
+ "gitHead": "810116f5c6fc08b98db2f7d5725f2bacbedfeaf1"
44
44
  }