mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
update
This commit is contained in:
@@ -1,13 +1,33 @@
|
||||
<template>
|
||||
<div style="display: flex;justify-content: center;">
|
||||
<div style="display: flex; justify-content: center">
|
||||
<div>
|
||||
<NText strong tag="h1">
|
||||
vtsuru
|
||||
</NText>
|
||||
<NText strong tag="h1"> vtsuru </NText>
|
||||
<component :is="indexType" :user-info="userInfo"/>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { useAccount } from '@/api/account'
|
||||
import { useUser } from '@/api/user'
|
||||
import { IndexTypes } from '@/api/api-models'
|
||||
import { NButton, NText } from 'naive-ui'
|
||||
import DefaultIndexTemplate from '@/views/view/indexTemplate/DefaultIndexTemplate.vue'
|
||||
import { computed } from 'vue'
|
||||
|
||||
const indexType = computed(() => {
|
||||
if (userInfo) {
|
||||
switch (userInfo.indexType) {
|
||||
case IndexTypes.Default:
|
||||
return DefaultIndexTemplate
|
||||
|
||||
default:
|
||||
return DefaultIndexTemplate
|
||||
}
|
||||
} else {
|
||||
return DefaultIndexTemplate
|
||||
}
|
||||
})
|
||||
const accountInfo = useAccount()
|
||||
const userInfo = await useUser()
|
||||
</script>
|
||||
|
||||
11
src/views/view/indexTemplate/DefaultIndexTemplate.vue
Normal file
11
src/views/view/indexTemplate/DefaultIndexTemplate.vue
Normal file
@@ -0,0 +1,11 @@
|
||||
<script lang="ts" setup>
|
||||
import { UserInfo } from '@/api/api-models';
|
||||
|
||||
const props = defineProps<{
|
||||
userInfo: UserInfo
|
||||
}>()
|
||||
</script>
|
||||
|
||||
<template>
|
||||
1
|
||||
</template>
|
||||
Reference in New Issue
Block a user