33 lines
745 B
Vue
33 lines
745 B
Vue
<template>
|
|
<label :for="inputId">{{ labelText }}</label>
|
|
<input v-model="value" type="text"
|
|
:ref="inputId"
|
|
:id="inputId"
|
|
:placeholder="placeholderText"
|
|
class="form-control"
|
|
autocomplete="off" />
|
|
</template>
|
|
|
|
<script>
|
|
import { useField } from "vee-validate";
|
|
|
|
export default {
|
|
name: "textQuestion",
|
|
props: {
|
|
modelValue: String,
|
|
labelText: String,
|
|
placeholderText: String,
|
|
inputId: String,
|
|
},
|
|
computed: {
|
|
value: {
|
|
get: function() {
|
|
return this.modelValue;
|
|
},
|
|
set: function(newValue) {
|
|
this.$emit("update:modelValue", newValue);
|
|
}
|
|
},
|
|
},
|
|
};
|
|
</script>
|