2

SAPUI5中被贬低的“Horizo​​ntalDivider”有什么替代品吗?由于 Sap 没有提到任何替代方案,所以我遇到了类似 "" 绘制水平线的元素?

4

2 回答 2

3

It is better that you use a toolbar element as it has the bottom border. When you use the html hr tag, it does not respect the theme color while the toolbar use the theme color and also its spacing policy.

<sap.m.Toolbar width="100%" height="1px"/>

It the following picture you can see what is the result of using a toolbar with 1px height.

It shows how to use horizontal line in SAPUI5 by using toolbar

And in the following picture the result of using html hr tag.

Result of using hr tag in UI5 applications.

Or you can use any boxing elements of the UI5 and just play with its class. For example you can assign the class sapMTBStandard to your element to make a bottom border with suitable color in your theme.

于 2019-03-27T16:43:21.307 回答
2
<html:hr></html:hr>

确保添加xmlns:html="http://www.w3.org/1999/xhtml"

于 2017-10-25T10:17:12.027 回答