-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Germey
committed
Jul 23, 2024
1 parent
961fbea
commit a74073f
Showing
18 changed files
with
534 additions
and
504 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<template> | ||
<div class="flex justify-end items-center gap-x-2.5"> | ||
<span class="text-xs"> {{ useFormatDuring(currentTime) }} / {{ useFormatDuring(duration) }} </span> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { useFormatDuring } from '@/utils/number'; | ||
import { computed } from 'vue'; | ||
import { useStore } from 'vuex'; | ||
const store = useStore(); | ||
const currentTime = computed({ | ||
get: () => store.state.suno?.audio?.currentTime, | ||
set: (value) => | ||
store.commit('suno/setAudio', { | ||
...store.state.suno.audio, | ||
currentTime: value | ||
}) | ||
}); | ||
const duration = computed({ | ||
get: () => store.state.suno?.audio?.duration, | ||
set: (value) => | ||
store.commit('suno/setAudio', { | ||
...store.state.suno.audio, | ||
duration: value | ||
}) | ||
}); | ||
</script> | ||
|
||
<style lang="scss"></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
<template> | ||
<div class="flex player-song"> | ||
<img alt="" class="w-11 h-11 rounded" :src="audio?.image_url || OpticalDisk" /> | ||
<div class="ml-2 text-xs flex flex-col justify-between"> | ||
<div class="w-52 2xl:w-96 cursor-pointer truncate"> | ||
<div class="flex"> | ||
<span>{{ audio?.title || 'Music' }}</span> | ||
<span class="ml-2 text-dc">- {{ audio?.style || `SmallRuralDog` }}</span> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { Like, DownTwo, MoreTwo, Comment, ThumbsUp, ThumbsDown, Share, MoreFour, MoreThree } from '@icon-park/vue-next'; | ||
// import { usePlayerStore } from '@/stores/player'; | ||
import { OpticalDisk } from '@/assets/img'; | ||
import IconPark from '@/components/common/IconPark.vue'; | ||
import { ElBadge } from 'element-plus'; | ||
import { computed } from 'vue'; | ||
import { useStore } from 'vuex'; | ||
const store = useStore(); | ||
const audio = computed({ | ||
get: () => store.state.suno.audio, | ||
set: (value) => store.commit('suno/setAudio', value) | ||
}); | ||
// const duration = computed({ | ||
// get: () => store.state.suno.player.duration, | ||
// set: (value) => store.commit('suno/setDuration', value) | ||
// }); | ||
// // 方法 | ||
// const onSliderInput = () => store.dispatch('suno/onSliderInput'); | ||
// const onSliderChange = () => store.dispatch('suno/onSliderChange'); | ||
// const { song, songUrl } = toRefs(usePlayerStore()); | ||
</script> | ||
|
||
<style lang="scss"> | ||
.player-song { | ||
.badge { | ||
.el-badge__content { | ||
@apply scale-75 left-1 bg-stone-100 text-slate-500 bg-opacity-80 right-auto; | ||
@apply dark:bg-stone-900; | ||
} | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.