Skip to content

Commit

Permalink
Updated baseinput code
Browse files Browse the repository at this point in the history
  • Loading branch information
atomjar committed Jan 16, 2019
1 parent c87aadf commit a14377c
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 50 deletions.
10 changes: 9 additions & 1 deletion src/components/BaseInput.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<template>
<div>
<label v-if="label">{{ label }}</label>
<input :value="value" @input="updateValue" v-bind="$attrs">
<input :value="value" @input="updateValue" v-bind="$attrs" v-on="listeners">
</div>
</template>

Expand All @@ -15,6 +15,14 @@ export default {
},
value: [String, Number]
},
computed: {
listeners() {
return {
...this.$listeners,
input: this.updateValue
}
}
},
methods: {
updateValue(event) {
this.$emit('input', event.target.value)
Expand Down
5 changes: 0 additions & 5 deletions src/router.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import NProgress from 'nprogress'
import store from '@/store/store'
import NotFound from './views/NotFound.vue'
import NetworkIssue from './views/NetworkIssue.vue'
import Example from './views/Example.vue'

Vue.use(Router)

Expand All @@ -20,10 +19,6 @@ const router = new Router({
component: EventList,
props: true
},
{
path: '/example',
component: Example
},
{
path: '/event/create',
name: 'event-create',
Expand Down
44 changes: 0 additions & 44 deletions src/views/Example.vue

This file was deleted.

0 comments on commit a14377c

Please sign in to comment.