当前位置:网站首页>导航栏----个人中心 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>
边栏推荐
- JSESSIONID description in cookie
- 【考研词汇训练营】Day18 —— amount,max,consider,account,actual,eliminate,letter,significant,embarrass,collapse
- HMS Core音频编辑服务音源分离与空间音频渲染,助力快速进入3D音频的世界
- Running the evict task with compensationTime
- Activiti 工作流引擎 详解
- 《快速掌握QML》第六章 动画
- Redis数据更新,是先更新数据库还是先更新缓存?
- 【luogu P8031】Kućice(计算几何)
- bebel系列- 插件开发
- excel数字下拉递增怎么设置?
猜你喜欢

微信读书,导出笔记

MySQL 视图(详解)

基于Apache Doris的湖仓分析

MySQL_关于JSON数据的查询

Babbitt | Metaverse Daily Must Read: The shuffling is coming, will the digital Tibetan industry usher in a new batch of leaders in the second half?Will there be new ways to play?...

MySQL BIGINT 数据类型

Network layer protocol------IP protocol

GateWay实现负载均衡

idea plugins搜索不到插件

Office365无法打开word文档怎么办?Office365无法打开word文档的解决方法
随机推荐
5分钟搞懂MySQL - 行转列
[The Beauty of Software Engineering - Column Notes] 31 | Is software testing responsible for product quality?
外包干了三年,废了...
多线程获取官方汇率
Mysql索引特性(重要)
bebel系列- 插件开发
awk notes
新书上市 |《谁在掷骰子?》在“不确定性时代”中确定前行
KEIL problem: [keil Error: failed to execute 'C:\Keil\ARM\ARMCC']
excel数字如何转换成文本?excel表格数据转换成文本的方法
MySQL笔记1(数据库的好处,数据库的概念,数据库的特点,MySQL的启动,数据模型,SQL)
C语言中指针没那么难~ (1)【文章结尾有资料】
MVC模式和三层架构
IDEA2018.3.5 cancel double-click Shift shortcut
基于Apache Doris的湖仓分析
How to make a deb package
为什么那么多自学软件测试的人,后来都放弃了...
Redis数据更新,是先更新数据库还是先更新缓存?
Android Studio 实现登录注册-源代码 (连接MySql数据库)
flowable工作流所有业务概念