remove unnecessary helpers (#241)

This commit is contained in:
Nolan Lawson 2018-04-29 18:41:56 -07:00 committed by GitHub
parent a368294b43
commit c4182c9ddc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,7 +1,6 @@
<a class="settings-nav-item {{getCurrentClass(page, name)}}"
aria-label={{getAriaLabel(page, name, label)}}
:href
>
<a class="settings-nav-item {{className}}"
aria-label={{ariaLabel}}
:href >
{{label}}
</a>
<style>
@ -15,13 +14,9 @@
</style>
<script>
export default {
helpers: {
getCurrentClass (page, name) {
return page === name ? 'selected' : ''
},
getAriaLabel (page, name, label) {
return page === name ? `${label} (current page)` : label
}
computed: {
className: (page, name) => page === name ? 'selected' : '',
ariaLabel: (page, name, label) => page === name ? `${label} (current page)` : label
}
}
</script>