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,
|
SelectOption,
|
||||||
useMessage,
|
useMessage,
|
||||||
} from 'naive-ui'
|
} 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 APlayer from 'vue3-aplayer'
|
||||||
import { clearInterval, setInterval } from 'worker-timers'
|
import { clearInterval, setInterval } from 'worker-timers'
|
||||||
import MusicRequestOBS from '../obs/MusicRequestOBS.vue'
|
import MusicRequestOBS from '../obs/MusicRequestOBS.vue'
|
||||||
@@ -357,7 +357,8 @@ function onMusicEnd() {
|
|||||||
currentOriginMusic.value = undefined
|
currentOriginMusic.value = undefined
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
if (!settings.value.playMusicWhenFree) {
|
if (!settings.value.playMusicWhenFree) {
|
||||||
aplayer.value?.pause()
|
message.info('根据配置,已暂停播放音乐')
|
||||||
|
pauseMusic()
|
||||||
}
|
}
|
||||||
}, 10)
|
}, 10)
|
||||||
}
|
}
|
||||||
@@ -368,15 +369,16 @@ function playWaitingMusic(music: WaitMusicInfo) {
|
|||||||
if (index > -1) {
|
if (index > -1) {
|
||||||
waitingMusics.value.splice(index, 1)
|
waitingMusics.value.splice(index, 1)
|
||||||
}
|
}
|
||||||
aplayer.value?.pause()
|
pauseMusic()
|
||||||
currentOriginMusic.value = music
|
currentOriginMusic.value = music
|
||||||
aplayer.value?.audio.addEventListener(
|
nextTick(() => {
|
||||||
'loadeddata',
|
aplayer.value?.play()
|
||||||
() => {
|
})
|
||||||
aplayer.value?.play()
|
}
|
||||||
},
|
function pauseMusic() {
|
||||||
{ once: true },
|
if (!aplayer.value?.audio.paused) {
|
||||||
)
|
aplayer.value?.pause()
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function setSinkId() {
|
function setSinkId() {
|
||||||
try {
|
try {
|
||||||
|
|||||||
@@ -200,6 +200,9 @@ async function getAll() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
async function add(danmaku: EventModel) {
|
async function add(danmaku: EventModel) {
|
||||||
|
if (!accountInfo.value?.settings.enableFunctions.includes(FunctionTypes.Queue)) {
|
||||||
|
return
|
||||||
|
}
|
||||||
if (!checkMessage(danmaku)) {
|
if (!checkMessage(danmaku)) {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,7 +52,7 @@ onMounted(() => {
|
|||||||
|
|
||||||
<template>
|
<template>
|
||||||
<NSpace>
|
<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}`" />
|
<SaveCompoent :compoent="table" :file-name="`周表_${selectedDate}_${userInfo?.name}`" />
|
||||||
</NSpace>
|
</NSpace>
|
||||||
<NDivider />
|
<NDivider />
|
||||||
|
|||||||
Reference in New Issue
Block a user