mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
refactor: single key
on template v-for
This commit is contained in:
parent
fdbe64cf95
commit
03b136478a
5 changed files with 13 additions and 15 deletions
|
@ -1,8 +1,7 @@
|
|||
<template>
|
||||
<BListGroup :flush="flush" :style="{ '--depth': tree.depth }">
|
||||
<template v-for="(node, i) in tree.children">
|
||||
<template v-for="(node, i) in tree.children" :key="node.id">
|
||||
<BListGroupItem
|
||||
:key="node.id"
|
||||
class="list-group-item-action"
|
||||
:class="getClasses(node, i)"
|
||||
@click="$router.push(node.data.to)"
|
||||
|
@ -26,7 +25,6 @@
|
|||
|
||||
<BCollapse
|
||||
v-if="node.children"
|
||||
:key="'collapse-' + node.id"
|
||||
v-model="node.data.opened"
|
||||
:id="'collapse-' + node.id"
|
||||
>
|
||||
|
|
|
@ -4,8 +4,8 @@
|
|||
<BSkeleton width="30%" height="36px" class="m-0" />
|
||||
</template>
|
||||
|
||||
<template v-for="count in itemCount">
|
||||
<BRow :key="count" :class="{ 'd-block': cols === null }">
|
||||
<template v-for="count in itemCount" :key="count">
|
||||
<BRow :class="{ 'd-block': cols === null }">
|
||||
<BCol v-bind="cols">
|
||||
<div style="height: 38px" class="d-flex align-items-center">
|
||||
<BSkeleton
|
||||
|
@ -32,7 +32,7 @@
|
|||
</BCol>
|
||||
</BRow>
|
||||
|
||||
<hr :key="count + '-hr'" />
|
||||
<hr />
|
||||
</template>
|
||||
|
||||
<template #footer>
|
||||
|
|
|
@ -96,8 +96,8 @@
|
|||
:title="$t('group_specific_permissions')"
|
||||
icon="group"
|
||||
>
|
||||
<template v-for="(userName, index) in activeUserGroups">
|
||||
<BRow :key="userName">
|
||||
<template v-for="userName in activeUserGroups" :key="userName">
|
||||
<BRow>
|
||||
<BCol md="3" lg="2">
|
||||
<YIcon iname="user" /> <strong>{{ userName }}</strong>
|
||||
</BCol>
|
||||
|
@ -116,7 +116,7 @@
|
|||
/>
|
||||
</BCol>
|
||||
</BRow>
|
||||
<hr :key="index" />
|
||||
<hr />
|
||||
</template>
|
||||
|
||||
<TagsSelectizeItem
|
||||
|
|
|
@ -70,12 +70,12 @@
|
|||
</BButton>
|
||||
</template>
|
||||
|
||||
<template v-for="({ filename, content }, i) in logs">
|
||||
<h3 :key="i + '-filename'">
|
||||
<template v-for="{ filename, content } in logs" :key="filename">
|
||||
<h3>
|
||||
{{ filename }}
|
||||
</h3>
|
||||
|
||||
<pre :key="i + '-content'" class="log"><code>{{ content }}</code></pre>
|
||||
<pre class="log"><code>{{ content }}</code></pre>
|
||||
</template>
|
||||
</YCard>
|
||||
</ViewBase>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<template>
|
||||
<CardForm :title="$t('tools_webadmin_settings')" icon="cog" no-footer>
|
||||
<template v-for="(field, fname) in fields">
|
||||
<FormField v-bind="field" v-model="self[fname]" :key="fname" />
|
||||
<hr :key="fname + 'hr'" />
|
||||
<template v-for="(field, fname) in fields" :key="fname">
|
||||
<FormField v-bind="field" v-model="self[fname]" />
|
||||
<hr />
|
||||
</template>
|
||||
</CardForm>
|
||||
</template>
|
||||
|
|
Loading…
Reference in a new issue