From 6423ec5f31ca9ed9f0a7d0c3938b28b26c756cd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AD=A4=E6=B3=89=E5=86=B7=E6=9C=88?= Date: Sun, 15 Jun 2025 21:43:36 +0800 Subject: [PATCH] fix(ImageViewer): Resolve file download issue #2210 In the `ImageViewer.vue` component, the original download functionality utilized the mixin's download function, which relied on `props.item.path`. This path remains static and isn't updated by the `next` and `prev` functions, leading to incorrect file downloads. To fix this, the download function in `ImageViewer.vue` has been overridden. The updated implementation now uses `data.currentItem.path`, which dynamically changes with the `next` and `prev` functions, ensuring accurate file downloads. --- src/components/filebrowser/viewers/ImageViewer.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/components/filebrowser/viewers/ImageViewer.vue b/src/components/filebrowser/viewers/ImageViewer.vue index 4ac92cf8..e4f36cca 100644 --- a/src/components/filebrowser/viewers/ImageViewer.vue +++ b/src/components/filebrowser/viewers/ImageViewer.vue @@ -164,6 +164,10 @@ export default { this.viewer.show() this.onMouseMove() }, + download() { + this.$refs.dropDown?.toggle() + this.downloadFile(this.currentItem) + }, next() { if (this.currentItemIndex < this.itemList.length - 1) { this.currentItemIndex++