mirror of
https://github.com/koel/koel
synced 2025-02-17 13:58:28 +00:00
fix props for SongCard
This commit is contained in:
parent
eb66676e74
commit
6f07f6d796
1 changed files with 12 additions and 2 deletions
|
@ -31,14 +31,24 @@
|
|||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, defineAsyncComponent, toRefs } from 'vue'
|
||||
import { computed, defineAsyncComponent, PropType, toRefs } from 'vue'
|
||||
import { eventBus, pluralize, startDragging } from '@/utils'
|
||||
import { queueStore } from '@/stores'
|
||||
import { playback } from '@/services'
|
||||
|
||||
const LikeButton = defineAsyncComponent(() => import('@/components/song/like-button.vue'))
|
||||
|
||||
const props = withDefaults(defineProps<{ song: Song, topPlayCount: number }>(), { topPlayCount: 0 })
|
||||
const props = defineProps({
|
||||
song: {
|
||||
type: Object as PropType<Song>,
|
||||
required: true
|
||||
},
|
||||
topPlayCount: {
|
||||
type: Number,
|
||||
default: 0
|
||||
}
|
||||
})
|
||||
|
||||
const { song, topPlayCount } = toRefs(props)
|
||||
|
||||
const showPlayCount = computed(() => Boolean(topPlayCount && song.value.playCount))
|
||||
|
|
Loading…
Add table
Reference in a new issue