html52.com
我爱小程序-开发者交流社区

wx:for循环数据变更时报错:nodeId is not defined

问题模块 框架类型 问题类型 API/组件名称 终端类型 操作系统 微信版本 基础库版本
API和组件 小程序 Bug Live-player、view 6.5 1.9

使用wx:for循环时,数据在逻辑处理下变更长度,导致console控制台报下面错了,在所有自己写的代码和逻辑中都没有使用过 nodeId 这个变量,想问下这个应该怎么处理,在客户端和工具中都能看到这个报错

核心代码:

<view class='bottomline' wx:if="{{roompeoples.length > 0}}" wx:for="{{roompeoples}}" wx:key="key">

    <text class='name'>{{item.name}}</text><text data-key='{{index}}' wx:if="{{!item.me}}" class='btncli {{item.isVoce?"onvoice":"novoice"}}' bindtap='changelisten'>静音</text>

    <live-player style="width:1px;height:1px;" id="{{item.id}}" wx:if="{{item.rtmpDownUrl}}" src="{{item.rtmpDownUrl}}" mode="RTC" autoplay bindstatechange="statelivechange" binderror="liveerror" />

  </view>


报错信息:

ReferenceError: nodeId is not defined

    at http://127.0.0.1:59565/appservice/__dev__/WAService.js:7:30276

    at e.(anonymous function) (http://127.0.0.1:59565/appservice/__dev__/WAService.js:4:4785)

    at a (http://127.0.0.1:59565/appservice/appservice:1053:9451)

    at e.registerCallback (http://127.0.0.1:59565/appservice/appservice:1053:9638)

    at m.forEach (http://127.0.0.1:59565/appservice/appservice:1053:5612)

    at Array.forEach (<anonymous>)

    at d (http://127.0.0.1:59565/appservice/appservice:1053:5592)

    at WebSocket.j.onmessage (http://127.0.0.1:59565/appservice/appservice:1053:5485)


评论 抢沙发

  • 昵称 (必填)
  • 邮箱 (必填)
  • 网址

真正的个人免签约支付接口

云免签H5支付