I am not able to scroll down till last row. I have to use ↓ key to reach it.
每行的高度都是可变的。每行最多可以显示 3 行文本。
<t:Table id="phraseTable"
class="phraseTable"
columnHeaderHeight="21"
enableColumnReordering="false"
selectionMode="Single"
cellClick="onCellClick"
visibleRowCountMode="Auto"
selectionBehavior="RowOnly"
rows="{dataModel>/phraseTable}"
>
<t:columns>
<t:Column hAlign="Center" resizable="true">
<Label text="No." wrapping="true" />
<t:template>
<Text class="PhrasesText"
wrapping="true"
textAlign="End"
text="{dataModel>Phrase_id}"
/>
</t:template>
</t:Column>
<t:Column hAlign="Center" resizable="true">
<Label text="Phrases" />
<t:template>
<FormattedText id="test"
class="maxlines PhrasesText"
htmlText="{dataModel>Phrase_desc}"
/>
</t:template>
</t:Column>
<t:Column hAlign="Center" resizable="true">
<Label class="headerClass commonSorting" text="Status" />
<t:template>
<Text class="PhrasesText"
wrapping="true"
text="{dataModel>Status_desc}"
/>
</t:template>
</t:Column>
<t:Column hAlign="Center" resizable="false">
<Label class="headerClass commonSorting" text="Geography" />
<t:template>
<Text class="Phrases"
wrapping="false"
text="{dataModel>Geography_desc}"
/>
</t:template>
</t:Column>
<t:Column hAlign="Center" resizable="false">
<Label class="headerClass commonSorting" text="Regulatory class" />
<t:template>
<Text class="Phrases"
wrapping="false"
text="{dataModel>Regulatory_desc}"
/>
</t:template>
</t:Column>
<t:Column hAlign="Center" resizable="false">
<Label class="headerClass commonSorting" text="Author" />
<t:template>
<Text class="PhrasesText"
wrapping="false"
text="{dataModel>Author_desc}"
/>
</t:template>
</t:Column>
</t:columns>
</t:Table>
CSS Used
.maxlines {
display: inline-block; /* or inline-block */
text-overflow: ellipsis;
word-wrap: break-word !important;
overflow: hidden !important;
max-height: 62.5px !important;
line-height: 16px !important;
text-align: left !important;
}
表格来自sap.ui.table
图书馆支持只有一组有限的控件.
此外,应禁用文本换行。
-
删除可能会操纵单元格高度的自定义 CSS 规则。
-
单元格内容:确保仅使用来自支持的控件(向下滚动到脚注1
)或足够小的控件。
-
文本:禁用换行 →<Text wrapping="false" renderWhitespace="false" text="..." />
.
为了保持控制高度始终稳定,wrapping
and renderWhitespace
属性在sap.m.Text
控制,例如,必须设置为false
.
使用更大的控件或换行文本通常会导致垂直滚动高度的错误计算。尽量避开他们。
要了解有关支持的控件的更多信息,请参阅细胞水平来自 Fiori 设计指南。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)