perf: 优化客户端图片浏览器

This commit is contained in:
kuaifan 2022-11-09 13:55:27 +08:00
parent 9f8350da3f
commit 440aa64fae

View File

@ -32,9 +32,25 @@ export default {
}, },
previewImageList(l) { previewImageList(l) {
if (l.length > 0) { if (l.length > 0) {
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; this.show = true;
} }
} }
} }
}
}; };
</script> </script>