feat: ♿ add download attribute to download button
This commit is contained in:
parent
e78e3b2565
commit
196bc23b1a
@ -10,7 +10,7 @@
|
||||
</template>
|
||||
{{ title }}
|
||||
</NcButton>
|
||||
<NcButton v-if="url" :href="url" target="_blank">
|
||||
<NcButton v-if="url" :download="filename" :href="url" target="_blank">
|
||||
<template #icon>
|
||||
<DownloadIcon :size="20" />
|
||||
</template>
|
||||
@ -70,6 +70,10 @@ export default {
|
||||
episodeFileSize() {
|
||||
return humanFileSize(this.size)
|
||||
},
|
||||
filename() {
|
||||
const url = new URL(this.url)
|
||||
return url.pathname.split('/').pop()
|
||||
},
|
||||
},
|
||||
}
|
||||
</script>
|
||||
|
Loading…
Reference in New Issue
Block a user