mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
fix(projects): 修复登录的重定向地址
This commit is contained in:
@ -10,15 +10,12 @@
|
||||
<script lang="ts" setup>
|
||||
import { NDropdown, NAvatar } from 'naive-ui';
|
||||
import { UserAvatar, Logout } from '@vicons/carbon';
|
||||
import { dynamicIconRender } from '@/utils';
|
||||
import { dynamicIconRender, resetAuthStorage } from '@/utils';
|
||||
import HeaderItem from './HeaderItem.vue';
|
||||
import avatar from '@/assets/img/common/logo-fill.png';
|
||||
import { useAuthStore } from '@/store';
|
||||
|
||||
type DropdownKey = 'user-center' | 'logout';
|
||||
|
||||
const { resetAuthState } = useAuthStore();
|
||||
|
||||
const options = [
|
||||
{
|
||||
label: '用户中心',
|
||||
@ -39,7 +36,8 @@ const options = [
|
||||
function handleDropdown(optionKey: string) {
|
||||
const key = optionKey as DropdownKey;
|
||||
if (key === 'logout') {
|
||||
resetAuthState();
|
||||
resetAuthStorage();
|
||||
window.location.reload();
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Reference in New Issue
Block a user