feat(copy): support legacy copy to clipboard for older browser

This commit is contained in:
Corentin Thomasset 2023-08-22 00:37:36 +02:00
parent 76b2761d62
commit 161dd9caa5
No known key found for this signature in database
GPG key ID: DBD997E935996158
11 changed files with 47 additions and 53 deletions

View file

@ -1,10 +1,11 @@
<script setup lang="ts">
import { Plus, Trash } from '@vicons/tabler';
import { useClipboard, useStorage } from '@vueuse/core';
import { useStorage } from '@vueuse/core';
import _ from 'lodash';
import { arrayToMarkdownTable, computeAverage, computeVariance } from './benchmark-builder.models';
import DynamicValues from './dynamic-values.vue';
import { useCopy } from '@/composable/copy';
const suites = useStorage('benchmark-builder:suites', [
{ title: 'Suite 1', data: [5, 10] },
@ -47,7 +48,7 @@ const results = computed(() => {
});
});
const { copy } = useClipboard();
const { copy } = useCopy({ createToast: false });
const header = {
title: 'Suite',