We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dialog 组件当 content 过多时需要可滚动,根据文档这么写
<p-dialog appendTo="body" [modal]="true" [width]="700" [height]="400" [contentStyle]="{'overflow': 'auto'}"> </p-dialog>
特么这样是不行的,并没有滚动条出现,看 style 发现是 CSS 的 height 未指定导致 overflow 失效,所以要在 style 里指定 max-height. 这里设置 [height] 属性并没有在 CSS 上设置相应的 height 值。
<p-dialog appendTo="body" [modal]="true" [width]="700" [contentStyle]="{'max-height': '400px', 'overflow': 'auto'}"> </p-dialog>
使用 max-height 替代 height 可以使 dialog 在超出高度才 scroll
max-height
height
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Dialog 组件当 content 过多时需要可滚动,根据文档这么写
特么这样是不行的,并没有滚动条出现,看 style 发现是 CSS 的 height 未指定导致 overflow 失效,所以要在 style 里指定 max-height. 这里设置 [height] 属性并没有在 CSS 上设置相应的 height 值。
The text was updated successfully, but these errors were encountered: