Avoids template shadows in some index references inside loops.
This commit is contained in:
parent
a701d497ab
commit
26f4512cdd
|
@ -25,7 +25,6 @@ module.exports = {
|
|||
'vue/prop-name-casing': 'off',
|
||||
'vue/no-confusing-v-for-v-if': 'off',
|
||||
'vue/no-use-v-if-with-v-for': 'off',
|
||||
'vue/no-template-shadow': 'off',
|
||||
'vue/require-default-prop': 'off' // https://github.com/vuejs/eslint-plugin-vue/blob/master/docs/rules/require-default-prop.md
|
||||
},
|
||||
globals: {
|
||||
|
|
|
@ -68,15 +68,15 @@
|
|||
{{ $i18n.get('label_create_metadatum') }}
|
||||
</option>
|
||||
<option
|
||||
v-for="(metadatum, index) of collectionMetadata"
|
||||
:key="index"
|
||||
:value="metadatum.id"
|
||||
:disabled="checkIfMetadatumIsAvailable(metadatum.id)">
|
||||
v-for="(collectionMetadatum, metadatumIndex) of collectionMetadata"
|
||||
:key="metadatumIndex"
|
||||
:value="collectionMetadatum.id"
|
||||
:disabled="checkIfMetadatumIsAvailable(collectionMetadatum.id)">
|
||||
<span class="metadatum-name">
|
||||
{{ metadatum.name }}
|
||||
{{ collectionMetadatum.name }}
|
||||
</span>
|
||||
<span class="label-details">
|
||||
({{ metadatum.metadata_type_object.name }}) <em>{{ (metadatum.collection_id != collectionId) ? $i18n.get('label_inherited') : '' }}</em>
|
||||
({{ collectionMetadatum.metadata_type_object.name }}) <em>{{ (collectionMetadatum.collection_id != collectionId) ? $i18n.get('label_inherited') : '' }}</em>
|
||||
</span>
|
||||
</option>
|
||||
</b-select>
|
||||
|
|
|
@ -649,8 +649,8 @@
|
|||
:src="item['thumbnail']['tainacan-medium-full'] ? item['thumbnail']['tainacan-medium-full'][0] : (item['thumbnail'].medium_large ? item['thumbnail'].medium_large[0] : thumbPlaceholderPath)">
|
||||
</div>
|
||||
<span
|
||||
v-for="(column, index) in tableMetadata"
|
||||
:key="index"
|
||||
v-for="(column, metadatumIndex) in tableMetadata"
|
||||
:key="metadatumIndex"
|
||||
:class="{ 'metadata-type-textarea': column.metadata_type_object != undefined && column.metadata_type_object.component == 'tainacan-textarea' }"
|
||||
v-if="collectionId == undefined && column.display && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop == 'description')">
|
||||
<h3 class="metadata-label">{{ $i18n.get('label_description') }}</h3>
|
||||
|
@ -659,8 +659,8 @@
|
|||
class="metadata-value"/>
|
||||
</span>
|
||||
<span
|
||||
v-for="(column, index) in tableMetadata"
|
||||
:key="index"
|
||||
v-for="(column, metadatumIndex) in tableMetadata"
|
||||
:key="metadatumIndex"
|
||||
:class="{ 'metadata-type-textarea': column.metadata_type_object != undefined && column.metadata_type_object.component == 'tainacan-textarea' }"
|
||||
v-if="renderMetadata(item.metadata, column) != '' && column.display && column.slug != 'thumbnail' && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop != 'title')">
|
||||
<h3 class="metadata-label">{{ column.name }}</h3>
|
||||
|
@ -669,8 +669,8 @@
|
|||
class="metadata-value"/>
|
||||
</span>
|
||||
<span
|
||||
v-for="(column, index) in tableMetadata"
|
||||
:key="index"
|
||||
v-for="(column, metadatumIndex) in tableMetadata"
|
||||
:key="metadatumIndex"
|
||||
v-if="(column.metadatum == 'row_creation' || column.metadatum == 'row_author') && item[column.slug] != undefined">
|
||||
<h3 class="metadata-label">{{ column.name }}</h3>
|
||||
<p
|
||||
|
|
|
@ -174,9 +174,9 @@
|
|||
<div
|
||||
class="tainacan-attachments-in-modal"
|
||||
v-if="diff.new.length">
|
||||
<template v-for="(attachment, index) in diff.new">
|
||||
<template v-for="(attachment, attachmentIndex) in diff.new">
|
||||
<file-item
|
||||
:key="index"
|
||||
:key="attachmentIndex"
|
||||
:modal-on-click="false"
|
||||
:show-name="true"
|
||||
:file="{
|
||||
|
|
|
@ -70,7 +70,6 @@ export default {
|
|||
isRepositoryLevel: true,
|
||||
pageTitle: '',
|
||||
activeRouteName: '',
|
||||
breadCrumbItem: {},
|
||||
childrenBreadCrumbItems: []
|
||||
}
|
||||
},
|
||||
|
|
|
@ -203,7 +203,6 @@ export default {
|
|||
return {
|
||||
collections: [],
|
||||
collectionItems: {},
|
||||
collection: undefined,
|
||||
collectionsRequestSource: undefined,
|
||||
isLoading: false,
|
||||
isLoadingCollection: false,
|
||||
|
|
|
@ -194,7 +194,6 @@ export default {
|
|||
return {
|
||||
terms: [],
|
||||
termItems: {},
|
||||
term: undefined,
|
||||
termsRequestSource: undefined,
|
||||
isLoading: false,
|
||||
isLoadingTerm: false,
|
||||
|
|
|
@ -57,8 +57,8 @@
|
|||
autoHide: false,
|
||||
placement: 'auto-start'
|
||||
}"
|
||||
v-for="(column, index) in displayedMetadata"
|
||||
:key="index"
|
||||
v-for="(column, metadatumIndex) in displayedMetadata"
|
||||
:key="metadatumIndex"
|
||||
class="metadata-title"
|
||||
v-if="collectionId != undefined && column.display && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop == 'title')"
|
||||
v-html="item.metadata != undefined ? renderMetadata(item.metadata, column) : ''" />
|
||||
|
@ -80,8 +80,8 @@
|
|||
class="skeleton"/>
|
||||
</div>
|
||||
<span
|
||||
v-for="(column, index) in displayedMetadata"
|
||||
:key="index"
|
||||
v-for="(column, metadatumIndex) in displayedMetadata"
|
||||
:key="metadatumIndex"
|
||||
:class="{ 'metadata-type-textarea': column.metadata_type_object.component == 'tainacan-textarea' }"
|
||||
v-if="renderMetadata(item.metadata, column) != '' && column.display && column.slug != 'thumbnail' && column.metadata_type_object != undefined && (column.metadata_type_object.related_mapped_prop != 'title')">
|
||||
<h3 class="metadata-label">{{ column.name }}</h3>
|
||||
|
|
|
@ -237,15 +237,15 @@
|
|||
id="tainacan-slide-container">
|
||||
<swiper-slide
|
||||
role="listitem"
|
||||
:ref="'thumb-' + item.id"
|
||||
:ref="'thumb-' + slideItem.id"
|
||||
:key="index"
|
||||
v-for="(item, index) of slideItems"
|
||||
v-for="(slideItem, index) of slideItems"
|
||||
class="tainacan-slide-item"
|
||||
:class="{'active-item': slideIndex == index}">
|
||||
<img
|
||||
:alt="$i18n.get('label_thumbnail') + ': ' + item.title"
|
||||
:alt="$i18n.get('label_thumbnail') + ': ' + slideItem.title"
|
||||
class="thumnail"
|
||||
:src="item['thumbnail']['tainacan-small'] ? item['thumbnail']['tainacan-small'][0] : (item['thumbnail'].thumbnail ? item['thumbnail'].thumbnail[0] : thumbPlaceholderPath)">
|
||||
:src="slideItem['thumbnail']['tainacan-small'] ? slideItem['thumbnail']['tainacan-small'][0] : (slideItem['thumbnail'].thumbnail ? slideItem['thumbnail'].thumbnail[0] : thumbPlaceholderPath)">
|
||||
|
||||
</swiper-slide>
|
||||
<!-- Swiper buttons are hidden as they actually swipe from slide to slide -->
|
||||
|
|
|
@ -23,8 +23,8 @@
|
|||
tabindex="0">
|
||||
<thead>
|
||||
<th
|
||||
v-for="(column, index) in displayedMetadata"
|
||||
:key="index"
|
||||
v-for="(column, metadatumIndex) in displayedMetadata"
|
||||
:key="metadatumIndex"
|
||||
v-if="column.display"
|
||||
class="column-default-width"
|
||||
:class="{
|
||||
|
@ -45,10 +45,10 @@
|
|||
:key="item"
|
||||
v-for="item in 12">
|
||||
<td
|
||||
v-for="(column, index) in displayedMetadata"
|
||||
:key="index"
|
||||
v-for="(column, metadatumIndex) in displayedMetadata"
|
||||
:key="metadatumIndex"
|
||||
v-if="column.display"
|
||||
:class="{ 'thumbnail-cell': index == 0 }"
|
||||
:class="{ 'thumbnail-cell': metadatumIndex == 0 }"
|
||||
class="column-default-width skeleton"/>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
@ -88,8 +88,8 @@
|
|||
|
||||
<!-- Item Displayed Metadata -->
|
||||
<td
|
||||
:key="index"
|
||||
v-for="(column, index) in displayedMetadata"
|
||||
:key="metadatumIndex"
|
||||
v-for="(column, metadatumIndex) in displayedMetadata"
|
||||
v-if="column.display"
|
||||
class="column-default-width"
|
||||
:class="{
|
||||
|
|
Loading…
Reference in New Issue