mirror of
https://github.com/infeng/react-viewer.git
synced 2025-12-08 17:36:40 +00:00
refactor: download image directly without opening the new window
This commit is contained in:
parent
02542e6c33
commit
23b5fc965f
@ -274,7 +274,7 @@ export default class ViewerCore extends React.Component<ViewerProps, ViewerCoreS
|
||||
handleDownload = () => {
|
||||
const activeImage = this.getActiveImage();
|
||||
if (activeImage.downloadUrl) {
|
||||
window.open(activeImage.downloadUrl);
|
||||
location.href = activeImage.downloadUrl;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user