我有一个泄漏的表模板我已经找到导致问题的代码到一行。
<tbody>
<tr repeat.for="row of workListData.rows" click.delegate='resultItemClick($event, row)'>
<td repeat.for="col of workListData.columns">
<template if.bind='col.name === "isChecked"'>
${col.label}
</template>
<template if.bind='col.name !== "isChecked"'>
**${row.Properties[col.name]}**
</template>
</td>
</tr>
</tbody>
$ {row.Properties [col.name]} 这是引起此行占用当前行并使用列名访问列值的问题的代码行
答案 0 :(得分:0)
enter image description here好吧,当我嵌套了repeat.for
时,aurelia似乎正在泄漏 Leaks
<tr repeat.for="row of workListData.rows" click.delegate='resultItemClick($event, row)'>
<td repeat.for="col of workListData.columns">
</td>
</tr>
Does not leak
<tr repeat.for="row of workListData.rows" click.delegate='resultItemClick($event, row)'>
</tr>
它肯定来自嵌套重复问题,如果我简化代码IE删除Web服务等其工作按预期
我的一位同事已经注意到一些有趣的评论出一个不同的模板控制器也会阻止泄漏似乎并不挑剔哪个控制器被注释掉了。
答案 1 :(得分:0)
最后找到泄漏似乎我有一对,但有一点可以肯定的是,如果你在模板中这样做,aurelia似乎有一个非常不好的泄漏倾向
$ {row.Properties [键]}
不确定是否支持
我现在将对象和键传递给函数并返回解决问题的值