mirror of
https://github.com/algerkong/AlgerMusicPlayer.git
synced 2026-05-17 18:47:29 +08:00
✨ feat: 修复无法播放的问题
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container" :class="{ mobile: isMobile }">
|
<div class="app-container" :class="{ mobile: isMobile }">
|
||||||
|
<audio id="MusicAudio" ref="audioRef" :src="playMusicUrl" :autoplay="play"></audio>
|
||||||
<n-config-provider :theme="darkTheme">
|
<n-config-provider :theme="darkTheme">
|
||||||
<n-dialog-provider>
|
<n-dialog-provider>
|
||||||
<router-view></router-view>
|
<router-view></router-view>
|
||||||
@@ -17,6 +18,9 @@ import store from '@/store';
|
|||||||
|
|
||||||
import { isMobile } from './utils';
|
import { isMobile } from './utils';
|
||||||
|
|
||||||
|
const playMusicUrl = computed(() => store.state.playMusicUrl as string);
|
||||||
|
// 是否播放
|
||||||
|
const play = computed(() => store.state.play as boolean);
|
||||||
const windowData = window as any;
|
const windowData = window as any;
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
if (windowData.electron) {
|
if (windowData.electron) {
|
||||||
|
|||||||
Reference in New Issue
Block a user