refactor: refactored multi-language modules to support lazy loading and remote loading

This commit is contained in:
Vben
2021-02-27 23:08:12 +08:00
parent f57eb944ed
commit f6cef1088d
47 changed files with 353 additions and 284 deletions

View File

@@ -58,7 +58,7 @@ export function usePermission() {
return def;
}
if (!isArray(value)) {
return userStore.getRoleListState.includes(value as RoleEnum);
return userStore.getRoleListState?.includes(value as RoleEnum);
}
return (intersection(value, userStore.getRoleListState) as RoleEnum[]).length > 0;
}