On the question of Cannot read property 'bar' of undefined

message is an empty object,

    var app = new Vue({
      el: "-sharpapp",
      data: {
        message: {},
      },

and then in

<input ... v-model="message.foo">


<input ... v-model="message.foo.bar">

clipboard.png

how do you explain this?

Feb.27,2021

message is an empty object. Foo is not initialized in message.foo, so you cannot take a value for undefined,undefined, that is, you cannot message.foo.bar

.
//
message: {foo:{}},
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-1b9d83d-2e6ec.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-1b9d83d-2e6ec.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?