vue assembly 5 and v-for assembly instructions

Using the v-for traversing an array of time and will not repeat vue generate all the elements of a given array change, but intelligent find the elements you want to change, and change only those elements

key attribute can tell each element in the array should vue elements on the page which is associated with the default key attributes of the index value when recycled elements

Note that, if you want to delete elements in the array, generally do not use the index, although vue not issue a warning, but I will not delete a desired element. The index will be used to render in practice, labeling, delete call interface is accomplished through the background

Guess you like

Origin www.cnblogs.com/shcs/p/11968382.html