fix routes.

This commit is contained in:
2023-06-13 12:11:16 +08:00
parent 03f24190fc
commit 995dd98ddb
3 changed files with 91 additions and 91 deletions

View File

@@ -8,6 +8,10 @@ const route = useRoute()
const router = useRouter()
const userStore = useUserStore()
const options: MenuOption[] = [
{
label: () => h(RouterLink, { to: "/" }, { default: () => "返回 OJ" }),
key: "return to OJ",
},
{
label: () => h(RouterLink, { to: "/admin" }, { default: () => "首页" }),
key: "admin home",
@@ -101,19 +105,14 @@ onMounted(async () => {
</script>
<template>
<div class="admin">
<n-layout-sider width="160" bordered>
<n-layout has-sider position="absolute">
<n-layout-sider width="160" bordered :native-scrollbar="false">
<n-menu :options="options" :value="active" />
</n-layout-sider>
<n-layout-content content-style="padding: 16px; min-width: 600px">
<router-view></router-view>
</n-layout-content>
</div>
</n-layout>
</template>
<style scoped>
.admin {
margin: -16px;
display: flex;
}
</style>
<style scoped></style>