remove unnecessary helpers (#241)
This commit is contained in:
parent
a368294b43
commit
c4182c9ddc
|
@ -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>
|
Loading…
Reference in a new issue