43 lines
779 B
Vue
43 lines
779 B
Vue
<template>
|
|
<section>
|
|
<nav
|
|
class="container is-flex is-justify-content-space-between has-text-white is-align-items-center"
|
|
>
|
|
<p>{{ usuario }}</p>
|
|
<b-button type="is-danger is-small my-1 rojo" @click="cerrarSesion()"
|
|
>Cerrar Sesión</b-button
|
|
>
|
|
</nav>
|
|
</section>
|
|
</template>
|
|
|
|
<script>
|
|
export default {
|
|
data() {
|
|
return { usuario: "" };
|
|
},
|
|
created() {
|
|
this.usuario = localStorage.getItem("usuario");
|
|
},
|
|
methods: {
|
|
cerrarSesion() {
|
|
// localStorage.removeItem('user')
|
|
// localStorage.removeItem('token')
|
|
// localStorage.removeItem('')
|
|
|
|
this.$router.push("/");
|
|
},
|
|
},
|
|
};
|
|
</script>
|
|
|
|
<style scoped>
|
|
section {
|
|
background-color: #bb8800;
|
|
}
|
|
|
|
.rojo {
|
|
background-color: #dc3545;
|
|
}
|
|
</style>
|