hookehuyr

refactor(StudyDetailPage): 统一移动端和桌面端的文件操作按钮逻辑

......@@ -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>
......