将 PlayMusic 组件迁移至 layout/RightButton 并重构成通用右下角按钮组件, 提取音乐播放逻辑到独立 hook `usePlayMusic`,优化模态框提示逻辑并统一滚动行为。
24 lines
725 B
Vue
24 lines
725 B
Vue
<script setup lang="ts">
|
|
import { storeToRefs } from 'pinia'
|
|
import { onMounted, provide, ref } from 'vue'
|
|
import { useI18n } from 'vue-i18n'
|
|
import { loadingKey, loadingState } from '@/components/Loading'
|
|
// import PlayMusic from '@/components/PlayMusic/index.vue'
|
|
import useStore from '@/store'
|
|
import { themeChange } from '@/utils'
|
|
|
|
provide(loadingKey, loadingState)
|
|
const { t } = useI18n()
|
|
const globalConfig = useStore().globalConfig
|
|
const prizeConfig = useStore().prizeConfig
|
|
const system = useStore().system
|
|
const { getTheme: localTheme } = storeToRefs(globalConfig)
|
|
const { getPrizeConfig: prizeList } = storeToRefs(prizeConfig)
|
|
</script>
|
|
|
|
<template>
|
|
<router-view />
|
|
</template>
|
|
|
|
<style scoped lang="scss"></style>
|