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)}}"
|
<a class="settings-nav-item {{className}}"
|
||||||
aria-label={{getAriaLabel(page, name, label)}}
|
aria-label={{ariaLabel}}
|
||||||
:href
|
:href >
|
||||||
>
|
|
||||||
{{label}}
|
{{label}}
|
||||||
</a>
|
</a>
|
||||||
<style>
|
<style>
|
||||||
|
@ -15,13 +14,9 @@
|
||||||
</style>
|
</style>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
helpers: {
|
computed: {
|
||||||
getCurrentClass (page, name) {
|
className: (page, name) => page === name ? 'selected' : '',
|
||||||
return page === name ? 'selected' : ''
|
ariaLabel: (page, name, label) => page === name ? `${label} (current page)` : label
|
||||||
},
|
|
||||||
getAriaLabel (page, name, label) {
|
|
||||||
return page === name ? `${label} (current page)` : label
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
Loading…
Reference in New Issue