This commit is contained in:
James Cole
2019-09-20 06:14:08 +02:00
parent 845e67e9be
commit c14d3f40a9
9 changed files with 120 additions and 8 deletions

View File

@@ -29,7 +29,9 @@
<textarea class="form-control" :name="name"
:title="title" autocomplete="off"
ref="str"
:value="value" @input="handleInput"
rows="8"
v-model="textValue"
@input="handleInput"
:placeholder="title"></textarea>
<ul class="list-unstyled" v-for="error in this.error">
<li class="text-danger">{{ error }}</li>
@@ -47,6 +49,11 @@
value: String,
error: Array
},
data() {
return {
textValue: this.value,
}
},
methods: {
handleInput(e) {
this.$emit('input', this.$refs.str.value);