mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
update
This commit is contained in:
@@ -3,20 +3,20 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useUser } from '@/api/user'
|
||||
import { IndexTypes } from '@/api/api-models'
|
||||
import DefaultIndexTemplate from '@/views/view/indexTemplate/DefaultIndexTemplate.vue'
|
||||
import { computed, onMounted, ref } from 'vue'
|
||||
import { UserInfo } from '@/api/api-models'
|
||||
|
||||
defineProps<{
|
||||
const { biliInfo, userInfo } = defineProps<{
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
biliInfo: any | undefined
|
||||
userInfo: UserInfo | undefined
|
||||
}>()
|
||||
|
||||
const indexType = computed(() => {
|
||||
if (userInfo.value) {
|
||||
switch (userInfo.value.indexType) {
|
||||
if (userInfo) {
|
||||
switch (userInfo.indexType) {
|
||||
case IndexTypes.Default:
|
||||
return DefaultIndexTemplate
|
||||
|
||||
@@ -27,9 +27,4 @@ const indexType = computed(() => {
|
||||
return DefaultIndexTemplate
|
||||
}
|
||||
})
|
||||
const userInfo = ref<UserInfo>()
|
||||
|
||||
onMounted(async () => {
|
||||
userInfo.value = await useUser()
|
||||
})
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user