记录一次vue的报错

1.主要代码

<div class="hello-ezuikit-js"  v-for="(item,index) in list">
<div class="web-cam" style="float:left;45%;">
<div>{{item.webcamAreaName}} {{item.channelName}}</div>
<div :id="genId(index)" style="600px;height:400px;">
</div>
</div>
<div id="video-container" style="1500px;height:800px"></div>
</div>
var item=res.result[j];
                                                     var fistData={
                                                              autoplay: true,
                                                              id: "video-container0",
                                                              accessToken:"3423",
                                                              url: "ezopen://open.ys7.com/E82901339/1.hd.live",
                                                              template: "simple", // simple - 极简版;standard-标准版;security - 安防版(预览回放);voice-语音版;
                                                               600,
                                                              height: 400
                                                            };
                                                      fistData.accessToken=item.accessToken;
                                                      fistData.id="video-container"+j;
                                                      fistData.url="ezopen://open.ys7.com/"+item.serialNum+"/1.hd.live";
                                                      var player =  new EZUIKit.EZUIKitPlayer(fistData);
 var player =  new EZUIKit.EZUIKitPlayer(fistData);我的代码是这行报错,
内部调用发信息

首先错误的js里面可以看到错误的行,发现通过getelementbyid获取

video-container0的id,发现获取的是空对象。
考虑到什么生命周期问题。错误找到
原文地址:https://www.cnblogs.com/longsanshi/p/14471832.html