Created
May 10, 2020 09:07
-
-
Save mrofi/826009ba12b4a445ff9470c239ffd1ff to your computer and use it in GitHub Desktop.
Vue JS Snippet
This file contains hidden or 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
<!-- Show Router Link --> | |
<li class="items-center text-gray-800 hover:text-gray-600" | |
v-for="route in this.$router.options.routes" | |
v-bind:key="route.path" | |
> | |
<router-link | |
class="text-xs uppercase py-3 font-bold block" | |
v-bind:to="route.path" | |
activeClass="text-orange-500 hover:text-orange-600" | |
v-bind:exact="route.path == '/'" | |
><i class="opacity-75 mr-2 text-sm" v-bind:class="route.meta.icon"></i> | |
{{ route.name }} | |
</router-link | |
> | |
</li> | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment