添加考勤菜单
This commit is contained in:
@@ -2,10 +2,10 @@
|
||||
<el-dropdown placement="bottom">
|
||||
<div class="flx-center">
|
||||
<div class="avatar">
|
||||
<img :src="userInfo.avatar" alt="avatar" />
|
||||
<img :src="userInfo.avatar || ''" alt="avatar" />
|
||||
</div>
|
||||
<span class="username" :style="{ color: themeConfig.footColor }">{{
|
||||
userInfo.name
|
||||
userInfo.name || ''
|
||||
}}</span>
|
||||
</div>
|
||||
<template #dropdown>
|
||||
@@ -27,8 +27,8 @@ const handleClick = () => {
|
||||
// eslint-disable-next-line no-alert
|
||||
alert("button click");
|
||||
};
|
||||
const userInfo = ref(null);
|
||||
userInfo.value = JSON.parse(sessionStorage.getItem("userInfo"));
|
||||
const userInfo = ref({});
|
||||
userInfo.value = JSON.parse(sessionStorage.getItem("userInfo")) || {}
|
||||
|
||||
const gotoLogin = () => {
|
||||
sessionStorage.removeItem("token");
|
||||
|
||||
Reference in New Issue
Block a user