Created
April 7, 2020 13:44
-
-
Save iErik/20ec61e3e117c7221deaecd8af73c9a2 to your computer and use it in GitHub Desktop.
This file contains 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> | |
<f-display-per-page :options="options" :change="updateSelected" /> | |
</template> | |
<script> | |
export default { | |
data: () => ({ selected: 10 }), | |
computed: { | |
options() { | |
const items = [ | |
{ label: 10, value: 10, selected: this.selected === 10 }, | |
{ label: 25, value: 25, selected: this.selected === 25 }, | |
{ label: 50, value: 50, selected: this.selected === 50 } | |
] | |
return items | |
} | |
}, | |
methods: { | |
updateSelected({ value }) { | |
this.selected = value | |
} | |
} | |
} | |
</script> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment