当前位置:网站首页>导航栏----个人中心 Dropdown
导航栏----个人中心 Dropdown
2022-07-30 21:01:00 【要成为光的女人】
1.用户信息

代码案例:
<template>
<div class="user-info">
<el-dropdown>
<span class="el-dropdown-link">
<el-avatar src="https://cube.elemecdn.com/0/88/03b0d39583f48206768a7534e55bcpng.png"/>
<span>{
{name}}</span>
<el-icon class="el-icon--right">
<arrow-down />
</el-icon>
</span>
<template #dropdown>
<el-dropdown-menu>
<el-dropdown-item>退出登录</el-dropdown-item>
<el-dropdown-item> 用户信息</el-dropdown-item>
<el-dropdown-item>系统管理</el-dropdown-item>
</el-dropdown-menu>
</template>
</el-dropdown>
</div>
</template>
<script lang="ts">
import { defineComponent,computed } from 'vue'
import { ArrowDown} from '@element-plus/icons-vue'
import {useStore} from '@/store'
export default defineComponent({
components:{
ArrowDown
},
setup () {
//拿到useStore
const store=useStore()
const name=computed(()=>{
store.state.login.UserInfo.name //用户名称
// store.state.login.UserInfo.url //用户头像
})
return {
name,
}
}
})
</script>
边栏推荐
- HMS Core Discovery第16期回顾|与虎墩一起,玩转AI新“声”态
- vlookup函数匹配不出来只显示公式的解决方法
- 【回归预测-CNN预测】基于卷积神经网络CNN实现数据回归预测附matlab代码
- CDH集群spark-shell执行过程分析
- [Typora] This beta version of Typora is expired, please download and install a newer version.
- 基于Apache Doris的湖仓分析
- 如何解决gedit 深色模式下高亮文本不可见?
- excel数字下拉递增怎么设置?
- 新书上市 |《谁在掷骰子?》在“不确定性时代”中确定前行
- 三层架构简单配置
猜你喜欢

MySQL笔记2(函数,约束,多表查询,事务)

Image Restoration by Estimating Frequency Distribution of Local Patches

What is the common factor
![[Deep Learning] Target Detection | SSD Principle and Implementation](/img/07/ea4ff3ffbe7e0c11ff7baec0e1818f.jpg)
[Deep Learning] Target Detection | SSD Principle and Implementation

2.网络资源访问工具:requests

MySQL的on duplicate key update 的使用

【限时福利】21天学习挑战赛 - MySQL从入门到精通

Activiti 工作流引擎 详解

MySQL 视图(详解)

【深度学习】目标检测|SSD原理与实现
随机推荐
【机器学习】梯度下降背后的数学之美
Enhancing Quality for HEVC Compressed Videos
第03章 用户和权限管理【1.MySQL架构篇】【MySQL高级】
tcp协议传输中的粘包问题
Recommendation System - Sorting Layer: Sorting Layer Architecture [User and Item Feature Processing Steps]
Image Restoration by Estimating Frequency Distribution of Local Patches
【元胞自动机】基于元胞自动机模拟生命演化、病毒感染等实例附matlab代码
[Machine Learning] The Beauty of Mathematics Behind Gradient Descent
什么是公约数
7、MySQL Workbench 导出导入数据库
【限时福利】21天学习挑战赛 - MySQL从入门到精通
MySQL 视图(详解)
chrome extension: how to make the dialog be on the right side of the current window?
[Limited Time Bonus] 21-Day Learning Challenge - MySQL from entry to mastery
2.网络资源访问工具:requests
对List集合中每个对象元素按时间顺序排序
canvas基础讲解加示例
如何解决gedit 深色模式下高亮文本不可见?
Flex布局详解
mysql 递归函数with recursive的用法