去掉未使用的方法
This commit is contained in:
@@ -89,31 +89,17 @@
|
||||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { message, Modal } from 'ant-design-vue';
|
||||
import { useAuthStore, useUserStore } from '@/store';
|
||||
import { message } from 'ant-design-vue';
|
||||
import { useAuthStore } from '@/store';
|
||||
import { storeToRefs } from 'pinia';
|
||||
|
||||
const authStore = useAuthStore();
|
||||
const userStore = useUserStore();
|
||||
|
||||
const { username } = storeToRefs(userStore);
|
||||
const { token } = storeToRefs(authStore);
|
||||
const loggedIn = ref(Boolean(token.value));
|
||||
|
||||
const router = useRouter();
|
||||
|
||||
const handleLogout = () => {
|
||||
Modal.confirm({
|
||||
title: '提示',
|
||||
content: `是否确认退出登录:${username.value}`,
|
||||
okText: '确定',
|
||||
cancelText: '取消',
|
||||
onOk: () => {
|
||||
authStore.logout();
|
||||
},
|
||||
});
|
||||
};
|
||||
|
||||
const handleJumpTo = (name) => {
|
||||
if (!loggedIn.value) {
|
||||
message.warning("尚未登录,请先登录");
|
||||
|
||||
Reference in New Issue
Block a user