将自定义标题添加到 sap.m.Dialog

Rah*_*are -1 sapui5

我想将带有按钮的自定义标题添加到我的sap.m.Dialog.

hir*_*rse 5

文档中,您可以看到sap.m.Dialog有一个聚合customHeader,它采用任何“Bar-Interface”(当前sap.m.Barsap.m.Toolbar)。

例如像这样:

<Dialog>
    <customHeader>
        <Bar>
            <contentLeft>
                <Button />
            </contentLeft>
            <contentMiddle>
                <Title text="Dialog Title" />
            </contentMiddle>
        </Bar>
    </customHeader>
    <!-- Content here -->
</Dialog>
Run Code Online (Sandbox Code Playgroud)