SAPUI5 中的分页符

编程入门 行业动态 更新时间:2024-10-26 13:21:02
本文介绍了SAPUI5 中的分页符的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

在 SAPUI5 中创建特定分页符的最佳实践是什么?实际上是否可行?

What is the best practice for creating specific page breaks in SAPUI5 and is it actually possible?

经典 CSS 属性 page-break-after 和 page-break-before 在我的情况下似乎不起作用.例如,我有两个 sap.m.VBox 元素,我给它们附加了一个 CSS 类,该类指定 page-break-after: always !important; 打印时,但没有发生.如果我添加* {overflow-x: 可见 !important;overflow-y:visible !important;} 然后它会中断并继续在下一页绘制内容,如果它不适合一页,但它在 IE 中不起作用.

Classical CSS atributes page-break-after and page-break-beforedoesn't seem to work in my case. For example, I have two sap.m.VBox elements and I attached them a CSS class which specifies page-break-after: always !important;when printing, but nothing happens. If I add * {overflow-x: visible !important; overflow-y: visible !important;} then it will break and continue to draw the content in next page if it doesn't fit in one page, but it doesn't work in IE.

我还尝试添加一个空的 div 元素,它可以用作分页指示器,但 CSS 仍然不会做任何事情.我猜这是因为 SAPUI5 中的所有内容都放在一个内容 div 中.

I have tryed also adding an empty div element that would work as a page break indicator, but still CSS wouldn't do anything. I guess that's because everything in SAPUI5 is put into one content div.

推荐答案

page-break-after"被忽略,因为 SAPUI5 视图的属性显示设置为 inline-block.

The "page-break-after" is ignored because the property display of SAPUI5 views is set to inline-block.

简单地使用自定义 CSS 覆盖相应类的 CSS 样式,它应该可以工作:.sapUiView {显示:块;}

Simply override the CSS style for the corresponding class with a custom CSS and it should work: .sapUiView { display: block; }

更多推荐

SAPUI5 中的分页符

本文发布于:2023-11-22 09:51:17,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1616954.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:分页

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!