-
-
Save danielschmitz/00ddbd0f950198f3ae328e1c6fc4d964 to your computer and use it in GitHub Desktop.
Trabalhando com VueStash
This file contains 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
<template> | |
<div id="app"> | |
<button @click="setFakeLogin()">Fake Login</button> | |
<button @click="setFakeLogout()">Fake Logout</button> | |
<router-view/> | |
</div> | |
</template> | |
<script> | |
export default { | |
name: 'App', | |
store: ['username', 'email', 'token'], | |
methods: { | |
setFakeLogin: function () { | |
this.username = 'daniel' | |
this.email = 'daniel@gmail.com' | |
this.token = 'hdudvo2837hfo2o38f93nknweoi209' | |
}, | |
setFakeLogout: function () { | |
this.username = '' | |
this.email = '' | |
this.token = '' | |
} | |
} | |
} | |
</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