mirror of
https://github.com/VueFileManager/vuefilemanager.git
synced 2026-04-18 16:22:14 +00:00
card navigation refactoring
This commit is contained in:
28
resources/js/components/Admin/CardNavigation.vue
Normal file
28
resources/js/components/Admin/CardNavigation.vue
Normal file
@@ -0,0 +1,28 @@
|
||||
<template>
|
||||
<div class="whitespace-nowrap overflow-x-auto">
|
||||
<router-link
|
||||
class="inline-block text-sm font-bold px-4 py-5 border-b-2 border-transparent border-bottom-theme"
|
||||
:class="{'text-theme': routeName === page.route, 'text-gray-600': routeName !== page.route}"
|
||||
v-for="(page, i) in pages"
|
||||
:to="{name: page.route}"
|
||||
:key="i"
|
||||
replace
|
||||
>
|
||||
{{ page.title }}
|
||||
</router-link>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'CardNavigation',
|
||||
props: [
|
||||
'pages'
|
||||
],
|
||||
computed: {
|
||||
routeName() {
|
||||
return this.$route.name
|
||||
}
|
||||
},
|
||||
}
|
||||
</script>
|
||||
Reference in New Issue
Block a user