How to set the a tag in Vue for download?

1. How can I use the a tag in Vue to download a file?
I gave a link directly in the a tag, and then added the attribute of download
Export
this operation can only jump to the path of the picture. This is the first time I have encountered this situation.

clipboard.png

Mar.02,2021
The

download option seems to apply only to the same origin, and resources can be converted to base64 format if necessary.


<el-button type="success" class="to_lead" @click.native="exportData()">
   <span class="glyphicon glyphicon-arrow-up"></span> 
</el-button>

using the most original way of writing, register the click event directly on button, and give the link below to get it done

exportData() {
   location.href = "https://img.codeshelper.com/upload/img/2021/03/02/lmau1sur1ru2080.png";
}
The href attribute of

a tag is empty, and the test is valid

.
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1eb3814-245a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1eb3814-245a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?