Browse Source

fix: correct the misspelling of some internal logic function names (#1008)

小丞同学 3 years ago
parent
commit
93f5b9fbd3

+ 2 - 2
packages/semi-animation-react/_story/Animation.react.stories.js

@@ -66,7 +66,7 @@ stories.add('Animaiton', () => {
             this.setState({ value });
         };
 
-        invokeHanlderFn = (funcName, ...args) => {
+        invokehandlerFn = (funcName, ...args) => {
             if (
                 funcName
                 && typeof funcName === 'string'
@@ -123,7 +123,7 @@ stories.add('Animaiton', () => {
                                     {['reset', 'reverse', 'pause', 'resume', 'stop', 'end'].map(funcName => (
                                         <button
                                             key={funcName}
-                                            onClick={(...args) => this.invokeHanlderFn(funcName, ...args)}
+                                            onClick={(...args) => this.invokehandlerFn(funcName, ...args)}
                                         >
                                             {funcName}
                                         </button>

+ 1 - 1
packages/semi-foundation/timePicker/foundation.ts

@@ -250,7 +250,7 @@ class TimePickerFoundation<P = Record<string, any>, S = Record<string, any>> ext
         this._adapter.notifyOpenChange(true);
     }
 
-    hanldePanelClose(clickedOutside: boolean, e: any) {
+    handlePanelClose(clickedOutside: boolean, e: any) {
         if (!this._isControlledComponent('open')) {
             this._adapter.unregisterClickOutSide();
             this.setPanel(false);

+ 1 - 1
packages/semi-ui/timePicker/TimePicker.tsx

@@ -248,7 +248,7 @@ export default class TimePicker extends BaseComponent<TimePickerProps, TimePicke
                         this.timePickerRef.current.contains(e.target as Node);
                     if (!isInTimepicker && !isInPanel) {
                         const clickedOutside = true;
-                        this.foundation.hanldePanelClose(clickedOutside, e);
+                        this.foundation.handlePanelClose(clickedOutside, e);
                     }
                 };
                 document.addEventListener('mousedown', this.clickOutSideHandler);