hy-virtual-tree 1.1.41 → 1.1.42

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.42
4
+
5
+ _2025-11-12_
6
+
7
+ - 扩展[VirtualTree] 功能
8
+ (1)修复icon点击图标选中被拦截问题
9
+
3
10
  ### 1.1.41
4
11
 
5
12
  _2025-11-05_
package/dist/index.js CHANGED
@@ -138,13 +138,20 @@ class Icon {
138
138
  el.style.width = `${config.width}px`;
139
139
  el.style.height = `${config.height}px`;
140
140
  el.addEventListener('click', (e) => {
141
- if (!this._disabled) {
142
- config.onClick && config.onClick(e);
141
+ if (this._disabled)
142
+ return;
143
+ if (config.onClick) {
144
+ config.onClick(e);
145
+ e.stopPropagation();
143
146
  }
144
- e.stopPropagation();
145
147
  });
146
148
  el.addEventListener('dblclick', (e) => {
147
- e.stopPropagation();
149
+ if (this._disabled)
150
+ return;
151
+ if (config.onDbclick) {
152
+ config.onDbclick(e);
153
+ e.stopPropagation();
154
+ }
148
155
  });
149
156
  this._el = el;
150
157
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hy-virtual-tree",
3
- "version": "1.1.41",
3
+ "version": "1.1.42",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite",