如何在XML-View中添加没有syle-information的sapUI5面板?

时间:2016-01-18 09:38:40

标签: javascript xml sapui5

在我的XML-View中,我添加了一个<Panel>来迭代数据绑定的元素:

<mvc:View
    ...
    xmlns="sap.m"
>
    <Panel content="{/}">
        <Panel headerText="{Item Header}">
             <Text text="{Item Text}"></Text>
        </Panel>
    </Panel>
</mvc:View>

这给了我

enter image description here

如何删除外<Panel>的格式化(bg-color,padding / margin,...)?是否有平原&#39; ui5中的元素类似于HTML中的<div>吗?

2 个答案:

答案 0 :(得分:1)

sap.m.Panel有一个属性backgroundDesign

默认值为Translucent,可能Transparent适合您的情况。

https://openui5beta.netweaver.ondemand.com/explored.html#/entity/sap.m.Panel/properties

答案 1 :(得分:0)

我发现<VBox>对解决问题非常有用(注意:使用items=...代替content=...):

<mvc:View
    ...
    xmlns="sap.m"
>
    <VBox items="{/}">
        <Panel headerText="{Item Header}">
             <Text text="{Item Text}"></Text>
        </Panel>
    </Panel>
</mvc:View>

这给出了

enter image description here