update vue to 3.3.

This commit is contained in:
2023-05-16 19:14:43 +08:00
parent 271d662554
commit c27f5c43c7
7 changed files with 169 additions and 256 deletions

View File

@@ -3,6 +3,7 @@ import { getProfile } from "~/shared/api"
import { Profile } from "~/utils/types"
const route = useRoute()
const router = useRouter()
const profile = ref<Profile | null>(null)
const problems = ref<string[]>([])
const [loading, toggle] = useToggle()
@@ -55,7 +56,7 @@ onMounted(init)
<n-button
v-for="id in problems"
key="id"
@click="$router.push('/problem/' + id)"
@click="router.push('/problem/' + id)"
>
{{ id }}
</n-button>
@@ -64,7 +65,7 @@ onMounted(init)
</n-descriptions>
<n-empty v-if="!loading && !profile" description="该用户不存在">
<template #extra>
<n-button @click="$router.push('/')">返回主页</n-button>
<n-button @click="router.push('/')">返回主页</n-button>
</template>
</n-empty>
</template>