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-10-21 10:39:29 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
6bb8ba5ec42806872f512da181b6426c71dfd6aa
6bb8ba5e
1 parent
3d7477e3
refactor(StudyDetailPage): 统一移动端和桌面端的文件操作按钮逻辑
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
9 deletions
src/views/study/StudyDetailPage.vue
src/views/study/StudyDetailPage.vue
View file @
6bb8ba5
...
...
@@ -553,8 +553,7 @@
<!-- 操作按钮 -->
<div class="flex gap-2" style="margin: 1rem;">
<!-- 桌面端:显示在线查看、新窗口打开和下载文件按钮 -->
<template v-if="isDesktop">
<!-- 新窗口打开按钮 - 只对图片、音频、视频和PDF文件显示 -->
<!-- <template v-if="isDesktop">
<button
v-if="canOpenInNewWindow(file.title)"
@click="openFileInNewWindow(file)"
...
...
@@ -563,18 +562,16 @@
<van-icon name="eye-o" size="16" />
在线查看
</button>
<!-- 所有文件都显示下载按钮 -->
<!-- <button
<button
@click="downloadFile(file)"
class="btn-secondary flex-1 py-2.5 text-sm font-medium flex items-center justify-center gap-2"
>
<van-icon name="down" size="16" />
下载文件
</button>
-->
</template>
</button>
</template>
-->
<!-- 移动端:根据文件类型显示不同的预览按钮 -->
<template v-else>
<!-- 统一使用移动端操作逻辑:根据文件类型显示不同的预览按钮 -->
<!-- Office 文档显示预览按钮 -->
<button
v-if="isOfficeFile(file.url)"
...
...
@@ -628,7 +625,6 @@
<van-icon name="down" size="16" />
下载文件
</button> -->
</template>
</div>
</FrostedGlass>
</div>
...
...
Please
register
or
login
to post a comment