迁移 Flutter 端与训练脚本,模型/训练产物移出 git(遵循纯代码约定)
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
<script setup>
|
||||
import { useRoute, useRouter } from 'vue-router'
|
||||
import {
|
||||
List as ListIcon,
|
||||
Key as KeyIcon,
|
||||
SwitchButton as SwitchIcon,
|
||||
} from '@element-plus/icons-vue'
|
||||
|
||||
const route = useRoute()
|
||||
const router = useRouter()
|
||||
|
||||
function logout() {
|
||||
localStorage.removeItem('adminToken')
|
||||
router.push('/login')
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<!-- 登录页独立全屏,不套后台布局 -->
|
||||
<router-view v-if="route.path === '/login'" />
|
||||
|
||||
<el-container v-else class="app-layout">
|
||||
<el-aside width="200px" class="app-aside">
|
||||
<div class="app-logo">视野管理端</div>
|
||||
<el-menu :default-active="route.path" router>
|
||||
<el-menu-item index="/orders">
|
||||
<el-icon><ListIcon /></el-icon>
|
||||
<span>订单管理</span>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/licenses">
|
||||
<el-icon><KeyIcon /></el-icon>
|
||||
<span>授权管理</span>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</el-aside>
|
||||
<el-container>
|
||||
<el-header class="app-header">
|
||||
<span class="app-header-title">{{ route.meta.title }}</span>
|
||||
<el-button link :icon="SwitchIcon" class="app-header-logout" @click="logout">退出登录</el-button>
|
||||
</el-header>
|
||||
<el-main class="app-main">
|
||||
<router-view />
|
||||
</el-main>
|
||||
</el-container>
|
||||
</el-container>
|
||||
</template>
|
||||
|
||||
<style scoped>
|
||||
.app-layout {
|
||||
height: 100vh;
|
||||
}
|
||||
.app-aside {
|
||||
background: #001529;
|
||||
}
|
||||
.app-logo {
|
||||
height: 56px;
|
||||
line-height: 56px;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.app-aside :deep(.el-menu) {
|
||||
border-right: none;
|
||||
background: #001529;
|
||||
}
|
||||
.app-aside :deep(.el-menu-item) {
|
||||
color: rgba(255, 255, 255, 0.7);
|
||||
}
|
||||
.app-aside :deep(.el-menu-item.is-active),
|
||||
.app-aside :deep(.el-menu-item:hover) {
|
||||
color: #fff;
|
||||
background: #1890ff;
|
||||
}
|
||||
.app-header {
|
||||
background: #fff;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.app-header-title {
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.app-main {
|
||||
background: #f0f2f5;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user