From c54ad0041eb12521d2115237381c407d159522d2 Mon Sep 17 00:00:00 2001 From: mayiming <1627832236@qq.com> Date: Fri, 31 Oct 2025 13:23:42 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B5=84=E6=BA=90=E6=A1=88?= =?UTF-8?q?=E4=BE=8Bweb=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/src/views/CaseResources.vue | 162 ++++++++++++++++---------------- 1 file changed, 82 insertions(+), 80 deletions(-) diff --git a/web/src/views/CaseResources.vue b/web/src/views/CaseResources.vue index a1d1c94c..7690be7a 100644 --- a/web/src/views/CaseResources.vue +++ b/web/src/views/CaseResources.vue @@ -22,18 +22,16 @@

线上课程

-
-
-
-
+
@@ -51,14 +49,12 @@
- +

线上课程 Online courses

-
-
-
+

课程介绍

@@ -70,30 +66,30 @@
-
课程内容
-
拓展资源
-
学生活动
-
教学团队 @@ -164,10 +160,10 @@ - @@ -189,10 +185,10 @@
-

{{ caseItem.title }}

@@ -389,24 +385,24 @@ const cases = [ // 筛选后的案例列表 const filteredCases = computed(() => { let result = [...cases]; - + // 搜索过滤 if (searchKeyword.value) { const keyword = searchKeyword.value.toLowerCase(); - result = result.filter(item => - item.title.toLowerCase().includes(keyword) || + result = result.filter(item => + item.title.toLowerCase().includes(keyword) || item.desc.toLowerCase().includes(keyword) || item.tags.some(tag => tag.toLowerCase().includes(keyword)) ); } - + // 排序处理 if (sortType.value === 'views') { result.sort((a, b) => b.views - a.views); } else { result.sort((a, b) => new Date(b.date) - new Date(a.date)); } - + // 数量限制 return result.slice(0, parseInt(showCount.value)); }); @@ -562,32 +558,7 @@ body { transform: scale(1.05); } -.play-button { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - width: 60px; - height: 60px; - background-color: rgba(255, 255, 255, 0.8); - border-radius: 50%; - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - transition: all 0.3s; -} - -.play-button:hover { - background-color: #fff; - transform: translate(-50%, -50%) scale(1.1); -} - -.play-icon { - font-size: 1.5rem; - color: #e74c3c; - margin-left: 5px; -} +/* 已删除:播放按钮相关样式 */ .course-info { display: flex; @@ -907,8 +878,8 @@ body { margin: 0 auto; } -.markdown-content h1, -.markdown-content h2, +.markdown-content h1, +.markdown-content h2, .markdown-content h3 { margin: 30px 0 15px; color: #2c3e50; @@ -932,7 +903,7 @@ body { margin: 0 0 20px; } -.markdown-content ul, +.markdown-content ul, .markdown-content ol { margin: 0 0 20px 20px; padding: 0; @@ -951,6 +922,37 @@ body { box-shadow: 0 2px 10px rgba(0,0,0,0.1); } +/* 视频案例播放按钮样式(保留) */ +.video .play-button, +.course-card:has(.video-case) .play-button { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + width: 60px; + height: 60px; + background-color: rgba(255, 255, 255, 0.8); + border-radius: 50%; + display: flex; + align-items: center; + justify-content: center; + cursor: pointer; + transition: all 0.3s; +} + +.video .play-button:hover, +.course-card:has(.video-case) .play-button:hover { + background-color: #fff; + transform: translate(-50%, -50%) scale(1.1); +} + +.video .play-icon, +.course-card:has(.video-case) .play-icon { + font-size: 1.5rem; + color: #e74c3c; + margin-left: 5px; +} + /* 响应式适配 */ @media (max-width: 992px) { .courses-grid { @@ -962,43 +964,43 @@ body { .banner { height: 180px; } - + .banner h1 { font-size: 2rem; text-align: center; padding: 0 20px; } - + .section-title { font-size: 1.5rem; } - + .course-header { grid-template-columns: 1fr; } - + .search-section { flex-wrap: wrap; } - + .search-select { border-radius: 4px; border-right: 1px solid #ddd; margin-bottom: 10px; } - + .search-input { margin: 0 0 10px; border-radius: 4px; width: 100%; } - + .search-btn, .video-case-btn { border-radius: 4px; flex: 1; margin: 0 5px 10px; } - + .list-header { flex-direction: column; align-items: flex-start; @@ -1010,36 +1012,36 @@ body { .courses-grid { grid-template-columns: 1fr; } - + .tabs-wrapper { flex-wrap: wrap; } - + .tab { margin: 10px 10px 0 0; } - + .banner { height: 150px; } - + .banner h1 { font-size: 1.7rem; } - + .course-tabs { flex-wrap: wrap; } - + .tab-item { flex: 1 1 auto; text-align: center; } - + .case-meta { flex-direction: column; align-items: flex-start; gap: 5px; } } - \ No newline at end of file +