fix(PdfViewer): 隐藏返回顶部按钮并调整缩放控件位置
移除返回顶部按钮以简化界面 将缩放控件位置从底部60px调整为20px,避免与其他元素重叠
Showing
1 changed file
with
9 additions
and
9 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-01-21 | 2 | * @Date: 2025-01-21 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-10-22 11:39:56 | 4 | + * @LastEditTime: 2025-10-22 12:17:03 |
| 5 | * @FilePath: /mlaj/src/components/ui/PdfViewer.vue | 5 | * @FilePath: /mlaj/src/components/ui/PdfViewer.vue |
| 6 | * @Description: PDF预览组件 - 使用pdf-vue3库 | 6 | * @Description: PDF预览组件 - 使用pdf-vue3库 |
| 7 | --> | 7 | --> |
| ... | @@ -17,7 +17,7 @@ | ... | @@ -17,7 +17,7 @@ |
| 17 | :showProgress="true" | 17 | :showProgress="true" |
| 18 | :progressColor="'#1989fa'" | 18 | :progressColor="'#1989fa'" |
| 19 | :showPageTooltip="true" | 19 | :showPageTooltip="true" |
| 20 | - :showBackToTopBtn="true" | 20 | + :showBackToTopBtn="false" |
| 21 | :scrollThreshold="300" | 21 | :scrollThreshold="300" |
| 22 | :pdfWidth="`${Math.round(100 * zoomLevel)}%`" | 22 | :pdfWidth="`${Math.round(100 * zoomLevel)}%`" |
| 23 | :rowGap="8" | 23 | :rowGap="8" |
| ... | @@ -58,13 +58,13 @@ | ... | @@ -58,13 +58,13 @@ |
| 58 | <van-button class="zoom-btn zoom-in-btn" type="default" icon="plus" round @click="zoomIn" /> | 58 | <van-button class="zoom-btn zoom-in-btn" type="default" icon="plus" round @click="zoomIn" /> |
| 59 | <div class="page-jump" @click="focusPageInput"> | 59 | <div class="page-jump" @click="focusPageInput"> |
| 60 | <span class="page-display">{{ currentPage }}/{{ totalPages || 0 }}</span> | 60 | <span class="page-display">{{ currentPage }}/{{ totalPages || 0 }}</span> |
| 61 | - <input | 61 | + <input |
| 62 | ref="pageInputRef" | 62 | ref="pageInputRef" |
| 63 | - class="page-input" | 63 | + class="page-input" |
| 64 | - type="number" | 64 | + type="number" |
| 65 | - :min="1" | 65 | + :min="1" |
| 66 | - :max="totalPages || 1" | 66 | + :max="totalPages || 1" |
| 67 | - v-model="pageInput" | 67 | + v-model="pageInput" |
| 68 | @blur="handlePageInputBlur" | 68 | @blur="handlePageInputBlur" |
| 69 | @keyup.enter="handlePageInputBlur" | 69 | @keyup.enter="handlePageInputBlur" |
| 70 | v-show="isEditingPage" | 70 | v-show="isEditingPage" |
| ... | @@ -634,7 +634,7 @@ const addPreventSaveListeners = () => { | ... | @@ -634,7 +634,7 @@ const addPreventSaveListeners = () => { |
| 634 | /* 缩放控制按钮样式 */ | 634 | /* 缩放控制按钮样式 */ |
| 635 | .zoom-controls { | 635 | .zoom-controls { |
| 636 | position: fixed; | 636 | position: fixed; |
| 637 | - bottom: 60px; | 637 | + bottom: 20px; |
| 638 | left: 50%; | 638 | left: 50%; |
| 639 | transform: translateX(-50%); | 639 | transform: translateX(-50%); |
| 640 | z-index: 100; | 640 | z-index: 100; | ... | ... |
-
Please register or login to post a comment