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

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

手机验证码登录
找回密码返回
邮箱找回 手机找回
注册账号返回
其他登录方式
分享
  • 收藏
    X
    watch数据在mounted中使用
    26
    0
    父子组件动态传参父级 一个按钮的操作editingProject (id) { this.redactBox = true // 控制子级显示消失 this.redactPageBox = false // 控制父级显示消失 this.projectID = id // 传入子级的id console.log('子级 == ', this.redactBox) console.log('父级 == ', this.redactPageBox) console.log('id == ', this.projectID)}打印的结果子级接收id我放在了子级watch里面 我想要在mounted里面用到这个id需要怎么在mounted里面接收, 谢谢!!!export default { props: {redactBox: { type: Boolean, default: false},projectID: String}, data () {return { redactList: [], // 音视频列表 photoList: [] // 图片列表}}, watch: {projectID (newVal) { console.log('watch= this.projectID == ', newVal)}}, mounted () {console.log('mounted = this.projectID ==', this.projectID)}
    0
    打赏
    收藏
    点击回答
        全部回答
    • 0
    更多回答
    扫一扫访问手机版
    • 回到顶部
    • 回到顶部