hy-virtual-tree 2.0.8 → 2.0.10
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 +12 -0
- package/dist/index.js +10 -6
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/* hy-virtual-tree v2.0.
|
|
1
|
+
/* hy-virtual-tree v2.0.10 */
|
|
2
2
|
import './svg_bundle.js';
|
|
3
3
|
const isString = (e) => typeof e === 'string';
|
|
4
4
|
const isNumber = (e) => typeof e === 'number';
|
|
@@ -7073,7 +7073,7 @@ class Tooltip {
|
|
|
7073
7073
|
el.addEventListener('mouseleave', (e) => {
|
|
7074
7074
|
this._openTimer && clearTimeout(this._openTimer);
|
|
7075
7075
|
this.setIsHover(false);
|
|
7076
|
-
this.hide();
|
|
7076
|
+
this.hide(e.target);
|
|
7077
7077
|
});
|
|
7078
7078
|
this._trigger = new Trigger({
|
|
7079
7079
|
el: this._el,
|
|
@@ -7162,12 +7162,14 @@ class Tooltip {
|
|
|
7162
7162
|
break;
|
|
7163
7163
|
}
|
|
7164
7164
|
}
|
|
7165
|
-
hide() {
|
|
7165
|
+
hide(el) {
|
|
7166
7166
|
this._openTimer && clearTimeout(this._openTimer);
|
|
7167
7167
|
this._closeTimer && clearTimeout(this._closeTimer);
|
|
7168
|
-
if (!
|
|
7168
|
+
if (!el) {
|
|
7169
|
+
el = this._el;
|
|
7170
|
+
}
|
|
7171
|
+
if (!el)
|
|
7169
7172
|
return;
|
|
7170
|
-
const el = this._el;
|
|
7171
7173
|
this._closeTimer = setTimeout(() => {
|
|
7172
7174
|
el.classList.remove('hy-tooltip-show');
|
|
7173
7175
|
this._closeTimer && clearTimeout(this._closeTimer);
|
|
@@ -7181,7 +7183,9 @@ class Tooltip {
|
|
|
7181
7183
|
}, 200);
|
|
7182
7184
|
}
|
|
7183
7185
|
destroy() {
|
|
7184
|
-
this.
|
|
7186
|
+
if (!this.isHover) {
|
|
7187
|
+
this.hide();
|
|
7188
|
+
}
|
|
7185
7189
|
this._timer && clearTimeout(this._timer);
|
|
7186
7190
|
this._trigger && this._trigger.destroy();
|
|
7187
7191
|
this._el = undefined;
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hy-virtual-tree",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"dev": "vite",
|
|
7
7
|
"build": "vue-tsc --noEmit && vite build",
|
|
8
8
|
"preview": "vite preview",
|
|
9
|
-
"
|
|
9
|
+
"compile": "rollup -c",
|
|
10
10
|
"lint:eslint": "eslint --fix --ext .js,.ts,.vue ./components"
|
|
11
11
|
},
|
|
12
12
|
"files": [
|