vue.js forced assignment, refresh $ .set array or object method of ()

The actual development process, when the need for data exchange of the assignment, refresh, but then can not refresh the entire page to each assignment, it is necessary to use methods vue.js $ .set (), to achieve the object of the assignment partial refresh

Syntax: Vue.set (object, key, value) (. Vm $ set () can also write, vm is an instance of an object)

object: Object assignment

key: the Value field inside the object to be assigned

value: The value assigned to the field

E.g:

Change-ON : (value) => {                                          
                                                VM $. SET (vm.tableList [ the params .row.indexA] .STEPselecteSketchList [ the params .index], ' sketchMapId ' , value); to vm.tableList [params.row.indexA ] .STEPselecteSketchList [params.index] object inside sketchMapId new value assigned to a field value, after the assignment is completed this object will refresh
 } 

 

Guess you like

Origin www.cnblogs.com/xxflz/p/11401603.html