[Improvement] Popup: support lazy render (#1138)

This commit is contained in:
neverland
2018-05-23 11:01:27 +08:00
committed by GitHub
parent 7f10d99d3d
commit cb992ce979
14 changed files with 223 additions and 49 deletions
+4 -2
View File
@@ -119,7 +119,6 @@ export default {
move() {
if (this.getContainer) {
this.getContainer().appendChild(this.$el);
/* istanbul ignore if */
} else if (this.$parent) {
this.$parent.$el.appendChild(this.$el);
}
@@ -160,7 +159,10 @@ export default {
} else {
manager.close(this._popupId);
}
this.$el.style.zIndex = context.plusKey('zIndex');
this.$nextTick(() => {
this.$el.style.zIndex = context.plusKey('zIndex');
});
}
}
};
+1
View File
@@ -61,6 +61,7 @@ export default {
// close popup when click modal && closeOnClickOverlay is true
onClick() {
/* istanbul ignore else */
if (context.top) {
const { vm } = context.top;
vm.$emit('click-overlay');