@douyinfe/semi-foundation 2.32.2 → 2.32.4

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.
@@ -45,8 +45,9 @@ class SubNavFoundation extends _foundation.default {
45
45
  this._timer = null;
46
46
  }
47
47
 
48
- destroy() {} // eslint-disable-line
49
-
48
+ destroy() {
49
+ this.clearDelayTimer();
50
+ }
50
51
 
51
52
  clearDelayTimer() {
52
53
  if (this._timer) {
@@ -56,7 +57,6 @@ class SubNavFoundation extends _foundation.default {
56
57
  }
57
58
 
58
59
  isValidKey(itemKey) {
59
- // eslint-disable-next-line eqeqeq
60
60
  return itemKey != null && (typeof itemKey === 'number' || typeof itemKey === 'string');
61
61
  }
62
62
 
@@ -292,6 +292,7 @@ class Tooltip extends _foundation.default {
292
292
 
293
293
  this.unBindResizeEvent();
294
294
  this.unBindScrollEvent();
295
+ clearTimeout(this._timer);
295
296
  }
296
297
 
297
298
  _bindTriggerEvent(triggerEventSet) {
@@ -35,8 +35,9 @@ export default class SubNavFoundation extends BaseFoundation {
35
35
  this._timer = null;
36
36
  }
37
37
 
38
- destroy() {} // eslint-disable-line
39
-
38
+ destroy() {
39
+ this.clearDelayTimer();
40
+ }
40
41
 
41
42
  clearDelayTimer() {
42
43
  if (this._timer) {
@@ -46,7 +47,6 @@ export default class SubNavFoundation extends BaseFoundation {
46
47
  }
47
48
 
48
49
  isValidKey(itemKey) {
49
- // eslint-disable-next-line eqeqeq
50
50
  return itemKey != null && (typeof itemKey === 'number' || typeof itemKey === 'string');
51
51
  }
52
52
 
@@ -278,6 +278,7 @@ export default class Tooltip extends BaseFoundation {
278
278
 
279
279
  this.unBindResizeEvent();
280
280
  this.unBindScrollEvent();
281
+ clearTimeout(this._timer);
281
282
  }
282
283
 
283
284
  _bindTriggerEvent(triggerEventSet) {
@@ -52,7 +52,9 @@ export default class SubNavFoundation<P = Record<string, any>, S = Record<string
52
52
  this._timer = null;
53
53
  }
54
54
 
55
- destroy() {} // eslint-disable-line
55
+ destroy() {
56
+ this.clearDelayTimer();
57
+ }
56
58
 
57
59
  clearDelayTimer() {
58
60
  if (this._timer) {
@@ -62,7 +64,6 @@ export default class SubNavFoundation<P = Record<string, any>, S = Record<string
62
64
  }
63
65
 
64
66
  isValidKey(itemKey: string | number) {
65
- // eslint-disable-next-line eqeqeq
66
67
  return itemKey != null && (typeof itemKey === 'number' || typeof itemKey === 'string');
67
68
  }
68
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@douyinfe/semi-foundation",
3
- "version": "2.32.2",
3
+ "version": "2.32.4",
4
4
  "description": "",
5
5
  "scripts": {
6
6
  "build:lib": "node ./scripts/compileLib.js",
@@ -23,7 +23,7 @@
23
23
  "*.scss",
24
24
  "*.css"
25
25
  ],
26
- "gitHead": "312de35a97b05593fee8063c5b33881a166de04c",
26
+ "gitHead": "bed9aff602c6e8cb9119889c87cd5c260e37e53b",
27
27
  "devDependencies": {
28
28
  "@babel/plugin-transform-runtime": "^7.15.8",
29
29
  "@babel/preset-env": "^7.15.8",
@@ -115,6 +115,7 @@ export default class Tooltip<P = Record<string, any>, S = Record<string, any>> e
115
115
  this._adapter.unregisterClickOutsideHandler();
116
116
  this.unBindResizeEvent();
117
117
  this.unBindScrollEvent();
118
+ clearTimeout(this._timer);
118
119
  }
119
120
 
120
121
  _bindTriggerEvent(triggerEventSet: Record<string, any>) {