coppy to clipboard
This commit is contained in:
@@ -21,6 +21,8 @@ const computedResult = computed(() => {
|
||||
sell_ratio: r.sell === 0 ? 1 : (r.sell_reprocess / r.sell) - 1
|
||||
})).sort((a, b) => a.name.localeCompare(b.name))
|
||||
})
|
||||
|
||||
const copyToClipboard = (s: string) => navigator.clipboard.writeText(s);
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -41,7 +43,7 @@ const computedResult = computed(() => {
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="r in computedResult" :key="r.typeID" :class="{'bg-emerald-500': r.buy_ratio >= threshold / 100 }">
|
||||
<tr v-for="r in computedResult" :key="r.typeID" class="cursor-pointer" :class="{'bg-emerald-500': r.buy_ratio >= threshold / 100 }" @click="copyToClipboard(r.name)">
|
||||
<td>{{ r.name }}</td>
|
||||
<td class="text-right">{{ iskFormater.format(r.buy) }}</td>
|
||||
<td class="text-right">{{ iskFormater.format(r.buy_reprocess) }} ({{percentFormater.format(r.buy_ratio)}})</td>
|
||||
|
||||
Reference in New Issue
Block a user