|
|
@@ -23,6 +23,8 @@
|
|
|
<el-dropdown-menu>
|
|
|
<el-dropdown-item :icon="Unlock"
|
|
|
@click="openComponent('modify')">修改密码</el-dropdown-item>
|
|
|
+ <el-dropdown-item :icon="Delete"
|
|
|
+ @click="openComponent('cancel')">注销账户</el-dropdown-item>
|
|
|
<el-dropdown-item :icon="SwitchButton"
|
|
|
@click="eventBus.$emit('LogoutNotify')">退出登录</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
@@ -35,7 +37,7 @@
|
|
|
|
|
|
<script lang="ts" setup>
|
|
|
import { ref, onMounted, computed, defineAsyncComponent } from 'vue'
|
|
|
-import { SwitchButton, Unlock } from '@element-plus/icons-vue'
|
|
|
+import { SwitchButton, Unlock, Delete } from '@element-plus/icons-vue'
|
|
|
import { getFileUrl } from '@/filters'
|
|
|
import { useComponent } from '@/hooks/component'
|
|
|
import { useUserStore, useGlobalStore, useNoticeStore } from '@/stores'
|
|
|
@@ -45,6 +47,7 @@ import AppIcon from '@pc/components/base/icon/index.vue'
|
|
|
const componentMap = new Map<string, unknown>([
|
|
|
['notice', defineAsyncComponent(() => import('./components/notice/index.vue'))],
|
|
|
['modify', defineAsyncComponent(() => import('./components/modify/index.vue'))],
|
|
|
+ ['cancel', defineAsyncComponent(() => import('./components/cancel/index.vue'))],
|
|
|
])
|
|
|
|
|
|
const { componentId, openComponent, closeComponent } = useComponent()
|