hy-virtual-tree 2.0.8 → 2.0.9
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 +6 -0
- package/dist/index.js +6 -4
- 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.9 */
|
|
2
2
|
import './svg_bundle.js';
|
|
3
3
|
const isString = (e) => typeof e === 'string';
|
|
4
4
|
const isNumber = (e) => typeof e === 'number';
|
|
@@ -7028,6 +7028,7 @@ class Tooltip {
|
|
|
7028
7028
|
_closeTimer;
|
|
7029
7029
|
_style = getGlobalTooltipConfig().style;
|
|
7030
7030
|
_isHover = false;
|
|
7031
|
+
_isDestroy = false;
|
|
7031
7032
|
constructor(props) {
|
|
7032
7033
|
if (!props.bind || !isElement(props.bind))
|
|
7033
7034
|
throw Error('【bind参数错误】:请传入元素节点');
|
|
@@ -7064,7 +7065,7 @@ class Tooltip {
|
|
|
7064
7065
|
el.appendChild(arrow);
|
|
7065
7066
|
this._el = el;
|
|
7066
7067
|
el.addEventListener('mouseenter', (e) => {
|
|
7067
|
-
if (this.isHover)
|
|
7068
|
+
if (this._isDestroy || this.isHover)
|
|
7068
7069
|
return;
|
|
7069
7070
|
this.setIsHover(true);
|
|
7070
7071
|
this._closeTimer && clearTimeout(this._closeTimer);
|
|
@@ -7081,7 +7082,7 @@ class Tooltip {
|
|
|
7081
7082
|
trigger: this._config.trigger === 'click' ? 'click' : 'hover',
|
|
7082
7083
|
openDelay: this._config.openDelay || 0,
|
|
7083
7084
|
onFocus: () => {
|
|
7084
|
-
if (this.isHover)
|
|
7085
|
+
if (this._isDestroy || this.isHover)
|
|
7085
7086
|
return;
|
|
7086
7087
|
if (!this._el || !this._config)
|
|
7087
7088
|
return;
|
|
@@ -7109,7 +7110,7 @@ class Tooltip {
|
|
|
7109
7110
|
}, 200);
|
|
7110
7111
|
},
|
|
7111
7112
|
onBlur: () => {
|
|
7112
|
-
if (this.isHover)
|
|
7113
|
+
if (!this._isDestroy && this.isHover)
|
|
7113
7114
|
return;
|
|
7114
7115
|
this._openTimer && clearTimeout(this._openTimer);
|
|
7115
7116
|
this._closeTimer && clearTimeout(this._closeTimer);
|
|
@@ -7181,6 +7182,7 @@ class Tooltip {
|
|
|
7181
7182
|
}, 200);
|
|
7182
7183
|
}
|
|
7183
7184
|
destroy() {
|
|
7185
|
+
this._isDestroy = true;
|
|
7184
7186
|
this.hide();
|
|
7185
7187
|
this._timer && clearTimeout(this._timer);
|
|
7186
7188
|
this._trigger && this._trigger.destroy();
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hy-virtual-tree",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
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": [
|