mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Uploader): incorrect preview index when upload same images (#4577)
This commit is contained in:
parent
306d595fbd
commit
8740376218
@ -183,14 +183,13 @@ export default createComponent({
|
||||
return;
|
||||
}
|
||||
|
||||
const imageFiles = this.fileList
|
||||
.filter(item => isImageFile(item))
|
||||
.map(item => item.content || item.url);
|
||||
const imageFiles = this.fileList.filter(item => isImageFile(item));
|
||||
const imageContents = imageFiles.map(item => item.content || item.url);
|
||||
|
||||
ImagePreview({
|
||||
images: imageFiles,
|
||||
images: imageContents,
|
||||
closeOnPopstate: true,
|
||||
startPosition: imageFiles.indexOf(item.content || item.url),
|
||||
startPosition: imageFiles.indexOf(item),
|
||||
onClose: () => {
|
||||
this.$emit('close-preview');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user