Emit field change event for options inputs

This commit is contained in:
Patrick Smith
2018-08-10 10:53:13 -04:00
parent 90240c19af
commit 687af77e33
3 changed files with 40 additions and 21 deletions

View File

@@ -0,0 +1,16 @@
export default {
name: 'optionsinput',
props: {
name: String
},
methods: {
onInput: function (e) {
this.$root.$emit('field-change', {
value: e.target.value,
name: this.name
})
}
}
}

View File

@@ -1,12 +1,14 @@
import classes from '../styles/atat.scss'
import Vue from 'vue/dist/vue'
import optionsinput from './components/options_input'
import textinput from './components/text_input'
const app = new Vue({
el: '#app-root',
components: {
textinput
optionsinput,
textinput,
},
methods: {
closeModal: function(name) {