mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-08 11:26:56 +08:00
重构多个组件以优化代码格式和可读性,删除不必要的文件,更新类型定义,添加数据分析路由
This commit is contained in:
@@ -1,9 +1,21 @@
|
||||
<template>
|
||||
<NSpin v-if="isLoading" show />
|
||||
<component v-else ref="dynamicConfigRef" :config="selectedTemplateConfig?.name ? currentConfig : undefined"
|
||||
:is="SongListTemplateMap[componentType ?? '']?.compoent" :user-info="userInfo" :bili-info="biliInfo"
|
||||
:data="currentData" :live-request-settings="settings" :live-request-active="songsActive" @request-song="requestSong"
|
||||
v-bind="$attrs" />
|
||||
<NSpin
|
||||
v-if="isLoading"
|
||||
show
|
||||
/>
|
||||
<component
|
||||
:is="SongListTemplateMap[componentType ?? '']?.compoent"
|
||||
v-else
|
||||
ref="dynamicConfigRef"
|
||||
:config="selectedTemplateConfig?.name ? currentConfig : undefined"
|
||||
:user-info="userInfo"
|
||||
:bili-info="biliInfo"
|
||||
:data="currentData"
|
||||
:live-request-settings="settings"
|
||||
:live-request-active="songsActive"
|
||||
v-bind="$attrs"
|
||||
@request-song="requestSong"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
@@ -23,7 +35,6 @@ const nextRequestTime = useStorage('SongList.NextRequestTime', new Date())
|
||||
const minRequestTime = 30
|
||||
|
||||
const props = defineProps<{
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
biliInfo: any | undefined
|
||||
userInfo: UserInfo | undefined
|
||||
template?: string | undefined
|
||||
|
||||
Reference in New Issue
Block a user