Vue is not under an element package, how to write key

<ul>
  <template v-for="item in items">
    <li>{{ item.msg }}</li>
    <li class="divider" role="presentation"></li>
  </template>
</ul>

like this

Nov.26,2021

<ul>
    <template v-for="item in items">
        <li :key="item.id+1">{{ item.msg }}</li>
        <li :key="item.id+2" class="divider" role="presentation"></li>
    </template>
</ul>

The function of

key is to distinguish elements and cannot be placed on template. The values of key can be spliced according to the requirements, so use

flexibly.
<template v-for="item in items">
    <li :key="item.id + '-1'">{{ item.msg }}</li>
    <li :key="item.id + '-2'" class="divider" role="presentation"></li>
</template>

</li>
</template>
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b33122-2be72.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b33122-2be72.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?