属性绑定:如何连接字符串文字和绑定值 [英] Property Binding: How to Concatenate String Literals and Binding Value

查看:27
本文介绍了属性绑定:如何连接字符串文字和绑定值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 UI5 中有一个这样的 StandardItemList

I have a StandardItemList in UI5 like this

new sap.m.StandardListItem({
    title: "{BOM/#text}",
    description: "Version: " + "{REVISION/#text}"
})

我怎样才能获得像Version: ValueOfTheVersion"这样的描述?

How can I achieve getting the description like "Version: ValueOfTheVersion"?

当我删除描述中的版本"这个词时,效果很好.

When I delete the word "Version" in the description it works very well.

推荐答案

感谢 Rahul!

添加

data-sap-ui-xx-bindingSyntax="complex"

到你的 index.html 中的引导程序就可以了

to the bootstrap in your index.html will do the trick

<script src="/sapui5/resources/sap-ui-core.js"
        id="sap-ui-bootstrap"
        data-sap-ui-xx-bindingSyntax="complex"
        data-sap-ui-libs="sap.m,sap.ui.layout,sap.ui.commons,sap.ui.table"
        data-sap-ui-theme="sap_bluecrystal">
</script>

这篇关于属性绑定:如何连接字符串文字和绑定值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