style: 教师端页面调整

This commit is contained in:
QDKF 2025-08-25 10:39:24 +08:00
parent 3293384d8e
commit 510b2b1b0c
6 changed files with 578 additions and 486 deletions

View File

@ -9,11 +9,3 @@ a,
transition: 0.4s; transition: 0.4s;
padding: 3px; padding: 3px;
} }
@media (hover: hover) {
a:hover {
background-color: hsla(160, 100%, 37%, 0.2);
}
}
/* 移除冲突的响应式样式 */

View File

@ -120,330 +120,335 @@ const navigateToCreateCourse = () => {
/* 添加相对定位,使分页按钮的绝对定位基于此容器 */ /* 添加相对定位,使分页按钮的绝对定位基于此容器 */
overflow-x: hidden; overflow-x: hidden;
/* 防止水平滚动 */ /* 防止水平滚动 */
}
.top {
padding: 20px;
white-space: nowrap;
/* 进一步减少左右padding */
height: 60px;
display: flex; display: flex;
align-items: center; flex-direction: column;
justify-content: space-between; }
border-bottom: 1px solid #f0f0f0;
width: 100%; .top {
/* 确保宽度充满父容器 */ padding: 20px;
box-sizing: border-box; white-space: nowrap;
} /* 进一步减少左右padding */
height: 60px;
.nav-links { display: flex;
display: flex; align-items: center;
align-items: center; justify-content: space-between;
border-bottom: 1px solid #f0f0f0;
} width: 100%;
/* 确保宽度充满父容器 */
.actions { box-sizing: border-box;
display: flex; }
align-items: center;
flex-shrink: 0; .nav-links {
} display: flex;
align-items: center;
.top a {
margin-right: 74px; }
display: inline-block;
height: 60px; .actions {
line-height: 60px; display: flex;
font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif; align-items: center;
font-size: 16px; flex-shrink: 0;
color: #333333; }
text-decoration: none;
position: relative; .top a {
} margin-right: 74px;
display: inline-block;
.top a.active { height: 60px;
color: #1890ff; line-height: 60px;
} font-family: 'PingFang SC', 'Microsoft YaHei', sans-serif;
font-size: 16px;
.top a.active::after { color: #333333;
content: ''; text-decoration: none;
position: absolute; position: relative;
bottom: 0; }
left: 0;
width: 100%; .top a.active {
height: 3px; color: #1890ff;
background-color: #1890ff; }
}
.top a.active::after {
.create-btn { content: '';
background-color: #0288D1; position: absolute;
color: white; bottom: 0;
border: none; left: 0;
padding: 7px 16px; width: 100%;
border-radius: 2px; height: 3px;
font-size: 14px; background-color: #1890ff;
cursor: pointer; }
margin-right: 24px;
/* 增加按钮与搜索框间距 */ .create-btn {
transition: background-color 0.3s; background-color: #0288D1;
} color: white;
border: none;
.create-btn:hover { padding: 7px 16px;
background-color: #40a9ff; border-radius: 2px;
} font-size: 14px;
cursor: pointer;
.search-container { margin-right: 24px;
display: flex; /* 增加按钮与搜索框间距 */
align-items: center; transition: background-color 0.3s;
border: 1px solid #d9d9d9; }
border-radius: 2px;
overflow: hidden; .create-btn:hover {
} background-color: #40a9ff;
}
.search-container input {
border: none; .search-container {
padding: 7px 12px; display: flex;
outline: none; align-items: center;
font-size: 14px; border: 1px solid #d9d9d9;
width: 240px; border-radius: 2px;
/* 增加搜索框宽度 */ overflow: hidden;
} }
.search-btn { .search-container input {
background-color: #0288D1; border: none;
border: none; padding: 7px 12px;
border-left: 1px solid #d9d9d9; outline: none;
padding: 8px 16px; font-size: 14px;
cursor: pointer; width: 240px;
font-size: 16px; /* 增加搜索框宽度 */
color: #FFFFFF; }
transition: background-color 0.3s;
line-height: 18px; .search-btn {
text-align: left; background-color: #0288D1;
font-style: normal; border: none;
text-transform: none; border-left: 1px solid #d9d9d9;
} padding: 8px 16px;
cursor: pointer;
.search-btn:hover { font-size: 16px;
background-color: #e8e8e8; color: #FFFFFF;
} transition: background-color 0.3s;
line-height: 18px;
.course-container { text-align: left;
width: 100%; font-style: normal;
padding: 20px; text-transform: none;
box-sizing: border-box; }
}
.search-btn:hover {
.course-grid { background-color: #e8e8e8;
display: grid; }
grid-template-columns: repeat(4, 1fr);
/* 默认4列确保100%缩放下不被截断 */ .course-container {
gap: 12px; width: 100%;
/* 进一步减少间距 */ padding: 20px;
margin-bottom: 20px; box-sizing: border-box;
width: 100%; flex: 1;
max-width: 100%; display: flex;
box-sizing: border-box; flex-direction: column;
padding: 0 3px; }
/* 减少内边距 */
} .course-grid {
display: grid;
.course-card { grid-template-columns: repeat(4, 1fr);
width: 100%; /* 默认4列确保100%缩放下不被截断 */
height: auto; gap: 12px;
aspect-ratio: 190 / 201; /* 进一步减少间距 */
background: #FFFFFF; margin-bottom: 20px;
border: 1px solid #D8D8D8; width: 100%;
box-sizing: border-box; max-width: 100%;
transition: all 0.3s ease; box-sizing: border-box;
display: flex; padding: 0 3px;
flex-direction: column; /* 减少内边距 */
} }
.course-card:hover { .course-card {
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1); width: 100%;
transform: translateY(-5px); height: auto;
} aspect-ratio: 190 / 201;
background: #FFFFFF;
.course-image-container { border: 1px solid #D8D8D8;
position: relative; box-sizing: border-box;
padding: 0; transition: all 0.3s ease;
width: 100%; display: flex;
height: 30px; flex-direction: column;
box-sizing: border-box; }
display: flex;
justify-content: space-between; .course-card:hover {
align-items: flex-start; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
} transform: translateY(-5px);
}
.section-title {
width: 50px; .course-image-container {
height: 20px; position: relative;
background: #0288D1; padding: 0;
color: white; width: 100%;
font-size: 12px; height: 30px;
display: flex; box-sizing: border-box;
align-items: center; display: flex;
justify-content: center; justify-content: space-between;
margin: 0; align-items: flex-start;
padding: 0; }
}
.section-title {
.section-title.offline { width: 50px;
background: #FF6C17; height: 20px;
} background: #0288D1;
color: white;
.more-options { font-size: 12px;
cursor: pointer; display: flex;
margin: 0; align-items: center;
padding: 0; justify-content: center;
} margin: 0;
padding: 0;
.more-icon { }
font-size: 18px;
font-weight: bold; .section-title.offline {
color: #333; background: #FF6C17;
display: block; }
padding: 0;
margin: 0; .more-options {
line-height: 1; cursor: pointer;
} margin: 0;
padding: 0;
.course-image-container img { }
width: 13px;
height: 13px; .more-icon {
} font-size: 18px;
font-weight: bold;
/* 添加更多选项按钮样式 */ color: #333;
.more-options { display: block;
position: relative; padding: 0;
cursor: pointer; margin: 0;
} line-height: 1;
}
.more-icon {
font-size: 18px; .course-image-container img {
font-weight: bold; width: 13px;
color: #333; height: 13px;
display: block; }
padding: 5px;
margin: 0; /* 添加更多选项按钮样式 */
line-height: 1; .more-options {
} position: relative;
cursor: pointer;
.options-menu { }
position: absolute;
top: 100%; .more-icon {
right: 0; font-size: 18px;
background: white; font-weight: bold;
border: 1px solid #eee; color: #333;
border-radius: 4px; display: block;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); padding: 5px;
display: none; margin: 0;
z-index: 10; line-height: 1;
width: auto; }
min-width: 59px;
height: auto; .options-menu {
} position: absolute;
top: 100%;
.more-options:hover .options-menu { right: 0;
display: block; background: white;
} border: 1px solid #eee;
border-radius: 4px;
.option-item { box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
display: flex; display: none;
align-items: center; z-index: 10;
padding: 5px 8px; width: auto;
color: #333; min-width: 59px;
text-decoration: none; height: auto;
font-size: 12px; }
text-align: center;
height: 24px; .more-options:hover .options-menu {
line-height: 14px; display: block;
box-sizing: border-box; }
border-bottom: 1px solid #f0f0f0;
} .option-item {
display: flex;
.icon-edit, align-items: center;
.icon-view, padding: 5px 8px;
.icon-delete, color: #333;
.icon-more { text-decoration: none;
margin-right: 4px; font-size: 12px;
color: #1890ff; text-align: center;
} height: 24px;
line-height: 14px;
.icon-view { box-sizing: border-box;
color: #52c41a; border-bottom: 1px solid #f0f0f0;
} }
.icon-delete { .icon-edit,
color: #f5222d; .icon-view,
} .icon-delete,
.icon-more {
.icon-more { margin-right: 4px;
color: #faad14; color: #1890ff;
} }
.option-item:last-child { .icon-view {
border-bottom: none; color: #52c41a;
} }
.option-item:hover { .icon-delete {
background-color: #f5f5f5; color: #f5222d;
} }
.course-info { .icon-more {
display: flex; color: #faad14;
flex-direction: column; }
align-items: center;
justify-content: flex-start; .option-item:last-child {
flex: 1; border-bottom: none;
box-sizing: border-box; }
padding: 0;
} .option-item:hover {
background-color: #f5f5f5;
.course-info img { }
width: 80%;
height: auto; .course-info {
aspect-ratio: 150 / 105; display: flex;
/* 居中 */ flex-direction: column;
display: block; align-items: center;
margin: 8px auto 10px; justify-content: flex-start;
position: relative; flex: 1;
top: -5px; box-sizing: border-box;
object-fit: cover; padding: 0;
object-position: center; }
}
.course-info img {
.course-name { width: 80%;
width: 80%; height: auto;
height: 20px; aspect-ratio: 150 / 105;
font-family: AppleSystemUIFont; /* 居中 */
font-size: 14px; display: block;
color: #333333; margin: 8px auto 10px;
line-height: 20px; position: relative;
text-align: center; top: -5px;
font-style: normal; object-fit: cover;
text-transform: none; object-position: center;
white-space: nowrap; }
/* 强制文本在一行显示 */
overflow: hidden; .course-name {
/* 隐藏超出容器的文本 */ width: 80%;
text-overflow: ellipsis; height: 20px;
/* 溢出部分用省略号表示 */ font-family: AppleSystemUIFont;
margin-top: 0px; font-size: 14px;
/* 文字往上移动:添加负上边距 */ color: #333333;
margin-bottom: 10px; line-height: 20px;
/* 减小底部边距从15px到10px */ text-align: center;
} font-style: normal;
text-transform: none;
/* 分页样式 */ white-space: nowrap;
.pagination { /* 强制文本在一行显示 */
display: flex; overflow: hidden;
justify-content: center; /* 隐藏超出容器的文本 */
position: relative; text-overflow: ellipsis;
margin-top: 40px; /* 溢出部分用省略号表示 */
margin-bottom: 40px; margin-top: 0px;
left: 0; /* 文字往上移动:添加负上边距 */
right: 0; margin-bottom: 10px;
/* 减小底部边距从15px到10px */
}
/* 分页样式 */
.pagination {
display: flex;
justify-content: center;
position: relative;
z-index: 100;
margin: 0;
margin-top: auto;
flex-shrink: 0;
} }
.pagination-content { .pagination-content {
@ -466,6 +471,7 @@ const navigateToCreateCourse = () => {
gap: 0; gap: 0;
width: 100%; width: 100%;
white-space: nowrap; white-space: nowrap;
margin-bottom: 80px;
/* 确保所有页码在一行显示 */ /* 确保所有页码在一行显示 */
} }

View File

@ -1,8 +1,7 @@
<template> <template>
<div class="course-management-container"> <div class="course-management-container">
<!-- 左侧导航栏 --> <!-- 左侧导航栏 -->
<div class="nav-container"> <!-- <div class="nav-container">
<!-- 全部课程可折叠项 -->
<div class="nav-group"> <div class="nav-group">
<router-link to="/teacher/course-management" class="nav-item nav-header" <router-link to="/teacher/course-management" class="nav-item nav-header"
:class="{ active: $route.path === '/teacher/course-management' }"> :class="{ active: $route.path === '/teacher/course-management' }">
@ -51,7 +50,7 @@
</router-link> </router-link>
</div> </div>
</div> </div>
</div> </div> -->
<!-- 右侧内容区域 --> <!-- 右侧内容区域 -->
<div class="content-container"> <div class="content-container">
@ -66,16 +65,16 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' // import { ref } from 'vue'
import CourseCategory from './CourseComponents/CourseCategory.vue' import CourseCategory from './CourseComponents/CourseCategory.vue'
// //
const isMainNavExpanded = ref(true) // const isMainNavExpanded = ref(true)
// //
const toggleMainNav = () => { // const toggleMainNav = () => {
isMainNavExpanded.value = !isMainNavExpanded.value // isMainNavExpanded.value = !isMainNavExpanded.value
} // }
</script> </script>
@ -254,7 +253,7 @@ const toggleMainNav = () => {
.content-container { .content-container {
flex: 1; flex: 1;
padding: 8px 8px 8px 5px; /* 进一步减少padding */ padding-top: 5px; /* 进一步减少padding */
min-height: 100vh; min-height: 100vh;
box-sizing: border-box; box-sizing: border-box;
max-width: calc(100vw - 274px - 21px); /* 更精确的宽度计算 */ max-width: calc(100vw - 274px - 21px); /* 更精确的宽度计算 */

View File

@ -8,7 +8,7 @@
<div class="main-content"> <div class="main-content">
<!-- 侧边栏 --> <!-- 侧边栏 -->
<div class="sidebar-container"> <div class="sidebar-container" v-if="!hideSidebar">
<!-- 头像 --> <!-- 头像 -->
<div class="avatar-container"> <div class="avatar-container">
<img src="https://picsum.photos/200/200" alt="头像" class="avatar"> <img src="https://picsum.photos/200/200" alt="头像" class="avatar">
@ -45,12 +45,13 @@
</div> </div>
<!-- 右侧路由视图 --> <!-- 右侧路由视图 -->
<div class="router-view-container"> <div class="router-view-container" :class="{ 'full-width': hideSidebar }">
<!-- 面包屑 --> <!-- 面包屑 -->
<div class="breadcrumb"> <div class="breadcrumb">
<span class="breadcrumb-separator"></span> <span class="breadcrumb-separator"></span>
<n-breadcrumb> <n-breadcrumb>
<n-breadcrumb-item v-for="(item, index) in breadcrumbItems" :key="index" :to="item.path"> <n-breadcrumb-item v-for="(item, index) in breadcrumbItems" :key="index"
@click="handleBreadcrumbClick(item.path)" :class="{ 'clickable': index < breadcrumbItems.length - 1 }">
{{ item.title }} {{ item.title }}
</n-breadcrumb-item> </n-breadcrumb-item>
</n-breadcrumb> </n-breadcrumb>
@ -64,7 +65,7 @@
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted, computed, watch } from 'vue' import { ref, onMounted, computed, watch } from 'vue'
import { useRoute } from 'vue-router' import { useRoute, useRouter } from 'vue-router'
const width = window.innerWidth; const width = window.innerWidth;
const height = window.innerHeight; const height = window.innerHeight;
@ -73,39 +74,116 @@ console.log(`当前屏幕宽度: ${width}px, 高度: ${height}px`);
// //
const activeNavItem = ref(0); // 0: , 1: , 2: , 3: const activeNavItem = ref(0); // 0: , 1: , 2: , 3:
const route = useRoute(); const route = useRoute();
const router = useRouter();
const setActiveNavItem = (index: number) => { const setActiveNavItem = (index: number) => {
activeNavItem.value = index; activeNavItem.value = index;
} }
//
const handleBreadcrumbClick = (path: string) => {
console.log('面包屑点击,跳转到:', path);
router.push(path);
}
//
const hideSidebar = computed(() => {
const currentPath = route.path
//
return currentPath.includes('course-editor')
})
// //
const breadcrumbItems = computed(() => { const breadcrumbItems = computed(() => {
// matched const currentPath = route.path;
const matchedRoutes = route.matched;
// //
if (currentPath.includes('course-editor')) {
let breadcrumbs = [
{
title: '课程管理',
path: '/teacher/course-management'
}
];
//
if (currentPath.includes('courseware')) {
breadcrumbs.push({
title: '课件管理',
path: currentPath
});
} else if (currentPath.includes('question-bank')) {
breadcrumbs.push({
title: '题库管理',
path: currentPath
});
} else if (currentPath.includes('add-question')) {
breadcrumbs.push(
{
title: '题库管理',
path: currentPath.replace('/add-question', '/question-bank')
},
{
title: '新增试题',
path: currentPath
}
);
} else if (currentPath.includes('chapters')) {
breadcrumbs.push({
title: '章节管理',
path: currentPath
});
} else if (currentPath.includes('homework')) {
breadcrumbs.push({
title: '作业管理',
path: currentPath
});
} else if (currentPath.includes('practice')) {
breadcrumbs.push({
title: '练考通',
path: currentPath
});
} else if (currentPath.includes('certificate')) {
breadcrumbs.push({
title: '证书管理',
path: currentPath
});
} else if (currentPath.includes('discussion')) {
breadcrumbs.push({
title: '讨论管理',
path: currentPath
});
} else if (currentPath.includes('statistics')) {
breadcrumbs.push({
title: '统计管理',
path: currentPath
});
} else if (currentPath.includes('notification')) {
breadcrumbs.push({
title: '通知管理',
path: currentPath
});
} else if (currentPath.includes('management')) {
breadcrumbs.push({
title: '综合管理',
path: currentPath
});
}
console.log('课程编辑器页面面包屑:', breadcrumbs);
return breadcrumbs;
}
//
const matchedRoutes = route.matched;
let breadcrumbs = matchedRoutes let breadcrumbs = matchedRoutes
.filter(item => item.meta.title !== '管理后台') .filter((item: any) => item.meta.title !== '管理后台')
.map(item => ({ .map((item: any) => ({
title: item.meta.title || '未知页面', title: item.meta.title || '未知页面',
path: item.path path: item.path
})); }));
// "" console.log('其他页面面包屑:', breadcrumbs);
const currentPath = route.path;
if (currentPath.includes('/add-question')) {
//
const courseIndex = breadcrumbs.findIndex(item => item.title === '课程管理');
if (courseIndex !== -1) {
//
const courseId = route.params.id;
breadcrumbs.splice(courseIndex + 1, 0, {
title: '题库',
path: `/teacher/course-editor/${courseId}/question-bank`
});
}
}
return breadcrumbs; return breadcrumbs;
}); });
@ -138,9 +216,9 @@ const updateActiveNavItem = () => {
<style scoped> <style scoped>
.admin-dashboard { .admin-dashboard {
padding-top: 64px;
min-height: 100vh; min-height: 100vh;
} }
.top-image-container { .top-image-container {
position: relative; position: relative;
width: 100%; width: 100%;
@ -179,13 +257,13 @@ const updateActiveNavItem = () => {
.main-content { .main-content {
flex-direction: column; flex-direction: column;
} }
.sidebar-container { .sidebar-container {
width: 100%; width: 100%;
height: auto; height: auto;
min-height: 300px; min-height: 300px;
} }
.router-view-container { .router-view-container {
height: auto; height: auto;
min-height: calc(100vh - var(--top-height, 100px) - 300px); min-height: calc(100vh - var(--top-height, 100px) - 300px);
@ -224,135 +302,135 @@ const updateActiveNavItem = () => {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
left: 15px; left: 15px;
right: 15px; right: 15px;
height: 1px; height: 1px;
background-color: #E6E6E6; background-color: #E6E6E6;
}
.avatar-container img {
width: 80px;
height: 80px;
/* 圆角 */
border-radius: 50%;
margin-top: 55px;
margin-left: 80px;
margin-right: 80px;
}
.avatar-text {
margin-left: 80px;
height: 31px;
font-family: AppleSystemUIFont;
font-size: 20px;
color: #000000;
line-height: 26px;
text-align: left;
font-style: normal;
text-transform: none;
}
@media screen and (max-width: 768px) {
.avatar-container {
height: 180px;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
} }
.avatar-container img {
margin: 0 0 15px 0;
}
.avatar-text {
margin: 0;
text-align: center;
}
}
@media screen and (max-width: 480px) {
.avatar-container {
height: 150px;
}
.avatar-container img { .avatar-container img {
width: 80px; width: 80px;
height: 80px; height: 80px;
/* 圆角 */
border-radius: 50%;
margin-top: 55px;
margin-left: 80px;
margin-right: 80px;
} }
.avatar-text { .avatar-text {
margin-left: 80px; font-size: 18px;
height: 31px;
font-family: AppleSystemUIFont;
font-size: 20px;
color: #000000;
line-height: 26px;
text-align: left;
font-style: normal;
text-transform: none;
} }
}
@media screen and (max-width: 768px) {
.avatar-container { .nav-container {
height: 180px; margin-top: 30px;
display: flex; /* 鼠标变小手 */
flex-direction: column; cursor: pointer;
align-items: center;
justify-content: center; }
}
.nav-container .nav-item {
.avatar-container img { margin-left: 15px;
margin: 0 0 15px 0; width: 210px;
} height: 50px;
margin-bottom: 15px;
.avatar-text { /* 圆角 */
margin: 0; border-radius: 10px;
text-align: center; display: flex;
} align-items: center;
} transition: all 0.3s ease;
gap: 8px;
@media screen and (max-width: 480px) { }
.avatar-container {
height: 150px; @media screen and (max-width: 768px) {
}
.avatar-container img {
width: 80px;
height: 80px;
}
.avatar-text {
font-size: 18px;
}
}
.nav-container { .nav-container {
margin-top: 30px;
/* 鼠标变小手 */
cursor: pointer;
}
.nav-container .nav-item {
margin-left: 15px;
width: 210px;
height: 50px;
margin-bottom: 15px;
/* 圆角 */
border-radius: 10px;
display: flex; display: flex;
align-items: center; flex-wrap: wrap;
transition: all 0.3s ease; justify-content: center;
gap: 8px; margin-top: 15px;
} }
@media screen and (max-width: 768px) { .nav-container .nav-item {
.nav-container { width: 200px;
display: flex; margin: 0 10px 15px;
flex-wrap: wrap;
justify-content: center;
margin-top: 15px;
}
.nav-container .nav-item {
width: 200px;
margin: 0 10px 15px;
}
} }
}
@media screen and (max-width: 480px) {
.nav-container .nav-item { @media screen and (max-width: 480px) {
width: 150px; .nav-container .nav-item {
height: 45px; width: 150px;
margin: 0 5px 10px; height: 45px;
} margin: 0 5px 10px;
.nav-container .nav-item img {
margin-left: 20px;
}
} }
.nav-container .nav-item:hover {
background: rgba(102, 183, 227, 0.05);
}
/* 添加激活状态样式 */
.nav-container .nav-item.active {
background: rgba(102, 183, 227, 0.1);
}
.nav-container .nav-item.active span {
color: #0C99DA;
}
.nav-container .nav-item img { .nav-container .nav-item img {
height: 18px; margin-left: 20px;
margin-left: 40px;
margin-top: 0;
margin-right: 5px;
} }
}
.nav-container .nav-item span {
height: 26px; .nav-container .nav-item:hover {
background: rgba(102, 183, 227, 0.05);
}
/* 添加激活状态样式 */
.nav-container .nav-item.active {
background: rgba(102, 183, 227, 0.1);
}
.nav-container .nav-item.active span {
color: #0C99DA;
}
.nav-container .nav-item img {
height: 18px;
margin-left: 40px;
margin-top: 0;
margin-right: 5px;
}
.nav-container .nav-item span {
height: 26px;
font-family: AppleSystemUIFont; font-family: AppleSystemUIFont;
font-size: 18px; font-size: 18px;
color: #666666; color: #666666;
@ -370,6 +448,12 @@ const updateActiveNavItem = () => {
overflow-y: auto; overflow-y: auto;
} }
/* 全宽显示(隐藏侧边栏时) */
.router-view-container.full-width {
width: 100%;
margin-left: 0;
}
@media screen and (max-width: 768px) { @media screen and (max-width: 768px) {
.router-view-container { .router-view-container {
--top-height: 100px; --top-height: 100px;
@ -395,4 +479,15 @@ const updateActiveNavItem = () => {
margin-right: 10px; margin-right: 10px;
background-color: #0C99DA; background-color: #0C99DA;
} }
/* 可点击的面包屑项样式 */
.breadcrumb :deep(.n-breadcrumb-item.clickable) {
cursor: pointer;
color: #0C99DA;
}
.breadcrumb :deep(.n-breadcrumb-item.clickable:hover) {
color: #0277BD;
text-decoration: underline;
}
</style> </style>

View File

@ -5,8 +5,8 @@
<router-link :to="`/teacher/course-editor/${courseId}/courseware`" class="menu-item" <router-link :to="`/teacher/course-editor/${courseId}/courseware`" class="menu-item"
:class="{ active: $route.path.includes('courseware') }"> :class="{ active: $route.path.includes('courseware') }">
<img :src="$route.path.includes('courseware') ? '/images/teacher/课件-选中.png' : '/images/teacher/课件.png'" <img :src="$route.path.includes('courseware') ? '/images/teacher/课件-选中.png' : '/images/teacher/课件.png'"
alt="课件" /> alt="资源库" />
<span>课件</span> <span>资源库</span>
</router-link> </router-link>
<router-link :to="`/teacher/course-editor/${courseId}/chapters`" class="menu-item" <router-link :to="`/teacher/course-editor/${courseId}/chapters`" class="menu-item"
:class="{ active: $route.path.includes('chapters') }"> :class="{ active: $route.path.includes('chapters') }">

View File

@ -2,9 +2,9 @@
<div class="courseware-management"> <div class="courseware-management">
<!-- 顶部操作栏 --> <!-- 顶部操作栏 -->
<div class="toolbar"> <div class="toolbar">
<h2>全部课件</h2> <h2>全部资源库</h2>
<div class="toolbar-actions"> <div class="toolbar-actions">
<button class="btn btn-primary" @click="addCourseware">添加课件</button> <button class="btn btn-primary" @click="addCourseware">添加资源</button>
<button class="btn btn-new" @click="createFolder">新建文件夹</button> <button class="btn btn-new" @click="createFolder">新建文件夹</button>
<button class="btn btn-default" @click="moveFiles" :disabled="selectedFiles.length === 0" <button class="btn btn-default" @click="moveFiles" :disabled="selectedFiles.length === 0"
:class="{ 'btn-default--active': selectedFiles.length > 0 }">移动</button> :class="{ 'btn-default--active': selectedFiles.length > 0 }">移动</button>