在 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 中的分页符
发布评论