Browse Source

chore: remove useless code

代强 4 years ago
parent
commit
e0b1006c1a
1 changed files with 25 additions and 25 deletions
  1. 25 25
      packages/semi-foundation/modal/modalFoundation.ts

+ 25 - 25
packages/semi-foundation/modal/modalFoundation.ts

@@ -99,29 +99,29 @@ export default class ModalFoundation extends BaseFoundation<ModalAdapter> {
         this._adapter.toggleHidden(hidden);
     };
 
-    // eslint-disable-next-line max-len
-    mergeMotionProp = (motion: Motion, prop: string, cb: () => void) => {
-        const mergedMotion = typeof (motion) === 'undefined' || motion ? {
-            ...(motion as { [key: string]: (() => void) | boolean }),
-            [prop]: (...args: any) => {
-                const curr = get(motion, prop);
-                if (typeof curr === 'function') {
-                    curr(...args);
-                }
-                cb();
-            }
-        } : false;
-        return mergedMotion;
-    };
-
-    getMergedMotion() {
-        let { motion } = this._adapter.getProps();
-        const { keepDOM } = this._adapter.getProps();
-        motion = this.mergeMotionProp(motion, 'didLeave', this.afterClose.bind(this));
-        if (!keepDOM) {
-            return motion;
-        }
-        const mergedMotion = this.mergeMotionProp(motion, 'didLeave', this.toggleHidden.bind(this, true));
-        return mergedMotion;
-    }
+    // // eslint-disable-next-line max-len
+    // mergeMotionProp = (motion: Motion, prop: string, cb: () => void) => {
+    //     const mergedMotion = typeof (motion) === 'undefined' || motion ? {
+    //         ...(motion as { [key: string]: (() => void) | boolean }),
+    //         [prop]: (...args: any) => {
+    //             const curr = get(motion, prop);
+    //             if (typeof curr === 'function') {
+    //                 curr(...args);
+    //             }
+    //             cb();
+    //         }
+    //     } : false;
+    //     return mergedMotion;
+    // };
+    //
+    // getMergedMotion() {
+    //     let { motion } = this._adapter.getProps();
+    //     const { keepDOM } = this._adapter.getProps();
+    //     motion = this.mergeMotionProp(motion, 'didLeave', this.afterClose.bind(this));
+    //     if (!keepDOM) {
+    //         return motion;
+    //     }
+    //     const mergedMotion = this.mergeMotionProp(motion, 'didLeave', this.toggleHidden.bind(this, true));
+    //     return mergedMotion;
+    // }
 }