🎨chore: 使用 oxlint, oxfmt&格式化代码
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
import { EventEmitter } from 'events'
|
||||
|
||||
export const useDownload = (url: string, filename: string): {
|
||||
export const useDownload = (
|
||||
url: string,
|
||||
filename: string
|
||||
): {
|
||||
download: () => void
|
||||
progressEmitter: EventEmitter
|
||||
} => {
|
||||
@@ -18,7 +21,9 @@ export const useDownload = (url: string, filename: string): {
|
||||
}
|
||||
xhr.onload = function () {
|
||||
if (this.status === 200) {
|
||||
const blob = new Blob([this.response], { type: 'application/octet-stream' })
|
||||
const blob = new Blob([this.response], {
|
||||
type: 'application/octet-stream',
|
||||
})
|
||||
const url = window.URL.createObjectURL(blob)
|
||||
const link = document.createElement('a')
|
||||
link.href = url
|
||||
|
||||
Reference in New Issue
Block a user