簡體   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