How to download axios file?

the backend directly gives a download address. How can I click the button to download this file? can I paste a code to let the fool learn

Mar.23,2022

Don't think about complexity. The
a tag goes straight through, or the button binds a click event to call window.open ('http://xxx.com')).


Just add a download attribute to the

a tag.

<a href="/images/xxx.jpg" download="xxx">
Menu