繁体   English   中英

如何使用Ractive JS遍历列表并比较值

[英]How to loop through the list and compare values using ractive js

我有一个列表{{# {test: . }}} {{# {test: . }}} ,我还需要另一个列表{{#test:i}} 这样在迭代的同时我可以做一个比较

{{#if test.marks== test[i].marks}}

给定引用只能在给定位置引用一个值- test不能同时是数组和该数组的成员。 尝试使用其他名称(例如{{# {testA: this} }} )替换别名块( {{# {test: .} }} {{# {testA: this} }} )。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM