Skip to content

Instantly share code, notes, and snippets.

@Julien1138
Created October 2, 2020 13:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Julien1138/c32a297bd5902da43ee4cd20aa4dc509 to your computer and use it in GitHub Desktop.
Save Julien1138/c32a297bd5902da43ee4cd20aa4dc509 to your computer and use it in GitHub Desktop.
<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