码迷,mamicode.com
首页 > 其他好文 > 详细

Cannot read property 'XXX' of undefined"

时间:2020-06-18 16:36:41      阅读:68      评论:0      收藏:0      [点我收藏+]

标签:art   判断   方法   hold   def   解决方法   lex   mode   lis   

实例:

报错:Cannot read property ‘itemGroupList‘ of undefined"

解决方法:在itemGroupList上一层判断一下父级元素

<div v-if="table2.itemCat">
   <div v-for="(itemgrounp,indexgrounp) in table2.itemCat.itemGroupList" :key="indexgrounp">
       <div>
           <div style="display:flex;juistify-content:flex-start;margin:10px">
           <span>分组名:</span>
           <el-input v-model="itemgrounp.group_name" placeholder="请输入分组名称" class="grounp_name"></el-input>
           <el-button @click="deleteBygroundid(indexgrounp)" type="danger" icon="el-icon-delete" style="height:40px;margin-left:15px" circle></el-button>
       </div>
   </div>
</div>

 

Cannot read property 'XXX' of undefined"

标签:art   判断   方法   hold   def   解决方法   lex   mode   lis   

原文地址:https://www.cnblogs.com/meiyanstar/p/13157784.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!