How does vue computed assign values to variables in objects in data

data(){
    return{
        a:{
            b:null
        }
    }
},
computed(){
    "a.b"(){
        return "ab"
    }
}
?
Aug.10,2021

is there something wrong with your grammar?
besides, 'a.b' is just a string, and A.B is two things.


the "A.B" on the first floor is a string. In fact, it can be written in watch. But you can't do it in computed if you don't know it.


it will be better to write down your reasons for doing so next time

abc: {
        get: function () {
          return ''
        },
        set: function (newVal) {
          this.a.b = newVal
        }
      }

use the set method
when you perform the this.abc=., to abc operation, the a.b in your data will change (guess you should be this requirement)

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1e61561-45927.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1e61561-45927.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?