下图这个Opportunity的金额,在右边的明细页面里显示的是1880 USD,但为何在左边,显示的是2K这个近似值?
在Chrome开发者工具的调试器里,我们能看到从后台返回的金额确实是1880:
所以这个2k一定是前台UI5代码里进行的格式化:
答案就在上图sap.ca.ui.model.format.AmoutFormat.FormatAmoutShort这个方法里。
这里涉及到一个CLDR的概念:
The Unicode CLDR provides key building blocks for software to support the world's languages, with the largest and most extensive standard repository of locale data available. This data is used by a wide spectrum of companies for their software internationalization and localization, adapting software to the conventions of different languages for such common software tasks.
1880转换成2k的调试:
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。
原创声明:本文系作者授权腾讯云开发者社区发表,未经许可,不得转载。
如有侵权,请联系 cloudcommunity@tencent.com 删除。