|
@@ -21,6 +21,8 @@
|
|
|
</span>
|
|
</span>
|
|
|
<template #dropdown>
|
|
<template #dropdown>
|
|
|
<el-dropdown-menu>
|
|
<el-dropdown-menu>
|
|
|
|
|
+ <el-dropdown-item :icon="Avatar"
|
|
|
|
|
+ @click="openComponent('avater')">修改头像</el-dropdown-item>
|
|
|
<el-dropdown-item :icon="Unlock"
|
|
<el-dropdown-item :icon="Unlock"
|
|
|
@click="openComponent('modify')">修改密码</el-dropdown-item>
|
|
@click="openComponent('modify')">修改密码</el-dropdown-item>
|
|
|
<el-dropdown-item :icon="Delete"
|
|
<el-dropdown-item :icon="Delete"
|
|
@@ -37,7 +39,7 @@
|
|
|
|
|
|
|
|
<script lang="ts" setup>
|
|
<script lang="ts" setup>
|
|
|
import { ref, onMounted, computed, defineAsyncComponent } from 'vue'
|
|
import { ref, onMounted, computed, defineAsyncComponent } from 'vue'
|
|
|
-import { SwitchButton, Unlock, Delete } from '@element-plus/icons-vue'
|
|
|
|
|
|
|
+import { SwitchButton, Unlock, Delete, Avatar } from '@element-plus/icons-vue'
|
|
|
import { getFileUrl } from '@/filters'
|
|
import { getFileUrl } from '@/filters'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { useUserStore, useGlobalStore, useNoticeStore } from '@/stores'
|
|
import { useUserStore, useGlobalStore, useNoticeStore } from '@/stores'
|
|
@@ -48,6 +50,7 @@ const componentMap = new Map<string, unknown>([
|
|
|
['notice', defineAsyncComponent(() => import('./components/notice/index.vue'))],
|
|
['notice', defineAsyncComponent(() => import('./components/notice/index.vue'))],
|
|
|
['modify', defineAsyncComponent(() => import('./components/modify/index.vue'))],
|
|
['modify', defineAsyncComponent(() => import('./components/modify/index.vue'))],
|
|
|
['cancel', defineAsyncComponent(() => import('./components/cancel/index.vue'))],
|
|
['cancel', defineAsyncComponent(() => import('./components/cancel/index.vue'))],
|
|
|
|
|
+ ['avater', defineAsyncComponent(() => import('./components/avater/index.vue'))],
|
|
|
])
|
|
])
|
|
|
|
|
|
|
|
const { componentId, openComponent, closeComponent } = useComponent()
|
|
const { componentId, openComponent, closeComponent } = useComponent()
|