You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
202 lines
3.5 KiB
202 lines
3.5 KiB
<template>
|
|
<!-- 应用根组件容器 -->
|
|
<div id="app">
|
|
<!-- 头部组件 -->
|
|
<Header />
|
|
<!-- 主容器,包含侧边栏和内容区域 -->
|
|
<div class="container">
|
|
<!-- 侧边栏组件 -->
|
|
<Sidebar />
|
|
<!-- 内容区域 -->
|
|
<div class="content">
|
|
<!-- 页面标题 -->
|
|
<div class="title">测评系统后台</div>
|
|
<!-- 标签导航组件 -->
|
|
<TabNavigation />
|
|
|
|
<!-- 路由视图出口,根据路由显示对应组件 -->
|
|
<router-view />
|
|
|
|
<!-- 底部应用按钮 -->
|
|
<div class="footer-btn">
|
|
<button class="btn-red">应用</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
|
|
<script>
|
|
// 导入头部组件
|
|
import Header from './components/Layout/Header.vue'
|
|
// 导入侧边栏组件
|
|
import Sidebar from './components/Layout/Sidebar.vue'
|
|
// 导入标签导航组件
|
|
import TabNavigation from './components/Tabs/TabNavigation.vue'
|
|
|
|
export default {
|
|
// 根组件名称
|
|
name: 'App',
|
|
// 注册子组件
|
|
components: {
|
|
Header,
|
|
Sidebar,
|
|
TabNavigation
|
|
// 移除 QuestionSearch 和 QuestionTable,因为它们现在在路由视图中
|
|
}
|
|
// 移除 activeTab 数据属性
|
|
}
|
|
</script>
|
|
|
|
<style>
|
|
/* 全局样式重置 */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
/* body基础样式 */
|
|
body {
|
|
font-family: 'Arial', sans-serif;
|
|
background-color: #f5f5f5;
|
|
}
|
|
|
|
/* 应用容器样式 */
|
|
#app {
|
|
width: 100%;
|
|
height: 100vh;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* 头部样式 */
|
|
.header {
|
|
height: 60px;
|
|
background-color: white;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: flex-start;
|
|
padding-left: 20px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
/* logo样式 */
|
|
.logo {
|
|
color: #e74c3c;
|
|
font-weight: bold;
|
|
font-size: 18px;
|
|
}
|
|
|
|
/* 主容器样式,使用flex布局 */
|
|
.container {
|
|
display: flex;
|
|
flex: 1;
|
|
overflow: hidden;
|
|
}
|
|
|
|
/* 内容区域样式 */
|
|
.content {
|
|
flex: 1;
|
|
padding: 20px;
|
|
background-color: white;
|
|
overflow-y: auto;
|
|
position: relative;
|
|
}
|
|
|
|
/* 标题样式 */
|
|
.title {
|
|
font-size: 20px;
|
|
margin-bottom: 20px;
|
|
color: #333;
|
|
}
|
|
|
|
/* 标签导航容器样式 */
|
|
.tabs {
|
|
display: flex;
|
|
gap: 10px;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
/* 标签按钮样式 */
|
|
.tab-btn {
|
|
padding: 8px 16px;
|
|
background-color: #e74c3c;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
transition: opacity 0.3s;
|
|
}
|
|
|
|
/* 标签按钮悬停效果 */
|
|
.tab-btn:hover {
|
|
background-color: #c0392b;
|
|
}
|
|
|
|
/* 激活状态的标签按钮样式 */
|
|
.tab-btn.active {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
/* 底部按钮定位样式 */
|
|
.footer-btn {
|
|
position: absolute;
|
|
bottom: 20px;
|
|
right: 20px;
|
|
}
|
|
|
|
/* 搜索区域样式 */
|
|
.search-area {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 20px;
|
|
gap: 20px;
|
|
}
|
|
|
|
/* 搜索项样式 */
|
|
.search-item {
|
|
display: flex;
|
|
flex-direction: column;
|
|
min-width: 160px;
|
|
}
|
|
|
|
/* 搜索项标签样式 */
|
|
.search-item label {
|
|
margin-bottom: 5px;
|
|
font-size: 14px;
|
|
color: #666;
|
|
}
|
|
|
|
/* 搜索项下拉框和输入框样式 */
|
|
.search-item select,
|
|
.search-item input {
|
|
padding: 8px;
|
|
border: 1px solid #ccc;
|
|
border-radius: 4px;
|
|
font-size: 14px;
|
|
}
|
|
|
|
/* 按钮组样式 */
|
|
.btn-group {
|
|
display: flex;
|
|
gap: 10px;
|
|
}
|
|
|
|
/* 红色按钮样式 */
|
|
.btn-red {
|
|
padding: 8px 16px;
|
|
background-color: #e74c3c;
|
|
color: white;
|
|
border: none;
|
|
border-radius: 4px;
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* 小尺寸红色按钮样式 */
|
|
.btn-red.small {
|
|
padding: 4px 10px;
|
|
font-size: 12px;
|
|
}
|
|
</style>
|