mirror of
https://github.com/CorentinTh/it-tools.git
synced 2025-04-20 14:56:17 -04:00
refactor(types): copy can handle numbers
This commit is contained in:
parent
0afac97616
commit
35490851fe
2 changed files with 3 additions and 4 deletions
|
@ -12,9 +12,8 @@ const copyToClipboard = (text: string) => {
|
|||
|
||||
@Component
|
||||
export class CopyableMixin extends Vue {
|
||||
copy(text: string, toastText = 'Copied to clipboard !') {
|
||||
copyToClipboard(text)
|
||||
console.log(toastText)
|
||||
copy(text: string|number, toastText = 'Copied to clipboard !') {
|
||||
copyToClipboard(String(text))
|
||||
this.$toast.success(toastText)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<v-btn depressed class="mr-4" @click="refreshPort">
|
||||
Refresh
|
||||
</v-btn>
|
||||
<v-btn depressed @click="copy(port.toString())">
|
||||
<v-btn depressed @click="copy(port)">
|
||||
Copy port
|
||||
</v-btn>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue