SAPUI5中被贬低的“HorizontalDivider”有什么替代品吗?由于 Sap 没有提到任何替代方案,所以我遇到了类似 "" 绘制水平线的元素?
2 回答
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.
And in the following picture the result of using html hr
tag.
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.
<html:hr></html:hr>
确保添加xmlns:html="http://www.w3.org/1999/xhtml"
库