mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
fix schedule select
This commit is contained in:
@@ -37,7 +37,7 @@ import {
|
||||
SelectOption,
|
||||
useMessage,
|
||||
} from 'naive-ui'
|
||||
import { computed, onMounted, onUnmounted, ref, watch } from 'vue'
|
||||
import { computed, nextTick, onMounted, onUnmounted, ref, watch } from 'vue'
|
||||
import APlayer from 'vue3-aplayer'
|
||||
import { clearInterval, setInterval } from 'worker-timers'
|
||||
import MusicRequestOBS from '../obs/MusicRequestOBS.vue'
|
||||
@@ -357,7 +357,8 @@ function onMusicEnd() {
|
||||
currentOriginMusic.value = undefined
|
||||
setTimeout(() => {
|
||||
if (!settings.value.playMusicWhenFree) {
|
||||
aplayer.value?.pause()
|
||||
message.info('根据配置,已暂停播放音乐')
|
||||
pauseMusic()
|
||||
}
|
||||
}, 10)
|
||||
}
|
||||
@@ -368,15 +369,16 @@ function playWaitingMusic(music: WaitMusicInfo) {
|
||||
if (index > -1) {
|
||||
waitingMusics.value.splice(index, 1)
|
||||
}
|
||||
aplayer.value?.pause()
|
||||
pauseMusic()
|
||||
currentOriginMusic.value = music
|
||||
aplayer.value?.audio.addEventListener(
|
||||
'loadeddata',
|
||||
() => {
|
||||
nextTick(() => {
|
||||
aplayer.value?.play()
|
||||
},
|
||||
{ once: true },
|
||||
)
|
||||
})
|
||||
}
|
||||
function pauseMusic() {
|
||||
if (!aplayer.value?.audio.paused) {
|
||||
aplayer.value?.pause()
|
||||
}
|
||||
}
|
||||
function setSinkId() {
|
||||
try {
|
||||
|
||||
@@ -200,6 +200,9 @@ async function getAll() {
|
||||
}
|
||||
}
|
||||
async function add(danmaku: EventModel) {
|
||||
if (!accountInfo.value?.settings.enableFunctions.includes(FunctionTypes.Queue)) {
|
||||
return
|
||||
}
|
||||
if (!checkMessage(danmaku)) {
|
||||
return
|
||||
}
|
||||
|
||||
@@ -52,7 +52,7 @@ onMounted(() => {
|
||||
|
||||
<template>
|
||||
<NSpace>
|
||||
<NSelect :options="options" v-model:value="selectedDate" style="max-width: 200px" placeholder="选择其他周表" />
|
||||
<NSelect :options="options" v-model:value="selectedDate" style="width: 200px" placeholder="选择其他周表" />
|
||||
<SaveCompoent :compoent="table" :file-name="`周表_${selectedDate}_${userInfo?.name}`" />
|
||||
</NSpace>
|
||||
<NDivider />
|
||||
|
||||
Reference in New Issue
Block a user