Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
mlaj
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
hookehuyr
2025-05-08 14:26:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d8cd1a6cb015f778bb235dd87f614855b2dff84f
d8cd1a6c
1 parent
c3623e7f
fix(StudyDetailPage): 根据文件类型调整查看文件链接行为
当文件为PDF时,保持原有点击事件;其他文件类型则直接在新标签页打开链接,以提升用户体验
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
src/views/study/StudyDetailPage.vue
src/views/study/StudyDetailPage.vue
View file @
d8cd1a6
...
...
@@ -54,7 +54,8 @@
<font-awesome-icon icon="file-alt" class="text-gray-400 text-lg flex-shrink-0" />
<h3 class="text-x font-medium text-gray-900 truncate">{{ item.title }}</h3>
</div>
<div class="text-x text-blue-600 hover:text-blue-800 hover:underline whitespace-nowrap" @click="showPdf(item)">查看文件</div>
<div v-if="item.url.toLowerCase().endsWith('.pdf')" class="text-x text-blue-600 hover:text-blue-800 hover:underline whitespace-nowrap" @click="showPdf(item)">查看文件</div>
<a v-else :href="item.url" target="_blank" class="text-x text-blue-600 hover:text-blue-800 hover:underline whitespace-nowrap">查看文件</a>
</div>
</div>
</div>
...
...
Please
register
or
login
to post a comment