Stop using script setup feature but use olden style
This commit is contained in:
@@ -0,0 +1,42 @@
|
||||
<template>
|
||||
<div>
|
||||
<div>
|
||||
<span>You are logged in</span>
|
||||
<Button label="Logout" @click="onLogout"/>
|
||||
</div>
|
||||
<div class="main-view">
|
||||
<DirectoryView />
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
|
||||
import Button from 'primevue/button';
|
||||
|
||||
import DirectoryView from '../components/DirectoryView.vue';
|
||||
|
||||
export default {
|
||||
name: 'Home',
|
||||
components: {
|
||||
DirectoryView,
|
||||
Button
|
||||
},
|
||||
methods: {
|
||||
onLogout() {
|
||||
delete localStorage.accessToken;
|
||||
this.$router.push('/login');
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
||||
.main-view {
|
||||
width: 100%;
|
||||
height: 400px;
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user