hy-virtual-tree 1.1.38 → 1.1.39

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,12 @@
1
1
  ## Changelog
2
2
 
3
+ ### 1.1.39
4
+
5
+ _2025-10-24_
6
+
7
+ - 扩展[VirtualTree] 功能
8
+ (1)修复虚拟树卸载时没有清除数据问题
9
+
3
10
  ### 1.1.38
4
11
 
5
12
  _2025-10-24_
package/dist/index.js CHANGED
@@ -2372,6 +2372,10 @@ class VirtualTree {
2372
2372
  Object.assign(this._tree, tree);
2373
2373
  this._hiddenExpandIconKeySet = new Set();
2374
2374
  this._hiddenNodeKeySet = new Set();
2375
+ for (const $destroy of this._destroyDomSet) {
2376
+ $destroy && $destroy();
2377
+ }
2378
+ this._destroyDomSet.clear();
2375
2379
  this._isForceHiddenExpandIcon = undefined;
2376
2380
  this._updateCheckedKeys();
2377
2381
  this._refreshVirtualScroll();
@@ -2491,16 +2495,15 @@ class VirtualTree {
2491
2495
  /** 销毁组件 */
2492
2496
  destroy = () => {
2493
2497
  this._el = null;
2494
- for (const $destroy of this._destroyDomSet) {
2495
- $destroy && $destroy();
2496
- }
2497
- this._destroyDomSet.clear();
2498
2498
  this.setData([]);
2499
2499
  this.setCheckedKeys && this.setCheckedKeys([]);
2500
2500
  this._expandedKeySet = new Set();
2501
2501
  this._virtualScroll && this._virtualScroll.destroy();
2502
2502
  this._virtualScroll = null;
2503
2503
  this._isDestroy = true;
2504
+ this._virtualScroll = null;
2505
+ this._business = undefined;
2506
+ this._businessConfig = undefined;
2504
2507
  };
2505
2508
  }
2506
2509
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hy-virtual-tree",
3
- "version": "1.1.38",
3
+ "version": "1.1.39",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",