From 440aa64fae81b8768b169b817eceafa918ea24b9 Mon Sep 17 00:00:00 2001 From: kuaifan Date: Wed, 9 Nov 2022 13:55:27 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E5=9B=BE=E7=89=87=E6=B5=8F=E8=A7=88=E5=99=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../js/components/PreviewImage/state.vue | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/resources/assets/js/components/PreviewImage/state.vue b/resources/assets/js/components/PreviewImage/state.vue index 412b68a45..c68ede3db 100644 --- a/resources/assets/js/components/PreviewImage/state.vue +++ b/resources/assets/js/components/PreviewImage/state.vue @@ -32,7 +32,23 @@ export default { }, previewImageList(l) { if (l.length > 0) { - this.show = true; + if ($A.isEEUiApp) { + let position = Math.max(this.$store.state.previewImageIndex, 0) + position = Math.min(position, this.$store.state.previewImageList.length - 1) + let paths = l.map(item => { + if ($A.isJson(item)) { + return $A.rightDelete(item.src, "_thumb.jpg"); + } + return $A.rightDelete(item, "_thumb.jpg") + }) + $A.eeuiAppSendMessage({ + action: 'picturePreview', + position, + paths + }); + } else { + this.show = true; + } } } }