Emit field change event for options inputs
This commit is contained in:
16
js/components/options_input.js
Normal file
16
js/components/options_input.js
Normal 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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user