相关疑难解决方法(0)

在 XML 视图中将静态值传递给格式化程序参数

我想getCountdown用两个参数调用函数:

  • 第一个 (AuctionEnd) 是来自模型的动态。
  • 第二个应该在"Time"或 中硬编码"Status"

这是我的代码:

<ObjectStatus
  title="Time"
  text="{
    parts: [
      {path: 'AuctionEnd'},
      {path: 'Time'}
    ],
    formatter: '.formatter.getCountdown'
  }"
/>
Run Code Online (Sandbox Code Playgroud)

在 formatter.js 中,只有在我的控制台日志中看到的第一个参数:

["2016-05-20T12:00:00", undefined]
Run Code Online (Sandbox Code Playgroud)

在 JS 中,我会这样做:

["2016-05-20T12:00:00", undefined]
Run Code Online (Sandbox Code Playgroud)

sapui5

6
推荐指数
2
解决办法
2万
查看次数

标签 统计

sapui5 ×1