mirror of
https://github.com/Megghy/vtsuru.live.git
synced 2025-12-07 02:46:55 +08:00
add logout
This commit is contained in:
@@ -1,9 +1,16 @@
|
|||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useAccount } from '@/api/account'
|
import { useAccount } from '@/api/account'
|
||||||
import { NAlert, NButton, NCard, NDivider, NSpace, NTag, NText, NThing, NTime } from 'naive-ui'
|
import { NAlert, NButton, NCard, NDivider, NPopconfirm, NSpace, NTag, NText, NThing, NTime } from 'naive-ui'
|
||||||
import SettingsManageView from './SettingsManageView.vue'
|
import SettingsManageView from './SettingsManageView.vue'
|
||||||
|
import { useLocalStorage } from '@vueuse/core'
|
||||||
|
|
||||||
const accountInfo = useAccount()
|
const accountInfo = useAccount()
|
||||||
|
const cookie = useLocalStorage('JWT_Token', '')
|
||||||
|
|
||||||
|
function logout() {
|
||||||
|
cookie.value = undefined
|
||||||
|
window.location.reload()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
@@ -37,6 +44,15 @@ const accountInfo = useAccount()
|
|||||||
<NButton size="small" @click="$router.push({ name: 'manage-biliVerify' })" type="info"> 前往认证 </NButton>
|
<NButton size="small" @click="$router.push({ name: 'manage-biliVerify' })" type="info"> 前往认证 </NButton>
|
||||||
</template>
|
</template>
|
||||||
</NAlert>
|
</NAlert>
|
||||||
|
<NDivider />
|
||||||
|
<NSpace justify="center">
|
||||||
|
<NPopconfirm @positive-click="logout">
|
||||||
|
<template #trigger>
|
||||||
|
<NButton type="warning"> 登出 </NButton>
|
||||||
|
</template>
|
||||||
|
确定登出?
|
||||||
|
</NPopconfirm>
|
||||||
|
</NSpace>
|
||||||
</NCard>
|
</NCard>
|
||||||
</NSpace>
|
</NSpace>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -255,7 +255,7 @@ function getOptions() {
|
|||||||
{
|
{
|
||||||
name: '舰长数',
|
name: '舰长数',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
step: 'start',
|
step: 'middle',
|
||||||
emphasis: {
|
emphasis: {
|
||||||
focus: 'series',
|
focus: 'series',
|
||||||
},
|
},
|
||||||
@@ -317,7 +317,7 @@ function getOptions() {
|
|||||||
{
|
{
|
||||||
name: '日增',
|
name: '日增',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
step: 'start',
|
step: 'middle',
|
||||||
yAxisIndex: 1,
|
yAxisIndex: 1,
|
||||||
emphasis: {
|
emphasis: {
|
||||||
focus: 'series',
|
focus: 'series',
|
||||||
@@ -381,7 +381,7 @@ function getOptions() {
|
|||||||
name: '日增',
|
name: '日增',
|
||||||
type: 'line',
|
type: 'line',
|
||||||
yAxisIndex: 1,
|
yAxisIndex: 1,
|
||||||
step: 'start',
|
step: 'middle',
|
||||||
|
|
||||||
emphasis: {
|
emphasis: {
|
||||||
focus: 'series',
|
focus: 'series',
|
||||||
|
|||||||
Reference in New Issue
Block a user