mirror of
https://gitee.com/ElemeFE/element.git
synced 2024-12-03 20:58:09 +08:00
popup: optimize code (#14413)
* getDOM的递归有问题 * Popup: remove useless getDOM function
This commit is contained in:
parent
4aa85ef3c8
commit
df95baf2e0
@ -8,14 +8,6 @@ let idSeed = 1;
|
|||||||
|
|
||||||
let scrollBarWidth;
|
let scrollBarWidth;
|
||||||
|
|
||||||
const getDOM = function(dom) {
|
|
||||||
if (dom.nodeType === 3) {
|
|
||||||
dom = dom.nextElementSibling || dom.nextSibling;
|
|
||||||
getDOM(dom);
|
|
||||||
}
|
|
||||||
return dom;
|
|
||||||
};
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
visible: {
|
visible: {
|
||||||
@ -124,7 +116,7 @@ export default {
|
|||||||
|
|
||||||
this._opening = true;
|
this._opening = true;
|
||||||
|
|
||||||
const dom = getDOM(this.$el);
|
const dom = this.$el;
|
||||||
|
|
||||||
const modal = props.modal;
|
const modal = props.modal;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user