储藏室页面部分结构
This commit is contained in:
@@ -28,6 +28,9 @@
|
||||
</div>
|
||||
<template #dropdown>
|
||||
<el-dropdown-menu>
|
||||
<el-dropdown-item divided command="changecommunity">
|
||||
<span>{{ proxy.$t('navbar.community') }}</span>
|
||||
</el-dropdown-item>
|
||||
<router-link v-if="!dynamic" to="/user/profile">
|
||||
<el-dropdown-item>{{ proxy.$t('navbar.personalCenter') }}</el-dropdown-item>
|
||||
</router-link>
|
||||
@@ -88,6 +91,14 @@ const logout = async () => {
|
||||
});
|
||||
};
|
||||
|
||||
const routerPush = useRouter();
|
||||
const changecommunity = () => {
|
||||
console.log('change community');
|
||||
routerPush.push({
|
||||
path: '/community'
|
||||
});
|
||||
};
|
||||
|
||||
const emits = defineEmits(['setLayout']);
|
||||
const setLayout = () => {
|
||||
emits('setLayout');
|
||||
@@ -95,7 +106,8 @@ const setLayout = () => {
|
||||
// 定义Command方法对象 通过key直接调用方法
|
||||
const commandMap: { [key: string]: any } = {
|
||||
setLayout,
|
||||
logout
|
||||
logout,
|
||||
changecommunity
|
||||
};
|
||||
const handleCommand = (command: string) => {
|
||||
// 判断是否存在该方法
|
||||
|
||||
Reference in New Issue
Block a user