InputTextTab.vue 714 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
<template>
  <v-textarea
    @input="updateValue()"
    hide-details
    outlined
    height=8em
    auto-grow
    clearable
    v-model="inputText"
    :label="$t('input-text')"
  ></v-textarea>
</template>
<script>
export default {
  data: () => ({
      inputText: ''
  }),
  props: ['isSelectedTab'],
  watch: {
    isSelectedTab: function() {
      if (!this.isSelectedTab) {
        this.inputText = '';
        this.updateValue();
      }
    }
  },
  methods: {
    updateValue: function() {
      this.$emit('input-text-update', this.inputText);
    }
  }
}
</script>
<i18n>
{
  "fr":{
    "input-text":"Entrez ou collez votre texte ici"
  },
  "en":{
    "input-text":"Type or paste your text here"
  }
}