Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
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-10-05 10:34:32 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
3a51fad499ce44685862df3a6b6f78a84200b4d9
3a51fad4
1 parent
ec12cdf2
fix(ImageUploaderField): 修复图片预览时起始位置不正确的问题
设置点击图片的索引作为预览起始位置,确保预览时显示正确的图片
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
src/components/ImageUploaderField/index.vue
src/components/ImageUploaderField/index.vue
View file @
3a51fad
...
...
@@ -59,7 +59,7 @@
</div>
</van-overlay>
<van-image-preview v-model:show="show" :images="default_list" @change="onChange">
<van-image-preview v-model:show="show" :images="default_list"
:start-position="index"
@change="onChange">
<template v-slot:index>第{{ index + 1 }}张</template>
</van-image-preview>
</template>
...
...
@@ -390,7 +390,8 @@ const validImageUploader = () => {
// 预览只读图片
const onImgClick = (i) => {
show.value = true
index.value = i; // 设置点击的图片索引
show.value = true;
}
const show = ref(false);
...
...
Please
register
or
login
to post a comment