Skip to content

Instantly share code, notes, and snippets.

@Julien1138
Created October 2, 2020 13:28
Embed
What would you like to do?
<template>
<div>
<FormElement :field="name">
<template v-slot="{value, update}">
<input :value="value" @input="update">
</template>
</FormElement>
<FormElement :field="description">
<template v-slot="{value, update}">
<textarea :value="value" @input="update"/>
</template>
</FormElement>
</div>
</template>
<script>
import FormElement from './FormElement';
export default {
components: {
FormElement
},
props: {
msg: String
},
data() {
return {
name: {
title: 'Name',
value: ''
},
description: {
title: 'Job description',
value: ''
},
}
}
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment