Skip to content

Commit

Permalink
feat: support copy link from tiles
Browse files Browse the repository at this point in the history
  • Loading branch information
Iori Ichinose committed Jan 11, 2023
1 parent 3e90b2a commit 2d432e2
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/components/DownloadTile.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,23 @@ const props = defineProps<{
}>();
const { title, description, url } = reactive(props.item);
const download = () => window.open(url);
</script>

<template>
<div class="download-tile">
<NCard @click="download()" size="small" :title="title" embedded hoverable>
<a class="download-tile" :href="url" target="_blank">
<NCard size="small" :title="title" embedded hoverable>
{{ description }}
</NCard>
</div>
</a>
</template>

<style scoped lang="less">
.download-tile {
display: block;
padding-bottom: 10px;
break-inside: avoid;
user-select: none;
cursor: default;
text-decoration: none;
}
</style>

0 comments on commit 2d432e2

Please sign in to comment.