【发布时间】:2015-11-23 08:28:53
【问题描述】:
我们有一个 SAPUI5 时间线控件,我们在其中显示来自服务器的 cmets。
问题是,如果 cmets 包含换行符 \n,则 Timeline 控件无法在换行符中显示文本。相反,它会在出现\n 的任何地方引入空间。
我们也尝试将 \n 格式化为 unicode 字符,但这也没有用。 Timeline 控件聚合 TimelineItem。
我们使用的控件是:https://ui5.sap.com/#/api/sap.suite.ui.commons.TimelineItem
代码 sn-p 可以在以下位置找到: https://jsbin.com/kuluyehilu/edit?html,output
【问题讨论】:
-
见stackoverflow.com/a/65767922/5846045。这是 UI5 中的一个错误。
-
这能回答你的问题吗? How to add a line break to text in UI5?
标签: sapui5