mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-11-03 12:57:11 +08:00
新增:新增功能权限适配及校验
1.后端 API 注解鉴权使用方式:@SaCheckPermission("system:user:add")
2.前端全局指令函数使用方式:v-permission="['system:user:add']"
3.前端权限判断函数使用方式:checkPermission(['system:user:add'])
This commit is contained in:
@@ -6,7 +6,6 @@ export default {
|
||||
'messageBox.allRead': 'All Read',
|
||||
'messageBox.viewMore': 'View More',
|
||||
'messageBox.noContent': 'No Content',
|
||||
'messageBox.switchRoles': 'Switch Roles',
|
||||
'messageBox.userCenter': 'User Center',
|
||||
'messageBox.logout': 'Logout',
|
||||
};
|
||||
|
||||
@@ -6,7 +6,6 @@ export default {
|
||||
'messageBox.allRead': '全部已读',
|
||||
'messageBox.viewMore': '查看更多',
|
||||
'messageBox.noContent': '暂无内容',
|
||||
'messageBox.switchRoles': '切换角色',
|
||||
'messageBox.userCenter': '个人中心',
|
||||
'messageBox.logout': '退出登录',
|
||||
};
|
||||
|
||||
@@ -150,14 +150,6 @@
|
||||
<img alt="avatar" :src="getAvatar(loginStore.avatar, loginStore.gender)" />
|
||||
</a-avatar>
|
||||
<template #content>
|
||||
<a-doption>
|
||||
<a-space @click="switchRoles">
|
||||
<icon-tag />
|
||||
<span>
|
||||
{{ $t('messageBox.switchRoles') }}
|
||||
</span>
|
||||
</a-space>
|
||||
</a-doption>
|
||||
<a-doption>
|
||||
<a-space @click="$router.push({ name: 'UserCenter' })">
|
||||
<icon-settings />
|
||||
@@ -183,7 +175,6 @@
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { computed, ref, inject } from 'vue';
|
||||
import { Message } from '@arco-design/web-vue';
|
||||
import { useDark, useToggle, useFullscreen } from '@vueuse/core';
|
||||
import { useAppStore, useLoginStore } from '@/store';
|
||||
import { LOCALE_OPTIONS } from '@/locale';
|
||||
@@ -242,10 +233,6 @@
|
||||
});
|
||||
triggerBtn.value.dispatchEvent(event);
|
||||
};
|
||||
const switchRoles = async () => {
|
||||
const res = await loginStore.switchRoles();
|
||||
Message.success(res as string);
|
||||
};
|
||||
const toggleDrawerMenu = inject('toggleDrawerMenu') as () => void;
|
||||
</script>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user