From b1a7b713ee137ab5352acd3ae3fab85f0f50f6da Mon Sep 17 00:00:00 2001 From: wangchristine Date: Wed, 27 Nov 2024 10:52:16 +0800 Subject: [PATCH] fix images order --- src/views/ImageEditorView.vue | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/ImageEditorView.vue b/src/views/ImageEditorView.vue index 8440599..2e7ead9 100644 --- a/src/views/ImageEditorView.vue +++ b/src/views/ImageEditorView.vue @@ -108,7 +108,7 @@ const uploadImage = (event) => { img.src = URL.createObjectURL(imagesOrigin.value.item(i)); img.onload = () => { - images.value.push(img); + images.value[i] = img; resolve(); }; img.onerror = () => { @@ -458,8 +458,8 @@ onUnmounted(() => {

Images {{ imageSelected + 1 }} of {{ images.length }}

@@ -485,7 +485,7 @@ onUnmounted(() => {

Origin resolution: - {{ images[imageSelected].width }} * {{ images[imageSelected].height }} + {{ images[imageSelected]?.width }} * {{ images[imageSelected]?.height }}