use directive to add tooltip

+ change grid size for search page
+
This commit is contained in:
geoffrey45
2022-09-04 12:48:56 +03:00
parent 4861429e4e
commit 24bfa73ab6
16 changed files with 111 additions and 81 deletions
+18 -6
View File
@@ -1,17 +1,29 @@
<template>
<div class="ellip" v-if="artists[0] !== ''">
<span v-for="artist in putCommas(artists)" :key="artist">{{ artist }}</span>
</div>
<div class="ellip" v-else>
<span>{{ albumartist }}</span>
<div v-tooltip="returnArtists()" style="width: auto;">
<div class="ellip" v-if="artists[0] !== '' && artists.length > 1">
<span v-for="artist in putCommas(artists)" :key="artist">{{
artist
}}</span>
</div>
<div class="ellip" v-else>
<span>{{ albumartist }}</span>
</div>
</div>
</template>
<script setup lang="ts">
import { putCommas } from "@/utils";
defineProps<{
const props = defineProps<{
artists: string[];
albumartist: string | undefined;
}>();
function returnArtists() {
if (props.artists[0] !== "" && props.artists.length > 1) {
return props.artists.join(", ");
} else {
return props.albumartist;
}
}
</script>