<img > v-bind:src failed to render successfully

for example, I define an empty object in the initialization data of a page

 data () {
      return {
        community: {},
      }
    },

and my tag is written

 <img class="uploadImageDiv" mode="aspectFill" :src="community.avatarUrl"/>

when I first assigned a value to community

this.community.avatarUrl = "XXXXX.png"

the reasonable img tag will render immediately, right? But it didn"t. Why?
maybe it has something to do with me defining an object? Because if I define an avatarUrl="XXXXX.png" directly in data and can render directly


because the attribute community.avatarUrl is not observed at all.
set

  community: {
    avatarUrl:''
    },

or

this.community= {avatarUrl :'XXXXX.png'}

does not render it means that you are not reasonable with vue, 1. Define the path of img's src directly in data, 2. If you want to this.community.avatarUrl this method, please see how to write the response of the new object in vue


this.$set(this.community,"avatarUrl","xxx.png")

vue does not detect the new properties of the object, or the definition number is just like the
document written upstairs.


does not render to show that you are not reasonable with vue


due to JavaScript restrictions, Vue cannot detect the addition or deletion of object attributes
correct
this.$set (this.community,'avatarUrl', 'XXXXX.png');


Thank you! Very clear!

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-1b30fef-2b0c0.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-1b30fef-2b0c0.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?