mirror of
https://github.com/advplyr/audiobookshelf.git
synced 2024-12-20 19:06:06 +01:00
41 lines
789 B
Vue
41 lines
789 B
Vue
<template>
|
|
<div ref="container" @mouseover="mouseover" @mouseleave="mouseleave" class="relative">
|
|
<covers-book-cover :width="24" :audiobook="audiobook" />
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
props: {
|
|
audiobook: {
|
|
type: Object,
|
|
default: () => {}
|
|
}
|
|
},
|
|
data() {
|
|
return {
|
|
isHovering: false
|
|
}
|
|
},
|
|
computed: {
|
|
placeholderUrl() {
|
|
return '/book_placeholder.jpg'
|
|
},
|
|
fullCoverUrl() {
|
|
return this.$store.getters['audiobooks/getLibraryItemCoverSrc'](this.audiobook, this.placeholderUrl)
|
|
},
|
|
hasCover() {
|
|
return !!this.audiobook.book.cover
|
|
}
|
|
},
|
|
methods: {
|
|
mouseover() {
|
|
this.isHovering = true
|
|
},
|
|
mouseleave() {
|
|
this.isHovering = false
|
|
}
|
|
},
|
|
mounted() {}
|
|
}
|
|
</script> |