mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-30 01:02:28 +00:00
perf: 优化客户端图片浏览器
This commit is contained in:
parent
9f8350da3f
commit
440aa64fae
@ -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>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user