Put key on template

This commit is contained in:
Pavel Djundik 2020-09-18 20:06:59 +03:00
parent d689980f83
commit a55feeec56
5 changed files with 9 additions and 15 deletions

View file

@ -18,9 +18,8 @@
@mouseleave="activeItem = -1" @mouseleave="activeItem = -1"
@keydown.enter.prevent="clickActiveItem" @keydown.enter.prevent="clickActiveItem"
> >
<template v-for="(item, id) of items"> <template v-for="(item, id) of items" :key="item.name">
<li <li
:key="item.name"
:class="[ :class="[
'context-menu-' + item.type, 'context-menu-' + item.type,
item.class ? 'context-menu-' + item.class : null, item.class ? 'context-menu-' + item.class : null,

View file

@ -20,8 +20,8 @@
<p v-if="isLoading">Loading</p> <p v-if="isLoading">Loading</p>
<p v-else>You have no recent mentions.</p> <p v-else>You have no recent mentions.</p>
</template> </template>
<template v-for="message in resolvedMessages" v-else> <template v-for="message in resolvedMessages" v-else :key="message.msgId">
<div :key="message.msgId" :class="['msg', message.type]"> <div :class="['msg', message.type]">
<div class="mentions-info"> <div class="mentions-info">
<div> <div>
<span class="from"> <span class="from">

View file

@ -18,12 +18,8 @@
aria-relevant="additions" aria-relevant="additions"
@copy="onCopy" @copy="onCopy"
> >
<template v-for="(message, id) in condensedMessages"> <template v-for="(message, id) in condensedMessages" :key="message.id + '-date'">
<DateMarker <DateMarker v-if="shouldDisplayDateMarker(message, id)" :message="message" />
v-if="shouldDisplayDateMarker(message, id)"
:key="message.id + '-date'"
:message="message"
/>
<div <div
v-if="shouldDisplayUnreadMarker(message.id)" v-if="shouldDisplayUnreadMarker(message.id)"
:key="message.id + '-unread'" :key="message.id + '-unread'"

View file

@ -50,9 +50,9 @@
</template> </template>
<template v-if="message.whois.special"> <template v-if="message.whois.special">
<template v-for="special in message.whois.special"> <template v-for="special in message.whois.special" :key="special">
<dt :key="special">Special:</dt> <dt>Special:</dt>
<dd :key="special">{{ special }}</dd> <dd>{{ special }}</dd>
</template> </template>
</template> </template>

View file

@ -104,10 +104,9 @@
@start="onDragStart" @start="onDragStart"
@end="onDragEnd" @end="onDragEnd"
> >
<template v-for="(channel, index) in network.channels"> <template v-for="(channel, index) in network.channels" :key="channel.id">
<Channel <Channel
v-if="index > 0" v-if="index > 0"
:key="channel.id"
:channel="channel" :channel="channel"
:network="network" :network="network"
:active=" :active="