Applet method setData only modify an attribute of object

data data:

data: {
    assets: null
}

setData method using [ "Object attribute"] way to update the value of a property.

this.setData({ ["assets.diamonds"]: diamonds });

 

Guess you like

Origin www.cnblogs.com/zinan/p/12205041.html
Recommended