mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
use link instead of url, do not use v-model, use value to not allow mutate prop
This commit is contained in:
parent
00e03af7f3
commit
f9efc3fa06
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="clipboard-copy">
|
||||
<b-input-group size="lg" class="mb-3" prepend="Link">
|
||||
<b-form-input v-model="url" type="text" readonly></b-form-input>
|
||||
<b-form-input :value="link" type="text" readonly></b-form-input>
|
||||
<b-input-group-append>
|
||||
<b-button size="sm" text="Button" variant="success" @click="CopyLink">
|
||||
{{ $t('gdd_per_link.copy') }}
|
||||
@ -16,15 +16,10 @@ export default {
|
||||
props: {
|
||||
link: { type: String, required: true },
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
url: `${this.link}`,
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
CopyLink() {
|
||||
navigator.clipboard
|
||||
.writeText(this.url)
|
||||
.writeText(this.link)
|
||||
.then(() => {
|
||||
this.toastSuccess(this.$t('gdd_per_link.link-copied'))
|
||||
})
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user