web: implement logout logic
This commit is contained in:
parent
d61b4f3fcb
commit
def6cb6195
1 changed files with 9 additions and 1 deletions
|
@ -19,7 +19,7 @@
|
||||||
clearable
|
clearable
|
||||||
rounded="pill"
|
rounded="pill"
|
||||||
></v-text-field>
|
></v-text-field>
|
||||||
<v-btn icon variant="outlined" >
|
<v-btn icon variant="outlined" @click="handlelogout">
|
||||||
<LogOut />
|
<LogOut />
|
||||||
</v-btn>
|
</v-btn>
|
||||||
</v-toolbar>
|
</v-toolbar>
|
||||||
|
@ -29,6 +29,14 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { LogOut } from 'lucide-vue-next';
|
import { LogOut } from 'lucide-vue-next';
|
||||||
|
import { store } from '@/store';
|
||||||
|
|
||||||
|
|
||||||
|
function handlelogout() {
|
||||||
|
console.log('logout');
|
||||||
|
store.setToken(null);
|
||||||
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
|
Loading…
Reference in a new issue