Last active
November 28, 2018 16:10
-
-
Save diegomengarda/b7effbf45c090e9dd054453fb8e0a015 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
<select v-model="select" @change="changeSelect"> | |
<option value="1">Um</option> | |
<option value="2">Dois</option> | |
</select> | |
<div>Selected: {{select}}</div> | |
</div> | |
</template> | |
<script> | |
import {debounce} from 'lodash' | |
export default { | |
data() { | |
return { | |
select: '' | |
} | |
}, | |
methods: { | |
changeSelect: debounce(function() { | |
console.log('Changed!') | |
}, 1000) | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment