Skip to content

Commit

Permalink
popup: optimize code (ElemeFE#14413)
Browse files Browse the repository at this point in the history
* getDOM的递归有问题

* Popup: remove useless getDOM function
  • Loading branch information
Kcium authored and lzq4047 committed May 22, 2020
1 parent 077ff3a commit deefa07
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/utils/popup/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: {
Expand Down Expand Up @@ -124,7 +116,7 @@ export default {

this._opening = true;

const dom = getDOM(this.$el);
const dom = this.$el;

const modal = props.modal;

Expand Down

0 comments on commit deefa07

Please sign in to comment.