mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-24 16:56:14 -04:00
feat(copy): support legacy copy to clipboard for older browser (#581)
This commit is contained in:
parent
76b2761d62
commit
6f93cba3da
11 changed files with 47 additions and 53 deletions
|
@ -1,10 +1,10 @@
|
|||
<script setup lang="ts">
|
||||
import { useClipboard } from '@vueuse/core';
|
||||
import { useCopy } from '@/composable/copy';
|
||||
|
||||
const props = defineProps<{ tokens: { previous: string; current: string; next: string } }>();
|
||||
const { copy: copyPrevious, copied: previousCopied } = useClipboard();
|
||||
const { copy: copyCurrent, copied: currentCopied } = useClipboard();
|
||||
const { copy: copyNext, copied: nextCopied } = useClipboard();
|
||||
const { copy: copyPrevious, isJustCopied: previousCopied } = useCopy({ createToast: false });
|
||||
const { copy: copyCurrent, isJustCopied: currentCopied } = useCopy({ createToast: false });
|
||||
const { copy: copyNext, isJustCopied: nextCopied } = useCopy({ createToast: false });
|
||||
|
||||
const { tokens } = toRefs(props);
|
||||
</script>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue