Update to new v-slots notation. #794.

This commit is contained in:
mateuswetah 2023-07-10 14:51:45 -03:00
parent 7adf34050a
commit d3491e91cf
15 changed files with 52 additions and 52 deletions

View File

@ -522,10 +522,10 @@
:disabled="form.enable_cover_page != 'yes'"
check-infinite-scroll
@infinite-scroll="fetchMoreCoverPages">
<template v-slot="props">
<template #default="props">
{{ props.option.title.rendered }}
</template>
<template slot="empty">{{ $i18n.get('info_no_page_found') }}</template>
<template #empty>{{ $i18n.get('info_no_page_found') }}</template>
</b-autocomplete>
<div

View File

@ -165,7 +165,7 @@
:append-to-body="true"
check-infinite-scroll
@infinite-scroll="fetchMoreParentTerms">
<template v-slot="props">
<template #default="props">
<div class="media">
<div
v-if="props.option.header_image"
@ -179,7 +179,7 @@
</div>
</div>
</template>
<template slot="empty">{{ $i18n.get('info_no_parent_term_found') }}</template>
<template #empty>{{ $i18n.get('info_no_parent_term_found') }}</template>
</b-autocomplete>
<transition name="fade">
<p

View File

@ -15,7 +15,7 @@
:placeholder="(metadatumType === 'Tainacan\\Metadata_Types\\Relationship') ? $i18n.get('info_type_to_search_items') : $i18n.get('info_type_to_search_metadata')"
check-infinite-scroll
@infinite-scroll="searchMore">
<template v-slot="props">
<template #default="props">
<div class="media">
<div
class="media-left"
@ -37,7 +37,7 @@
</template>
<template
v-if="!isLoadingOptions"
slot="empty">
#empty>
{{ $i18n.get('info_no_options_found' ) }}
</template>
</b-autocomplete>

View File

@ -17,7 +17,7 @@
:placeholder="getInputPlaceholder"
check-infinite-scroll
@infinite-scroll="searchMore">
<template v-slot="props">
<template #default="props">
<div class="media">
<div
class="media-left"
@ -37,7 +37,7 @@
</template>
<template
v-if="!isLoadingOptions"
slot="empty">
#empty>
{{ $i18n.get('info_no_options_found' ) }}
</template>
</b-taginput>

View File

@ -18,7 +18,7 @@
:placeholder="$i18n.get('info_type_to_add_terms')"
check-infinite-scroll
@infinite-scroll="searchMore">
<template v-slot="props">
<template #default="props">
<div class="media">
<div class="media-content">
<span class="ellipsed-text">{{ props.option.label }}</span>
@ -30,7 +30,7 @@
</template>
<template
v-if="!isLoadingOptions"
slot="empty">
#empty>
{{ $i18n.get('info_no_options_found' ) }}
</template>
</b-taginput>

View File

@ -32,7 +32,7 @@
@infinite-scroll="searchMore"
:has-counter="false"
@focus="onMobileSpecialFocus">
<template v-slot="props">
<template #default="props">
<div
v-if="!isDisplayingRelatedItemMetadata"
class="media">
@ -55,12 +55,12 @@
</template>
<template
v-if="!isLoading"
slot="empty">
#empty>
{{ $i18n.get('info_no_item_found') }}
</template>
<template
v-if="currentUserCanEditItems && (!$adminOptions.itemEditionMode || $adminOptions.allowItemEditionModalInsideModal)"
slot="footer">
#footer>
<a @click="editItemModalOpen = true">
{{ $i18n.get('label_create_new_item') + ' "' + searchQuery + '"' }}
</a>

View File

@ -134,7 +134,7 @@
:placeholder="$i18n.get('instruction_select_one_or_more_collections')"
@typing="filterCollections"
:loading="loadingCollections">
<template v-slot="props">
<template #default="props">
<div class="media">
<div
v-if="props.option.thumbnail && props.option.thumbnail['tainacan-small'] && props.option.thumbnail['tainacan-small']"
@ -149,7 +149,7 @@
</div>
</div>
</template>
<template slot="empty">
<template #empty>
{{ $i18n.get('info_no_options_found') }}
</template>
</b-taginput>

View File

@ -25,7 +25,7 @@
check-infinite-scroll
@infinite-scroll="loadMoreTerms"
:has-counter="false">
<template v-slot="props">
<template #default="props">
<div class="media">
<div class="media-content">
{{ props.option.label }}
@ -34,12 +34,12 @@
</template>
<template
v-if="!isFetching"
slot="empty">
#empty>
{{ $i18n.get('info_no_terms_found') }}
</template>
<template
v-if="allowNew"
slot="footer">
#footer>
<a @click="$emit('showAddNewTerm', { name: searchName })">
{{ $i18n.get('label_create_new_term') + ' "' + searchName + '"' }}
</a>

