我如何将值绑定到Aurelia中的TCustomAttribute?

问题描述 投票:0回答:1

我正在尝试实现以下结果:我有一组值,这些值来自要进行迭代以填充HTML表的数组。同样,我还有一个图标,用户可以将鼠标悬停在该图标上,并可以查看其中的数据来自数组和翻译键(来自翻译文件)。

我想将第二个参数绑定到TCustomAttribute,以便向用户显示由他们编辑的另一个数据。

我如何在Aurelia实现这一目标?

<template>
<table>
  <thead>
    <th><span>Id</span></th>
    <th><span>Name</span></th>
    <th><span>Description</span></th>
    <th><span>Date</span></th>
  </thead>
  <tbody>
    <tr repeat.for="item of data">
      <td><span>${item.Id}</span></td>
      <td><span>${item.Name}
        <a data-toggle="popover" t="[data-content]pending_name ${data.Name}" data-trigger="hover">
          <i class="fa fa-info-circle"></i>
        </a>
      </span></td>
      <td><span>${item.Description}</span></td>
      <td><span>${item.Date}</span></td>
    </tr>
  </tbody>
</table>
</template>
internationalization aurelia aurelia-templating
1个回答
0
投票

查看t-params属性,该属性使您可以传递其他参数。官方指南http://aurelia.io/docs/plugins/i18n#using-the-plugin中有更多关于此的内容>

© www.soinside.com 2019 - 2024. All rights reserved.