然而我又面临另一个问题..似乎将一个数组循环到一个属性会导致RactiveJS行动起来并且只显示最后一个项目。
<div id="test">{{ # online }} {{{ friends[ this ]+'<br/>' }}} {{ else }} No friends online {{ / }}</div>
<div data-tooltip="{{ # online }} {{ friends[ this ]+' -- ' }} {{ else }} No friends online {{ / }}">- this guy overhere doesn't want to show the same text:</div>
<div data-tooltip="{{ # online:num }} {{ num+' ' }} {{ else }} No friends online {{ / }}">- on the other hand, showing indexes works fine, though i can't access the friends name:</div>
无论我多么努力地修复它,它的行为都是一样的。这是jsfiddle。