提交 37508ca4 作者: Vben

fix(modal): ensure that the height is correct in the modal full screen state close #308

上级 ec7bef79
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
ref="modalWrapperRef" ref="modalWrapperRef"
:loading="getProps.loading" :loading="getProps.loading"
:minHeight="getProps.minHeight" :minHeight="getProps.minHeight"
:height="getProps.height" :height="getWrapperHeight"
:visible="visibleRef" :visible="visibleRef"
:modalFooterHeight="footer !== undefined && !footer ? 0 : undefined" :modalFooterHeight="footer !== undefined && !footer ? 0 : undefined"
v-bind="omit(getProps.wrapperProps, 'visible', 'height')" v-bind="omit(getProps.wrapperProps, 'visible', 'height')"
...@@ -136,8 +136,19 @@ ...@@ -136,8 +136,19 @@
} }
); );
const getBindValue = computed((): any => { const getBindValue = computed(
return { ...attrs, ...unref(getProps) }; (): 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(() => { watchEffect(() => {
...@@ -217,6 +228,7 @@ ...@@ -217,6 +228,7 @@
handleExtHeight, handleExtHeight,
handleHeightChange, handleHeightChange,
handleTitleDbClick, handleTitleDbClick,
getWrapperHeight,
}; };
}, },
}); });
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论