Refactor emitters
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import MaskedInput, { conformToMask } from 'vue-text-mask'
|
||||
import inputValidations from '../lib/input_validations'
|
||||
import { formatDollars } from '../lib/dollars'
|
||||
import { emitFieldChange, emitFieldMount } from '../lib/emitters'
|
||||
import { emitEvent } from '../lib/emitters'
|
||||
|
||||
export default {
|
||||
name: 'textinput',
|
||||
@@ -68,7 +68,7 @@ export default {
|
||||
},
|
||||
|
||||
created: function() {
|
||||
emitFieldMount(this, {
|
||||
emitEvent('field-mount', this, {
|
||||
optional: this.optional,
|
||||
name: this.name,
|
||||
})
|
||||
@@ -126,7 +126,7 @@ export default {
|
||||
this.showValid = this.value != '' && valid
|
||||
|
||||
// Emit a change event
|
||||
emitFieldChange(this, {
|
||||
emitEvent('field-change', this, {
|
||||
value: this._rawValue(value),
|
||||
valid,
|
||||
name: this.name,
|
||||
|
Reference in New Issue
Block a user