thainnv-dev: Nhúng

This commit is contained in:
nguyen van thai
2024-06-06 13:29:22 +07:00
parent 0a7774b7f4
commit c217ed82c9
25 changed files with 382 additions and 45 deletions
+14
View File
@@ -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>