hy-virtual-tree 2.0.16 → 2.0.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  ## Changelog
2
2
 
3
+ ### 2.0.18
4
+
5
+ _2026-05-15_
6
+
7
+ (1)修复 channel 业务类型的 updateTree 问题
8
+
9
+ ### 2.0.17
10
+
11
+ _2026-05-15_
12
+
13
+ (1)删除 console 消息
14
+
3
15
  ### 2.0.16
4
16
 
5
17
  _2026-05-13_
package/dist/index.js CHANGED
@@ -1,4 +1,4 @@
1
- /* hy-virtual-tree v2.0.16 */
1
+ /* hy-virtual-tree v2.0.18 */
2
2
  import './svg_bundle.js';
3
3
  const isString = (e) => typeof e === 'string';
4
4
  const isNumber = (e) => typeof e === 'number';
@@ -9290,9 +9290,9 @@ function updateDeviceChannelTree(tree, data, config) {
9290
9290
  // 通道
9291
9291
  if (v.channelId) {
9292
9292
  const channel = channelMap.get(v.channelId);
9293
- const channelParent = channel.parent;
9294
- if (!channel || !parent)
9293
+ if (!channel || !channel.parent)
9295
9294
  return;
9295
+ const channelParent = channel.parent;
9296
9296
  Object.assign(channel, {
9297
9297
  data: {
9298
9298
  ...channel.data,
@@ -9896,7 +9896,6 @@ class VirtualTree {
9896
9896
  && item.data.deviceStatus === 0) {
9897
9897
  contentContainer.el.style.color = config.placeholderColor;
9898
9898
  }
9899
- console.log('this._props.showExpand', this._props);
9900
9899
  if (this._props.showExpand) {
9901
9900
  const expandIcon = generateExpandIcon(item);
9902
9901
  contentContainer.el.appendChild(expandIcon);
@@ -10304,7 +10303,6 @@ class VirtualTree {
10304
10303
  }
10305
10304
  if (!node && dataType === DataType.PLAN_GROUP) {
10306
10305
  node = this._tree.planGroupMap?.get(params.id);
10307
- console.log('node', node);
10308
10306
  }
10309
10307
  node = node || this._tree.treeNodeMap.get(params.id);
10310
10308
  if (!node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hy-virtual-tree",
3
- "version": "2.0.16",
3
+ "version": "2.0.18",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",