当前位置:网站首页>小程序 :遍历list里面的某个数组的值,等同于 for=“list” list.comment里面的某一项
小程序 :遍历list里面的某个数组的值,等同于 for=“list” list.comment里面的某一项
2022-06-28 08:39:00 【述。一牛】
// 最外层是: wx:for="{
{list}}" 他的item下面有 wx:for="{
{item.commentList}}" ,要遍历item.commentList的index,方法:wx:for="{
{item.commentList}}" wx:for-item="val" wx:for-index="i" wx:key="i"
<view class="content_box_item content_box_item1" style="margin-top: {
{margintop}}rpx;{
{list.length==index+1?'margin-bottom:0px;':'margin-bottom:'+ marginbottom+ 'rpx;'}}" wx:key="index" wx:for="{
{list}}" catchtap="toOrderDetail" data-showStatus="{
{item.showStatus}}" data-category="{
{item.category}}" data-id="{
{item.id}}" data-directOrder="{
{item.directOrder}}" data-status="{
{item.status}}" data-index="{
{index}}" data-fgr="fgrtype">
<view class="usercontentbox" wx:for="{
{item.commentList}}" wx:for-item="val" wx:for-index="i" wx:key="i" wx:if="{
{i<=2}}">
<view class="userconntenname downstairbox">
<view class="downstairbox1">
<block wx:if="{
{val.hotComment}}">
<image src="https://zhili-resource.oss-cn-shenzhen.aliyuncs.com/static/DRminapp/hotgif.gif" lazy-load="true" class="hotgif" alt=""/>
</block>
<view class="downstair2" style="margin-right:{
{item.user.id==val.user.id?48:0}}rpx;color:#1152B5">
<text>{
{
val.anonymousNickName || val.user.anonymousNickName|| val.user.nickName}}</text>
<text class="downstair" wx:if="{
{item.user.id==val.user.id}}">楼主</text>
</view>
<text style="margin-left:10rpx">:</text>
{
{
val.content}}
<view class="pic_text" wx:if="{
{val.imgUrl}}" src="{
{val.imgUrl}}" data-src="{
{val.imgUrl}}">
<image lazy-load="true" src="http://zhili-resource.oss-cn-shenzhen.aliyuncs.com/static/DRminapp/mall/headline/icon_upload_pic_small%402x.png" class="commend_icon" />
查看图片
</view>
</view>
边栏推荐
- 抖音服务器带宽有多大,才能供上亿人同时刷?
- Force buckle 1024 video splicing
- centos mysql5.5配置文件在哪
- Solution: selenium common. exceptions. WebDriverException: Message: ‘chromedriver‘ execu
- Construire le premier réseau neuronal avec pytorch et optimiser
- webrtc优势与模块拆分
- 罗氏线圈可以测量的大电流和频率范围
- 第六届智能家居亚洲峰会暨精品展(Smart Home Asia 2022)将于10月在沪召开
- Idea related issues
- [introduction to SQL in 10 days] day5+6 consolidated table
猜你喜欢

隐私计算FATE-----离线预测

Introduction, compilation, installation and deployment of Doris learning notes

Installing mysql5.7 under Windows

The 6th smart home Asia 2022 will be held in Shanghai in October

Almost Union-Find(带权并查集)

找合适的PMP机构只需2步搞定,一查二问
![[learning notes] matroid](/img/e3/4e003f5d89752306ea901c70230deb.png)
[learning notes] matroid

【.NET6】gRPC服务端和客户端开发案例,以及minimal API服务、gRPC服务和传统webapi服务的访问效率大对决

Idea related issues

与普通探头相比,差分探头有哪些优点
随机推荐
40多岁的人如何配置年金险?哪款产品比较合适?
Loss损失函数
Map. ToCharArray( ),Map. getOrDefault(). Map. charAt()
Where is CentOS mysql5.5 configuration file
Avframe Memory Management API
After installing NRM, the internal/validators js:124 throw new ERR_ INVALID_ ARG_ TYPE(name, ‘string‘, value)
Integer partition
Guangzhou: new financial activities and new opportunities for enterprises
A - 深海探险
为什么函数模板没有偏特化?
【力扣10天SQL入门】Day4 组合查询 & 指定选取
Kali Notes(1)
TCP
Webrtc advantages and module splitting
Sword finger offer 30 Stack containing min function
Two tips for block level elements
批量修改表和表中字段排序规则
[introduction to SQL in 10 days] day5+6 consolidated table
[learning notes] simulation
DELL R730服务器开机报错:[XXX] usb 1-1-port4: disabled by hub (EMI?), re-enabling...