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