二维码

Fiori 布局

1572873912@qq.c发表于 2018-04-20 11:07ABAP-雄 最后回复于 2021-05-31 13:58 [复制链接] 3201 2

各位朋友,
      
       大家好,最近我使用Fiori 的布局,想把两个控件放在一起 ,但是运行后显示不出,请各位帮忙看看这段哪里有问题,谢谢!
var oHits = oContext.getProperty("hits");   
                                    if (oHits >= 100) {
                                        oColumnListItem.addCell(
                                           new sap.ui.layout.VerticalLayout({
                                                content: [
                                                   new sap.m.Text({text: "{hits}"}),
                                                   new sap.m.ObjectStatus({text:"热门", state:"Success"})
                                                ]
                                            })
                                        )
                                    } else {
                                        oColumnListItem.addCell(
                                            new sap.m.Text({text: "{hits}"})
                                        )      
                                    }

注释为以下可以显示,
if (oHits >= 100) {
            oColumnListItem.addCell(
             //new sap.ui.layout.VerticalLayout({
        //content:
        //[
        // new sap.m.Text({text: "{hits}"}),
         new sap.m.ObjectStatus({text:"热门", state:"Success"})
        //]
        //})
            
            )
        }
        else {
            oColumnListItem.addCell(
                new sap.m.Text({text: "{hits}"})
            )      
        }

回复

使用道具 举报

1572873912@qq.c
已解决,谢谢
回复 支持 反对

使用道具 举报

ABAP-雄

                          oColumnListItem.addCell(
                            new sap.ui.layout.VerticalLayout({
                                content: [
                                   new sap.m.Text({text: "{hits}"}),
                                   new sap.m.ObjectStatus({text:"热门", state:"Success"})
                                ]
                            })
                        )  

请问下上面这样能显示吗
回复 支持 反对

使用道具 举报

1572873912@qq.c

SAP初级小粉

  1. 3 主题
  2. 12 帖子
  3. 91 积分

Ta最近发表

快速回帖

本版积分规则
您需要登录后才可以回帖 登录 | 注册有礼

快速回复 返回顶部 返回列表