Skip to content

Instantly share code, notes, and snippets.

@Vitorbnc
Created August 22, 2018 19:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Vitorbnc/61a4436270c4e0a89be1d01f0a3a3130 to your computer and use it in GitHub Desktop.
Save Vitorbnc/61a4436270c4e0a89be1d01f0a3a3130 to your computer and use it in GitHub Desktop.
Buefy this.$toast is undefined error
<template>
<div id="app">
<img src="./assets/logo.png">
<router-view/>
<button class="button" @click="logout">Test Toast</button>
</div>
</template>
<script>
export default {
name: 'App',
methods:{
logout: ()=>{this.$toast.open({message:'Erro:'+err.message,type:'is-danger'})}
}
}
</script>
<style>
#app {
font-family: 'Avenir', Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment