添加考勤菜单

This commit is contained in:
1147680382@qq.com
2025-05-22 09:35:50 +08:00
parent c357ad173c
commit 4ad03c111f
7 changed files with 932 additions and 8 deletions
+4 -4
View File
@@ -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");