小程序wx:for循环问题?

小程序 文章 2021-03-08 10:21 405 0 全屏看文

AI助手支持GPT4.0

小程序wx:for循环问题?Small program wx:for loop problem?

小程序wx:for循环问题?

小程序里不能像前端这样使用 item[i].id item[i-1].id 吗 有什么方法可以代替的吗 想做的是本次循环跟上次循环判的处理

Can't you use item [i]. ID item [I-1]. Id like the front end in a small program? Is there any way to replace it? What you want to do is to deal with this loop and the last loop

回答:

黑色低调:

自己记录上一次的数据再和这次的多对比处理不就可以了么?

海玄科技:

先在js里循环判断完,在渲染到view里吧

默垂眸:

可以啊 你想要实现什么操作?

-EOF-

AI助手支持GPT4.0