精简部分播放器代码

This commit is contained in:
2023-01-28 01:02:19 +08:00
parent 289d7e0b8b
commit 2be35021b4
7 changed files with 26 additions and 54 deletions
@@ -35,8 +35,8 @@ import { getElementViewLeft } from '../utils'
import PlayerIcon from './aplayer-icon.vue'
defineProps<{
loadProgress: number,
playProgress: number,
loadProgress: number
playProgress: number
theme?: string
}>()
@@ -29,8 +29,8 @@ import IconButton from './aplayer-iconbutton.vue'
import {getElementViewTop} from '../utils'
const props = defineProps<{
volume: number,
muted: boolean,
volume: number
muted: boolean
theme: string
}>()
const emit = defineEmits(['setvolume'])
@@ -51,13 +51,13 @@ import Volume from './aplayer-controller-volume.vue'
import { StatType } from '@/model/api/music'
const props = defineProps<{
shuffle: boolean,
repeat: string,
stat: StatType,
shuffle: boolean
repeat: string
stat: StatType
theme: string
volume: number,
muted: boolean,
showList: boolean,
volume: number
muted: boolean
showList: boolean
isMobile: boolean
}>()
const loadProgress = computed(() => {
@@ -28,10 +28,10 @@ import { computed } from 'vue'
import { MusicPlayerItem } from '@/model/api/music'
const props = defineProps<{
show: boolean,
currentMusic: MusicPlayerItem,
musicList: MusicPlayerItem[],
theme?: string,
show: boolean
currentMusic: MusicPlayerItem
musicList: MusicPlayerItem[]
theme?: string
listMaxHeight?: string
}>()
const listHeightStyle = computed(() => {
@@ -21,7 +21,7 @@ import { parseLrc } from '../utils'
import { StatType } from '@/model/api/music'
const props = defineProps<{
lrcSource: string,
lrcSource: string
playStat: StatType
}>()
@@ -18,8 +18,8 @@ import { computed, ref } from 'vue'
import IconButton from './aplayer-iconbutton.vue'
const props = withDefaults(defineProps<{
pic?: string,
theme?: string,
pic?: string
theme?: string
playing: boolean
enableDrag: boolean
}>(), {