@@ -10,6 +10,7 @@
|
||||
:current-time="currentTime"
|
||||
:duration-value="duration"
|
||||
:closable="closable"
|
||||
:expandable="expandable"
|
||||
:avoid-bottom-nav="avoidBottomNav"
|
||||
:mode="currentDisplayMode"
|
||||
@toggle="handleToggle"
|
||||
@@ -34,10 +35,12 @@ const props = withDefaults(defineProps<{
|
||||
avoidBottomNav?: boolean
|
||||
displayMode?: AudioDisplayMode
|
||||
closable?: boolean
|
||||
expandable?: boolean
|
||||
}>(), {
|
||||
avoidBottomNav: true,
|
||||
displayMode: 'mini',
|
||||
closable: true
|
||||
closable: true,
|
||||
expandable: true
|
||||
})
|
||||
|
||||
const player = useGlobalAudioPlayer()
|
||||
@@ -99,6 +102,8 @@ const handleVisibleChange = (visible: boolean) => {
|
||||
}
|
||||
|
||||
const handleExpand = () => {
|
||||
if (!props.expandable) return
|
||||
|
||||
if (currentDisplayMode.value === 'floating') {
|
||||
player.setDisplayMode('mini')
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user