add button to copy shipping contact email to clipboard
This commit is contained in:
parent
d6df034ad0
commit
5a1de437b6
3 changed files with 30 additions and 3 deletions
18
web/src/components/inputs/ClipboardButton.vue
Normal file
18
web/src/components/inputs/ClipboardButton.vue
Normal file
|
@ -0,0 +1,18 @@
|
|||
<template>
|
||||
<button @click="fillClipboard" class="btn" :title="payload">
|
||||
<slot></slot>
|
||||
</button>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
export default {
|
||||
name: 'ClipboardButton',
|
||||
props: ['payload'],
|
||||
methods: {
|
||||
fillClipboard() {
|
||||
navigator.clipboard.writeText(this.payload);
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue