Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<template>
<div>
<FormElement :field="name">
<template v-slot="{field}">
<input v-model="field.value">
</template>
</FormElement>
<FormElement :field="description">
<template v-slot="{field}">
<textarea v-model="field.value"/>
</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