Skip to content

Instantly share code, notes, and snippets.

@spiritbroski
Created December 5, 2020 02:26
Show Gist options
  • Select an option

  • Save spiritbroski/409fb7e1329a6490426bd870bd955439 to your computer and use it in GitHub Desktop.

Select an option

Save spiritbroski/409fb7e1329a6490426bd870bd955439 to your computer and use it in GitHub Desktop.
Home.vue
// components/Home.vue
<template>
...
<v-btn :class="['my-2']" color="info" elevation="2" v-show="login"
>DASHBOARD</v-btn
>
<v-btn
:class="['my-2']"
color="info"
elevation="2"
href="/login"
v-show="!login"
>LOGIN</v-btn
>
<v-btn
:class="['my-2', 'mx-2']"
color="error"
elevation="2"
v-show="login"
>LOGOUT</v-btn
>
...
</template>
<script lang="ts">
import { Component, Vue, Prop } from 'nuxt-property-decorator'
@Component
export default class MyStore extends Vue {
@Prop({ required: true }) readonly login!: boolean
}
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment