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>
|
<template>
|
||||||
<div class="clipboard-copy">
|
<div class="clipboard-copy">
|
||||||
<b-input-group size="lg" class="mb-3" prepend="Link">
|
<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-input-group-append>
|
||||||
<b-button size="sm" text="Button" variant="success" @click="CopyLink">
|
<b-button size="sm" text="Button" variant="success" @click="CopyLink">
|
||||||
{{ $t('gdd_per_link.copy') }}
|
{{ $t('gdd_per_link.copy') }}
|
||||||
@ -16,15 +16,10 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
link: { type: String, required: true },
|
link: { type: String, required: true },
|
||||||
},
|
},
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
url: `${this.link}`,
|
|
||||||
}
|
|
||||||
},
|
|
||||||
methods: {
|
methods: {
|
||||||
CopyLink() {
|
CopyLink() {
|
||||||
navigator.clipboard
|
navigator.clipboard
|
||||||
.writeText(this.url)
|
.writeText(this.link)
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.toastSuccess(this.$t('gdd_per_link.link-copied'))
|
this.toastSuccess(this.$t('gdd_per_link.link-copied'))
|
||||||
})
|
})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user