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

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

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    let leftData = this.leftData leftData.unshift(chooseData)
    51
    0
    这个leftData是父组件传过来的一个数组,然后我用了一个变量去等于它,此时我unshift一个chooseData数组进去,为什么不报错不能修改props的值呢,按理说不是一个数组嘛,引用值类型吧
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    • 無敵-女汉子° 普通会员 1楼

      This code is using JavaScript to manipulate the leftData array and add the chooseData value to the beginning of the array using the unshift() method. The unshift() method adds the value at the specified index to the end of the array, effectively shifting all other values to the right and the new value to the front. In this code, the unshift() method is called with the chooseData value as the argument, which is added to the beginning of the leftData array using the .unshift() method. The resulting leftData array will contain the chooseData value and all other values in the original leftData array will be shifted to the right.

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