我使用自己的组件,将ChartContainer放在flexbox中(也尝试使用fixflex)。ChartContainer属性autoAdjustHeight未正常工作。在chrome版本54.0.2840.71米(64位)中,它不会将ChartContainer高度拉伸到屏幕的末尾。

在IE版本11.633.10586.0中,此属性的行为更加奇怪。ChartContainer的高度每秒增加几个像素,并且没有停止(因此它会耗尽屏幕并继续增加高度)。
Fiori设计指南中写道:只有当页面属性enableScrolling设置为false时,属性autoAdjustHeight = true才能正确工作。我完全按照推荐的方式设置它。在组件中使用autoAdjustHeight属性时,anybode是否有类似的问题?如果是的话,我会很高兴不再孤单。
当我在没有组件的xml代码中使用autoAdjustHeight时,它会正常工作。问题是当我试图在我自己的组件中实现它的时候。
下面是一些代码片段。这是加载组件的页面:
<core:View controllerName="abc.controller.Test"
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:html="http://www.w3.org/1999/xhtml"
xmlns:l="sap.ui.layout">
<Page id="idSCVerticalLayout" title="ABC" showNavButton="true" navButtonPress="onNavBack" enableScrolling="false">
</Page>
</core:View>这是放置在页面中的组件xml (结果如图所示):
<mvc:View controllerName="root.hm.bas.analysis.ABC.controller.ABC"
xmlns:core="sap.ui.core"
xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:suite="sap.suite.ui.commons"
xmlns:l="sap.ui.layout"
xmlns:viz="sap.viz.ui5.controls"
xmlns:common="sap.ui.commons">
<FlexBox alignItems="Start" height="100%" >
<items>
<suite:ChartContainer
id="idChartContainer"
showFullScreen="false"
showPersonalization="false"
autoAdjustHeight="true"
showLegendButton="false"
showLegend="true"
showZoom="false"
title="">
<suite:ChartContainerContent
icon = "sap-icon://bar-chart"
title = "{i18n>chart}">
<suite:content>
<viz:VizFrame id="categoryChart" uiConfig="{applicationSet:'fiori'}"></viz:VizFrame>
</suite:content>
</suite:ChartContainerContent>
</suite:ChartContainer>
</items>
</FlexBox>
</mvc:View>谢谢你的建议。
发布于 2016-11-11 03:32:52
谢谢你的问题。看起来你并不孤单。
我尝试了一个演示示例
`https://plnkr.co/edit/XUC8nmAWiSJtHiycow7j?p=preview` :在Chrome中,“autoAdjustHeight”选项不会显示任何效果。在IE和Firefox中,屏幕的底部都是向下的,正如你所描述的那样。
我们会研究这个问题。
发布于 2017-02-08 14:53:48
问题出在flex box上,只要去掉flex box的高度即可。
<FlexBox alignItems="Start" height="100%">移除此零件中的高度并查看。希望这能有所帮助。
https://stackoverflow.com/questions/40525074
复制相似问题