Using v-for v-model data and binding loop

v-model can be two-way data binding, if the data in the situation data group exists, may be acquired value of the name corresponding to the value specified by the value in the key way when binding.

<td v-model="value.store_user_id">{{value.store_user_id}}</td>

The wording can easily help us find a certain special value.

v-for data objects may be output in the iteration, when the data object is complicated, can be used value, key simplified method. Note that the data is key: value storage situation, where the key and value are not actually refers to the data key-value pairs, but rather refers to a layer of abstraction that all keys in after the pair.

<tr class="text-c" v-for="(value, key) in">

I use the v-for = "(value, key) in" to indicate that one of the keys to all subsequent iterations of the loop, with to represent the corresponding value, and with v-model to bind it.

<tr class="text-c" v-for="(value, key) in">
<td><input type="checkbox" v-bind:value="key" name=""></td>
<td v-model="value.store_user_id">{{value.store_user_id}}</td>
<td v-model="value.user_name">{{value.user_name}}</td>
<td v-model="value.password">{{value.password}}</td>
<td v-model="value.real_name">{{value.real_name}}</td>
<td v-model="value.is_super">{{value.is_super}}</td>
<td v-model="value.is_delete">{{value.is_delete}}</td>
<td v-model="value.wxapp_id" class="td-status"><span class="label label-success radius">{{value.wxapp_id}}</span></td>

The method may be used certain value of the data object in some way out of iterations.

Guess you like