我正在使用sap.m.table通过将在控制器中设置的模型来显示数据,但是由于溢出,我的表的最后两列被隐藏了,这是我的代码:
<Table id="table1" busyIndicatorDelay="{worklistView>/tableBusyDelay}" growing="true" growingScrollToLoad="true"
noDataText="{worklistView>/tableNoDataText}" fixedLayout="true" updateFinished="onUpdateFinished" width="auto"
items="{responseListData>/oData}">
<headerToolbar>
<Toolbar>
<Title id="tableHeader" text="{worklistView>/worklistTableTitle}"/>
<ToolbarSpacer/>
<SearchField id="searchField" tooltip="{i18n>worklistSearchTooltip}" search="onSearch" width="auto"></SearchField>
<!--<Button press="onRankSort" id="ranksort" icon="sap-icon://drop-down-list" tooltip="Rank Sort"/>-->
<Button press="onPriceSort" id="pricesort" icon="sap-icon://drop-down-list" tooltip="Price Sort"/>
</Toolbar>
</headerToolbar>
<columns>
<Column width="4rem" id="supplierid" minScreenWidth="Medium" demandPopin="true" hAlign="Begin" >
<Text id="nameColumnTitle" text="Supplier ID"/>
</Column>
<Column width="4rem" id="quanity" hAlign="Begin" demandPopin="false">
<Text text="Qty/Unit"/>
</Column>
<Column width="4rem" id="price" hAlign="Begin" demandPopin="true">
<Text text="Price"/>
</Column>
<Column width="4rem" id="offervaliddate" hAlign="Begin" demandPopin="true" minScreenWidth="Tablet">
<Text text="Offer Valid Until"/>
</Column>
<Column width="4rem" id="tc" hAlign="Begin">
<Text text="T&C"/>
</Column>
<Column width="4rem" id="responsedate" hAlign="End">
<Text text="Delivery Due Date"/>
</Column>
<Column id="attachment" width="4rem" hAlign="End">
<core:Icon src="sap-icon://chain-link" size="1.5em" color="#000">
<core:layoutData>
<FlexItemData growFactor="1"/>
</core:layoutData>
</core:Icon>
</Column>
<Column width="4rem" id="note" hAlign="End">
<Text text="Comment"/>
</Column>
<Column width="4rem" id="rank" hAlign="End" visible="false">
<Text text="Rank"/>
</Column>
<Column width="4rem" id="selected" hAlign="End" visible="false">
<Text text="Selected"/>
</Column>
</columns>
<items>
<ColumnListItem app:createdBy="{responseListData>responseCreatedBy}">
<cells>
<ObjectNumber number="{responseListData>responseCreatedBy}"/>
<Text width="60px" text="{responseListData>sellerQuantity} {responseListData>sellerUnits}"/>
<ObjectNumber number=" {responseListData>sellerPrice}" unit="{responseListData>sellerCurrency}"/>
<Text width="60px" text="{responseListData>offerValidUntil}"/>
<ObjectNumber number="{responseListData>sellerTermsAndConditions}" tooltip="{responseListData>sellerTermsAndConditions}"/>
<Text width="60px" text="{responseListData>sellerDeliveryDueDate}"/>
<Link id="attachmentLink" text="{/oFormData/0/data/fileType}" target="_blank" press="downloadFile"/>
<ObjectNumber number="{responseListData>sellerComments}" tooltip="{responseListData>sellerComments}"/>
<!--<ComboBox enabled="{responseListData>/cBoxEnable}">-->
<!-- <core:Item key="1" text="1" />-->
<!-- <core:Item key="2" text="2" />-->
<!-- <core:Item key="3" text="3" />-->
<!-- <core:Item key="4" text="4" />-->
<!-- <core:Item key="5" text="5" />-->
<!--</ComboBox>-->
<Select width="60px" enabled="{responseListData>comboEnable}" change="changeRank" selectedKey="{responseListData>sellerRank}">
<core:Item key="0" text=" "/>
<core:Item key="1" text="1"/>
<core:Item key="2" text="2"/>
<core:Item key="3" text="3"/>
<core:Item key="4" text="4"/>
<core:Item key="5" text="5"/>
</Select>
<CheckBox id="select" selected="{responseListData>sel1}" enabled="{responseListData>sel}" visible="{responseListData>show}"
select="onSelect" app:createdBy="{responseListData>responseCreatedBy}"/>
<!--<Button enabled="false" text=">" press="move" />-->
</cells>
</ColumnListItem>
</items>
</Table>
什么属性可以帮助我调整所有列而不会发生溢出?我尝试调整宽度,但在某些情况下可以使用,而在另一些情况下,我也遇到相同的问题
答案 0 :(得分:1)
您应该删除可见属性。