Skip to content

Commit

Permalink
fix(modal): fullscreen height calculation error #203
Browse files Browse the repository at this point in the history
  • Loading branch information
anncwb committed Jan 19, 2021
1 parent ca4f1a8 commit b45f8c5
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/components/Modal/src/components/ModalWrapper.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@
props: {
loading: propTypes.bool,
useWrapper: propTypes.bool.def(true),
modalHeaderHeight: propTypes.number.def(50),
modalFooterHeight: propTypes.number.def(54),
modalHeaderHeight: propTypes.number.def(57),
modalFooterHeight: propTypes.number.def(74),
minHeight: propTypes.number.def(200),
height: propTypes.number,
footerOffset: propTypes.number.def(0),
Expand Down Expand Up @@ -137,14 +137,17 @@
if (props.fullScreen) {
realHeightRef.value =
window.innerHeight - props.modalFooterHeight - props.modalHeaderHeight;
window.innerHeight - props.modalFooterHeight - props.modalHeaderHeight - 28;
} else {
realHeightRef.value = props.height
? props.height
: realHeight > maxHeight
? maxHeight
: realHeight;
}
console.log('======================');
console.log(realHeightRef.value, props);
console.log('======================');
emit('height-change', unref(realHeightRef));
} catch (error) {
console.log(error);
Expand Down

0 comments on commit b45f8c5

Please sign in to comment.