mirror of
https://github.com/directus/directus.git
synced 2026-04-25 03:00:53 -04:00
Move key to component where v-for is defined (#15944)
This commit is contained in:
committed by
GitHub
parent
3c2125f646
commit
1a5d635efb
@@ -9,7 +9,7 @@
|
||||
<v-info v-if="noVisibleFields && !nested && !loading" :title="t('no_visible_fields')" icon="search" center>
|
||||
{{ t('no_visible_fields_copy') }}
|
||||
</v-info>
|
||||
<template v-for="(fieldName, index) in fieldNames">
|
||||
<template v-for="(fieldName, index) in fieldNames" :key="fieldName">
|
||||
<component
|
||||
:is="`interface-${fieldsMap[fieldName]?.meta?.interface || 'group-standard'}`"
|
||||
v-if="fieldsMap[fieldName]?.meta?.special?.includes('group')"
|
||||
@@ -19,7 +19,6 @@
|
||||
formFieldEls[fieldName] = el;
|
||||
}
|
||||
"
|
||||
:key="fieldName + '_group'"
|
||||
:class="[
|
||||
fieldsMap[fieldName]?.meta?.width || 'full',
|
||||
index === firstVisibleFieldIndex ? 'first-visible-field' : '',
|
||||
@@ -48,7 +47,6 @@
|
||||
formFieldEls[fieldName] = el;
|
||||
}
|
||||
"
|
||||
:key="fieldName + '_field'"
|
||||
:class="index === firstVisibleFieldIndex ? 'first-visible-field' : ''"
|
||||
:field="fieldsMap[fieldName] || {}"
|
||||
:autofocus="index === firstEditableFieldIndex && autofocus"
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<template v-for="(part, index) in parts">
|
||||
<mark v-if="part.highlighted" :key="index" class="highlight">{{ part.text }}</mark>
|
||||
<template v-for="(part, index) in parts" :key="index">
|
||||
<mark v-if="part.highlighted" class="highlight">{{ part.text }}</mark>
|
||||
<template v-else>{{ part.text }}</template>
|
||||
</template>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user