Skip to content

Commit

Permalink
fix(modal): ensure that the height is correct in the modal full scree…
Browse files Browse the repository at this point in the history
…n state close #308
  • Loading branch information
anncwb committed Feb 26, 2021
1 parent ec7bef7 commit 37508ca
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions src/components/Modal/src/BasicModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
ref="modalWrapperRef"
:loading="getProps.loading"
:minHeight="getProps.minHeight"
:height="getProps.height"
:height="getWrapperHeight"
:visible="visibleRef"
:modalFooterHeight="footer !== undefined && !footer ? 0 : undefined"
v-bind="omit(getProps.wrapperProps, 'visible', 'height')"
Expand Down Expand Up @@ -136,8 +136,19 @@
}
);
const getBindValue = computed((): any => {
return { ...attrs, ...unref(getProps) };
const getBindValue = computed(
(): Recordable => {
const attr = { ...attrs, ...unref(getProps) };
if (unref(fullScreenRef)) {
return omit(attr, 'height');
}
return attr;
}
);
const getWrapperHeight = computed(() => {
if (unref(fullScreenRef)) return undefined;
return unref(getProps).height;
});
watchEffect(() => {
Expand Down Expand Up @@ -217,6 +228,7 @@
handleExtHeight,
handleHeightChange,
handleTitleDbClick,
getWrapperHeight,
};
},
});
Expand Down

0 comments on commit 37508ca

Please sign in to comment.