uploadFiles(): void {
const dialogRef = this.dialog.open(AddNewFilesOrImagesComponent, {
width: '620px',
height : '100%',
});
}
如果高度 100% UI 看起来像这样(在上传按钮下不需要空格)
如果我在 px 中设置固定高度(它使 UI 可滚动)
uploadFiles(): void {
const dialogRef = this.dialog.open(AddNewFilesOrImagesComponent, {
width: '620px',
height : '250px',
});
}
如果我选择文件,我想要实际的这种类型,它会自动增加它的高度(当我选择图像时,我想增加 matdialogbox 的自动高度)
最佳答案
试试这个,它将为您的matdialog
占用页面的完整高度 uploadFiles(): void {
const dialogRef = this.dialog.open(AddNewFilesOrImagesComponent, {
width: '100%',
minHeight: 'calc(100vh - 90px)',
height : 'auto'
});
}
关于html - 如何增加 Angular 5 中垫对话框的自动高度?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53598476/