feat: 优化课程列表显示,双列布局展示更多课程
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
yuliang_guo
2026-01-30 16:34:40 +08:00
parent b2e1ed02d1
commit 14e2e948f5

View File

@@ -1099,18 +1099,25 @@ onMounted(() => {
}
}
.course-library,
.course-library {
flex: 2; // 课程库占更多空间
display: flex;
flex-direction: column;
min-height: 300px;
border-bottom: 1px solid #ebeef5;
}
.selected-courses {
flex: 1;
display: flex;
flex-direction: column;
min-height: 0;
border-bottom: 1px solid #ebeef5;
&:last-child {
min-height: 200px;
border-bottom: none;
}
.course-library,
.selected-courses {
.library-header {
display: flex;
justify-content: space-between;
@@ -1132,7 +1139,17 @@ onMounted(() => {
}
}
.library-content,
.library-content {
flex: 1;
overflow-y: auto;
padding: 8px;
max-height: 450px;
display: grid;
grid-template-columns: repeat(2, 1fr); // 双列布局
gap: 4px;
align-content: start;
}
.selected-content {
flex: 1;
overflow-y: auto;
@@ -1168,17 +1185,16 @@ onMounted(() => {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 12px;
margin-bottom: 8px;
padding: 6px 8px;
background: #f5f7fa;
border-radius: 6px;
border-radius: 4px;
cursor: grab;
transition: all 0.2s;
border: 2px solid transparent;
transition: all 0.15s;
border: 1px solid #e4e7ed;
height: fit-content;
&:hover {
background: #e6e8eb;
transform: translateX(4px);
border-color: #667eea;
}
@@ -1195,6 +1211,7 @@ onMounted(() => {
background: #f0f9eb;
border-color: #67c23a;
cursor: default;
opacity: 0.7;
}
.course-info {
@@ -1203,7 +1220,7 @@ onMounted(() => {
.course-name {
display: block;
font-size: 14px;
font-size: 13px;
color: #333;
font-weight: 500;
white-space: nowrap;