Skip to content

Commit

Permalink
feat: add icon
Browse files Browse the repository at this point in the history
  • Loading branch information
yjl9903 committed Jan 26, 2024
1 parent 4c492c9 commit 9f88254
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions components/TokutenItem.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<script setup lang="ts">
import type { DetailItem } from 'get-bonus';
import { Download, Copy, ClipboardCopy } from 'lucide-vue-next';
const props = defineProps<{
data: DetailItem;
}>();
Expand All @@ -23,10 +25,16 @@ function copyDescription() {
<img class="max-w-36" :src="data.image" />
<div class="grid grid-rows-[1fr_auto] gap-2">
<p class="text-3.5 whitespace-pre-line">{{ data.description }}</p>
<div class="flex gap-2">
<Button @click="downloadImage">下载图片</Button>
<Button @click="copyImage">复制图片</Button>
<Button @click="copyDescription">复制描述</Button>
<div class="flex gap-4">
<Button @click="downloadImage" variant="secondary" size="sm"
><Download class="w-4 h-4 mr-2" />下载图片</Button
>
<Button @click="copyImage" variant="secondary" size="sm"
><Copy class="w-4 h-4 mr-2"></Copy>复制图片</Button
>
<Button @click="copyDescription" variant="secondary" size="sm"
><ClipboardCopy class="w-4 h-4 mr-2"></ClipboardCopy>复制描述</Button
>
</div>
</div>
</li>
Expand Down

0 comments on commit 9f88254

Please sign in to comment.