View File

@ -30,7 +30,7 @@
{{ $i18n.get('info_metadata_autocomplete_suggestions') }}
</span>
</template>
<template v-slot="props">
<template #default="props">
<div class="media">
<div class="media-content">
<span class="ellipsed-text">{{ props.option.label }}</span>

View File

@ -27,7 +27,7 @@
check-infinite-scroll
@infinite-scroll="searchMore"
:has-counter="false">
<template v-slot="props">
<template #default="props">
<div class="media">
<div
v-if="props.option.avatar_urls && props.option.avatar_urls['24']"
@ -43,7 +43,7 @@
</template>
<template
v-if="!isLoading"
slot="empty">
#empty>
{{ $i18n.get('info_no_user_found') }}
</template>
</b-taginput>

View File

@ -88,7 +88,7 @@
check-infinite-scroll
:append-to-body="true"
@infinite-scroll="fetchMoreParentTerms">
<template v-slot="props">
<template #default="props">
<div class="media">
<div
v-if="props.option.header_image_id"
@ -102,7 +102,7 @@
</div>
</div>
</template>
<template slot="empty">{{ $i18n.get('info_no_parent_term_found') }}</template>
<template #empty>{{ $i18n.get('info_no_parent_term_found') }}</template>
</b-autocomplete>
</div>
</section>

View File

@ -55,7 +55,7 @@
check-infinite-scroll
:append-to-body="true"
@infinite-scroll="fetchMoreParentTerms">
<template v-slot="props">
<template #default="props">
<div class="media">
<div
v-if="props.option.header_image_id"
@ -69,7 +69,7 @@
</div>
</div>
</template>
<template slot="empty">{{ $i18n.get('info_no_parent_term_found') }}</template>
<template #empty>{{ $i18n.get('info_no_parent_term_found') }}</template>
</b-autocomplete>
</div>
</section>

View File

@ -103,7 +103,7 @@
icon="account"
check-infinite-scroll
@infinite-scroll="fetchMoreUsersForFiltering">
<template v-slot="props">
<template #default="props">
<div class="media">
<div
v-if="props.option.avatar_urls && props.option.avatar_urls['24']"
@ -119,7 +119,7 @@
</template>
<template
v-if="!isFetchingUsers"
slot="empty">
#empty>
{{ $i18n.get('info_no_user_found') }}
</template>
</b-autocomplete>

View File

@ -313,29 +313,29 @@
<b-collapse
aria-id="metadata-collapse-for-slideshow"
:open="!collapseAll">
<label
class="label has-text-white"
v-slot:trigger="props">
<span class="icon">
<i
:class="{ 'tainacan-icon-arrowdown' : props.open, 'tainacan-icon-arrowright' : !props.open}"
class="has-text-secondary tainacan-icon tainacan-icon-1-25em"/>
</span>
<span
v-tooltip="{
delay: {
shown: 500,
hide: 300,
},
content: metadatum.name,
autoHide: false,
placement: 'auto-start',
popperClass: ['tainacan-tooltip', 'tooltip']
}"
class="ellipsed-name">
{{ metadatum.name }}
</span>
</label>
<template #trigger="props">
<label class="label has-text-white">
<span class="icon">
<i
:class="{ 'tainacan-icon-arrowdown' : props.open, 'tainacan-icon-arrowright' : !props.open}"
class="has-text-secondary tainacan-icon tainacan-icon-1-25em"/>
</span>
<span
v-tooltip="{
delay: {
shown: 500,
hide: 300,
},
content: metadatum.name,
autoHide: false,
placement: 'auto-start',
popperClass: ['tainacan-tooltip', 'tooltip']
}"
class="ellipsed-name">
{{ metadatum.name }}
</span>
</label>
</template>
<div class="content">
<p
class="has-text-white"

View File

@ -65,7 +65,7 @@
:disabled="!hasParent"
check-infinite-scroll
@infinite-scroll="fetchMoreParentTerms">
<template v-slot="props">
<template #default="props">
<div class="media">
<div
v-if="props.option.header_image"
@ -79,7 +79,7 @@
</div>
</div>
</template>
<template slot="empty">{{ $i18n.get('info_no_parent_term_found') }}</template>
<template #empty>{{ $i18n.get('info_no_parent_term_found') }}</template>
</b-autocomplete>
</b-field>