You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
761 B
44 lines
761 B
<template>
|
|
<my-input :label="label" :required="required">
|
|
<input v-model="inputValue" @input="onUpdate" :required="required" />
|
|
</my-input>
|
|
</template>
|
|
<script>
|
|
import MyInput from "@/components/MyInput.vue";
|
|
|
|
export default {
|
|
components: {MyInput},
|
|
props: {
|
|
required: {
|
|
type: Boolean,
|
|
required: false,
|
|
default: false,
|
|
},
|
|
label: {
|
|
type: String,
|
|
required: false,
|
|
default: ''
|
|
},
|
|
value: {
|
|
type: [String, Number],
|
|
required: false,
|
|
default: ''
|
|
}
|
|
},
|
|
data () {
|
|
return {
|
|
inputValue: ''
|
|
}
|
|
},
|
|
watch: {
|
|
value () {
|
|
this.inputValue = this.value
|
|
}
|
|
},
|
|
methods: {
|
|
onUpdate () {
|
|
this.$emit('input', this.inputValue )
|
|
}
|
|
}
|
|
}
|
|
</script>
|