Rebel-66 2020-08-06 11:01 采纳率: 80%
浏览 285
已结题

Error in render: "TypeError: Cannot read property 'applyShipmentItems' of null

图片说明

这个是报错信息

在这个代码中的applyShipmentItems,是空了

<el-card shadow="never" class="box-card" v-if="form.applyShipment.applyShipmentItems.length>0" style="margin-top: 20px;cursor: pointer;" @click.native="handleEdit(6)">
                <div slot="header" class="clearfix">
                    <span class="head_tital">送货</span>
                </div>
                <div>
                    <label>送货公司 | {{form.applyShipment.company}}</label> &nbsp; &nbsp; &nbsp;
                    <label>送货数量 | {{form.applyShipment.number}}</label> &nbsp; &nbsp; &nbsp;
                    <label>联系人 | {{form.applyShipment.contactPerson}}</label>
                </div>
                <el-table
                        :data="form.applyShipment.applyShipmentItems" style="width: 100%" class="noHead">
                    <el-table-column>
                        <template slot-scope="scope">
                            <ul class="table_inner_ul">
                                <li><label class="table_inner_text">{{scope.row.description}}</label></li>
                                <li><label class="table_inner_small">描述</label></li>
                            </ul>
                        </template>
                    </el-table-column>
                </el-table>
            </el-card>

应该是哪里出问题了呢,求大佬解答

  • 写回答

2条回答 默认 最新

  • 菜鸟咸鱼一锅端 2020-08-06 16:33
    关注

    applyShipmentItems是什么数据类型?直接判他不等于null
    v-if="form.applyShipment.applyShipmentItems!=null"

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 已结题 (查看结题原因) 5月30日
  • 已采纳回答 5月30日

悬赏问题

  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 保护模式-系统加载-段寄存器