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 +7 -0
- package/dist/index.js +11 -4
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
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 (
|
|
142
|
-
|
|
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
|
-
|
|
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
|
}
|