Explorar o código

popup: optimize code (#14413)

* getDOM的递归有问题

* Popup: remove useless getDOM function
KAionro %!s(int64=6) %!d(string=hai) anos
pai
achega
df95baf2e0
Modificáronse 1 ficheiros con 1 adicións e 9 borrados
  1. 1 9
      src/utils/popup/index.js

+ 1 - 9
src/utils/popup/index.js

@@ -8,14 +8,6 @@ let idSeed = 1;
 
 let scrollBarWidth;
 
-const getDOM = function(dom) {
-  if (dom.nodeType === 3) {
-    dom = dom.nextElementSibling || dom.nextSibling;
-    getDOM(dom);
-  }
-  return dom;
-};
-
 export default {
   props: {
     visible: {
@@ -124,7 +116,7 @@ export default {
 
       this._opening = true;
 
-      const dom = getDOM(this.$el);
+      const dom = this.$el;
 
       const modal = props.modal;