fix: fix drawer autoHeight

This commit is contained in:
vben
2020-10-22 22:32:39 +08:00
parent c0e4c9e5a5
commit 88de82c493
6 changed files with 34 additions and 24 deletions

View File

@@ -109,7 +109,7 @@ export default defineComponent({
if (showFooter && footerHeight) {
return isNumber(footerHeight) ? `${footerHeight}px` : `${footerHeight.replace('px', '')}px`;
}
return 0;
return `0px`;
});
function renderFooter() {
const {
@@ -195,7 +195,6 @@ export default defineComponent({
return () => {
const footerHeight = unref(getFooterHeight);
return (
<Drawer
class={prefixCls}
@@ -217,8 +216,9 @@ export default defineComponent({
<div
ref={scrollRef}
{...attrs}
data-id="123"
style={{
height: `calc(100% - ${footerHeight}px)`,
height: `calc(100% - ${footerHeight})`,
overflow: 'auto',
padding: '16px',
paddingBottom: '30px',

View File

@@ -53,6 +53,9 @@
}
&__footer {
position: absolute;
bottom: 0;
width: 100%;
height: @footer-height;
padding: 0 26px;
line-height: @footer-height;