From ebf9b2b15fe45e36f0721114ebb9a5e9aff6ceca Mon Sep 17 00:00:00 2001 From: zxc <1171051090@qq.com> Date: Sun, 16 Mar 2025 10:57:26 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=94=BE=E6=98=A0=E6=A8=A1=E5=BC=8F?= =?UTF-8?q?=E9=BC=A0=E6=A0=87=E8=A7=A6=E5=BA=95=E5=B1=95=E5=BC=80=E7=BC=A9?= =?UTF-8?q?=E7=95=A5=E5=9B=BE=E5=AF=BC=E8=88=AA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 3 +- README_zh.md | 3 +- src/views/Screen/BaseView.vue | 9 +++ src/views/Screen/BottomThumbnails.vue | 109 ++++++++++++++++++++++++++ src/views/Screen/PresenterView.vue | 3 +- 5 files changed, 124 insertions(+), 3 deletions(-) create mode 100644 src/views/Screen/BottomThumbnails.vue diff --git a/README.md b/README.md index d32d6092..df4666a3 100644 --- a/README.md +++ b/README.md @@ -146,8 +146,9 @@ Browser access: http://127.0.0.1:5173/ - Color settings - Formula line thickness settings ### Slide Show -- Preview all slides - Brush tools (pen/shape/arrow/highlighter annotation, eraser, blackboard mode) +- Preview all slides +- Bottom thumbnails navigation - Timer tool - Laser pointer - Auto play diff --git a/README_zh.md b/README_zh.md index 6a8ea832..5558f094 100644 --- a/README_zh.md +++ b/README_zh.md @@ -140,8 +140,9 @@ npm run dev - 颜色设置 - 公式线条粗细设置 ### 幻灯片放映 -- 全部幻灯片预览 - 画笔工具(画笔/形状/箭头/荧光笔标注、橡皮擦除、黑板模式) +- 全部幻灯片预览 +- 触底显示缩略图导航 - 计时器工具 - 激光笔 - 自动放映 diff --git a/src/views/Screen/BaseView.vue b/src/views/Screen/BaseView.vue index 7a9d0845..358bca44 100644 --- a/src/views/Screen/BaseView.vue +++ b/src/views/Screen/BaseView.vue @@ -51,6 +51,8 @@ + + @@ -69,6 +71,7 @@ import ScreenSlideList from './ScreenSlideList.vue' import SlideThumbnails from './SlideThumbnails.vue' import WritingBoardTool from './WritingBoardTool.vue' import CountdownTimer from './CountdownTimer.vue' +import BottomThumbnails from './BottomThumbnails.vue' const props = defineProps<{ changeViewMode: (mode: 'base' | 'presenter') => void @@ -104,6 +107,7 @@ const rightToolsVisible = ref(false) const writingBoardToolVisible = ref(false) const timerlVisible = ref(false) const slideThumbnailModelVisible = ref(false) +const bottomThumbnailsVisible = ref(false) const laserPen = ref(false) const contextmenus = (): ContextmenuItem[] => { @@ -171,6 +175,11 @@ const contextmenus = (): ContextmenuItem[] => { text: '查看所有幻灯片', handler: () => slideThumbnailModelVisible.value = true, }, + { + text: '触底显示缩略图', + subText: bottomThumbnailsVisible.value ? '√' : '', + handler: () => bottomThumbnailsVisible.value = !bottomThumbnailsVisible.value, + }, { text: '画笔工具', handler: () => writingBoardToolVisible.value = true, diff --git a/src/views/Screen/BottomThumbnails.vue b/src/views/Screen/BottomThumbnails.vue new file mode 100644 index 00000000..8b0f7863 --- /dev/null +++ b/src/views/Screen/BottomThumbnails.vue @@ -0,0 +1,109 @@ + + + handleMousewheelThumbnails($event)" + > + + + + + + + + + + \ No newline at end of file diff --git a/src/views/Screen/PresenterView.vue b/src/views/Screen/PresenterView.vue index 5ca00b2d..7c41c39e 100644 --- a/src/views/Screen/PresenterView.vue +++ b/src/views/Screen/PresenterView.vue @@ -147,7 +147,7 @@ watch(slideIndex, () => { if (!activeThumbnailRef) return const width = thumbnailsRef.value.offsetWidth - const offsetLeft = activeThumbnailRef.offsetLeft + const offsetLeft = activeThumbnailRef.offsetLeft + activeThumbnailRef.clientWidth / 2 thumbnailsRef.value.scrollTo({ left: offsetLeft - width / 2, behavior: 'smooth' }) }) }) @@ -257,6 +257,7 @@ const contextmenus = (): ContextmenuItem[] => { overflow-x: auto; overflow-y: hidden; border-top: solid 1px #3a3a3a; + position: relative; } .thumbnail { display: inline-block;