Skip to content

Instantly share code, notes, and snippets.

@himito
Last active August 19, 2020 10:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save himito/f04c8b2bcfc1ff71e0870ffc326608db to your computer and use it in GitHub Desktop.
Save himito/f04c8b2bcfc1ff71e0870ffc326608db to your computer and use it in GitHub Desktop.
v-model
<template>
<input type="number" ref="monthPicker" :value="value" @input="updateDate()" />
</template>
<script>
export default {
props: ['value'],
methods: {
updateDate () {
this.$emit('input', this.$refs.monthPicker.value)
}
}
};
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment