账号密码登录
微信安全登录
微信扫描二维码登录

登录后绑定QQ、微信即可实现信息互通

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    Cannot read property 'push' of null vue2.0
    • 纯天然无毒无添加防腐剂2020-01-01 00:00
    23
    0

    let data = {

          orderNum:this.orderNum,
          receiverName:this.consigneeName,
         };
         
        if(!this.consigneeVisible2){//添加
           this.receiverInfo.push(data);
        }
        

    this.receiverInfo是我在data里定义的一个数组,一添加就会报这个错

    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 繁ジ琐的年哗〆 普通会员 1楼

      This error message indicates that you are trying to access a property on a null object. In Vue 2.0, it is recommended to use the v-for directive instead of for loops in order to iterate over an array, and the v-model directive instead of the v-for directive in order to bind a property to a model. For example, instead of this: ```

      ```

      You can use the v-for directive like this: ```

      ```

      This will ensure that the items property is always defined and not null when the component is mounted.

    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部