Vue downloads excel and other files and realizes the download progress

problem description

to implement the file download function, you can put the resource url into the a tag, but how to achieve the real-time progress of downloading (for example, a total of 800kb, 321kb downloaded in this second)?

looked up some materials do not seem to understand, trouble to know the god to give a train of thought! I can"t thank you enough.

part of the UI diagram is as follows

May.25,2021

xhr.onreadystatechange achieves upload progress in this callback


which request library are you using?
if there are parameters of download progress in the axios, official document


have you solved this problem? I have also encountered the problem of how to display the download progress bar for download url, in the background

.
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-1e462a2-59bdf.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-1e462a2-59bdf.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?