Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <template>
- <div>
- <select v-bind:value="selected" @change="onChange($event)">
- <option>asc</option>
- <option>desc</option>
- <option></option>
- </select>
- </div>
- </template>
- <script>
- export default {
- data () {
- return {
- selected: 'asc'
- }
- },
- methods: {
- onChange(e) {
- this.selected = e.target.value
- this.$emit('change', this.selected)
- }
- }
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement