Skip to content

Instantly share code, notes, and snippets.

@mheiber
Created May 9, 2017 17:17
Show Gist options
  • Save mheiber/1d2ac580a13ab41313c8dd2ae8178610 to your computer and use it in GitHub Desktop.
Save mheiber/1d2ac580a13ab41313c8dd2ae8178610 to your computer and use it in GitHub Desktop.
Minimal Behavior
<style lang="sass">
</style>
<template>
<input
class="input-text"
@input="update"
:placeholder="args.placeholder"
:value="value"
>
</template>
<script>
export default {
props: ['name', 'data', 'schema', 'args'],
data() {
return {
value: this.$props.data
}
},
methods: {
update(event) {
this.$store.commit('UPDATE_FORMDATA', { path: this.name, data: event.target.value});
}
},
slot: 'main'
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment