Sapui5 如何使sap.m.table在不溢出的情况下调整任意数量的列

Sapui5 如何使sap.m.table在不溢出的情况下调整任意数量的列,sapui5,Sapui5,我正在使用sap.m.table来显示使用将在控制器中设置的模型的数据。但是,由于溢出,我的表的最后两列在显示时被隐藏。以下是我的代码: <Table id="table1" busyIndicatorDelay="{worklistView>/tableBusyDelay}" growing="true" growingScrollToLoad="true" noDataText="{worklistView>/tableNoDataText}

我正在使用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&amp;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>


什么属性可以帮助我在不溢出的情况下调整所有列?我尝试调整宽度,但在某些情况下有效,而在其他情况下,我有相同的问题。

您应该删除visible属性。

否,它是在控制器中设置的。.不是在xml@aeshnaKashyap不知道你的意思。根据视图定义,最后两列中有
visible=“false”