-
-
Save uno-de-piera/aa401f46fdb3173424da32853dda8ceb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<input name="name" v-model="name" /> | |
<input name="surname" v-model="surname" /> | |
<input name="email" v-model="email" /> | |
<input name="age" v-model="age" /> | |
<input name="address" v-model="address" /> | |
</div> | |
</template> | |
<script> | |
import {computedPropertiesGenerator} from "../computedPropertiesGenerator"; | |
export default { | |
computed: { | |
...computedPropertiesGenerator([ | |
{property: 'name', defaultValue: ''}, | |
{property: 'surname', defaultValue: ''}, | |
{property: 'email', defaultValue: ''}, | |
{property: 'age', defaultValue: 18}, | |
{property: 'address', defaultValue: null}, | |
], {pathStore: 'user', mutation: 'setPropertyOnUser'}), | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment