feat: 资源操作统一管理&容器操作

This commit is contained in:
meilin.huang
2025-08-31 21:46:10 +08:00
parent c86f2ad412
commit e02ecf053f
101 changed files with 8206 additions and 3411 deletions

View File

@@ -5,7 +5,7 @@ import { useUserInfo } from '@/store/userInfo';
* @param code 权限code
* @returns
*/
export function hasPerm(code: string) {
export function hasPerm(code: string): boolean {
if (!code) {
return true;
}
@@ -17,7 +17,7 @@ export function hasPerm(code: string) {
* @returns {"xxx:save": true} key->permission code
* @param permCodes
*/
export function hasPerms(permCodes: any[]) {
export function hasPerms(permCodes: any[]): Record<string, boolean> {
const res = {} as { [key: string]: boolean };
for (let permCode of permCodes) {
if (hasPerm(permCode)) {