Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
stdj_h5
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2025-11-13 10:26:50 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
bc379b63aa70c82a3416494eaeeb66af3ceef73e
bc379b63
1 parent
e5e43b72
fix(Students.vue): 修复图片预览时缩略图参数问题
移除图片预览时的缩略图参数,确保显示原图
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
src/views/Students.vue
src/views/Students.vue
View file @
bc379b6
<!--
* @Date: 2025-10-30 20:52:19
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2025-11-1
2 20:37:51
* @LastEditTime: 2025-11-1
3 10:25:44
* @FilePath: /stdj_h5/src/views/Students.vue
* @Description: 戒子页面 - 图片瀑布流展示
-->
...
...
@@ -82,7 +82,7 @@ const onLoad = async () => {
if (code) {
const newData = data.list.map(item => ({
id: item.id,
src: item.value, // 修改为src,用于ImagePreview
src: item.value
+ '?imageMogr2/thumbnail/400x/strip/quality/70'
, // 修改为src,用于ImagePreview
title: item.name,
description: item.description,
date: item.post_date,
...
...
@@ -134,8 +134,8 @@ const onImageClick = (item) => {
// 获取当前点击图片在所有图片中的索引
const currentIndex = allImages.value.findIndex(img => img.id === item.id)
// 提取所有图片的src用于预览
const images = allImages.value.map(img => img.src)
// 提取所有图片的src用于预览
, 移除缩略图参数
const images = allImages.value.map(img => img.src
.replace('?imageMogr2/thumbnail/400x/strip/quality/70', '')
)
// 仅预览当前单张图片,禁用索引与循环
showImagePreview({
...
...
Please
register
or
login
to post a comment