thainnv-dev: Nhúng
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<script setup lang="ts">
|
||||
const props = defineProps<{
|
||||
dataResource?: string,
|
||||
dataTitle?: string,
|
||||
}>()
|
||||
|
||||
const resource = computed(() => props.dataResource ?? '')
|
||||
const title = computed(() => props.dataTitle ?? '')
|
||||
const fileName = computed(() => `${title.value}.${resource.value.split('.').pop()}`)
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<a :href="resource" :download="fileName">{{fileName}}</a>
|
||||
</template>
|
||||
Reference in New Issue
Block a user