Refactor emitters

This commit is contained in:
Montana
2019-04-19 11:33:51 -04:00
parent 39975a0a31
commit 629dd674b9
6 changed files with 22 additions and 20 deletions

View File

@@ -1,6 +1,6 @@
import Vue from 'vue'
import { getDaysInMonth } from 'date-fns'
import { emitFieldChange } from '../lib/emitters'
import { emitEvent } from '../lib/emitters'
var paddedNumber = function(number) {
if ((number + '').length === 1) {
@@ -136,7 +136,7 @@ export default {
methods: {
_emitChange: function(name, value, valid) {
emitFieldChange(this, { value, name })
emitEvent('field-change', this, { value, name })
},
},