Vue problems encountered in the use

 

1、Avoid using non-primitive value as key, use string/number value inst

    This is because the use vue for loop, data binding problem, is running ok, but when the F12 will see an error. Before writing the following error when:

<tr v-for ="info in pageInfo.infoList" :key="info">
    <td class="first">{{info.name}}</td>
</tr>

 Modified to the following, not being given (before the Internet version of the question of what some say, the update is still a problem).

<tr v-for ="(info, item) in pageInfo.infoList" :key="item">
    <td class="first">{{info.name}}</td>
</tr>

 

Guess you like

Origin blog.csdn.net/it_lihongmin/article/details/94734990
Recommended