mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-02 16:37:53 +00:00
feat(role): 新增角色权限分配功能并优化界面显示
refactor(menu): 重构菜单类型枚举和权限数据结构 fix(log): 修复日志类型显示和查询问题 style(common): 重命名部门树格式化函数为通用树格式化函数 perf(store): 移除控制台日志输出 docs(tsconfig): 添加Vite客户端类型注释 chore(package): 调整依赖项顺序
This commit is contained in:
@@ -1,5 +1,3 @@
|
||||
|
||||
|
||||
// 问候语:根据当前小时返回不同问候语
|
||||
export function greetings () {
|
||||
// 当前时间(用于计算问候语)
|
||||
@@ -145,7 +143,7 @@ export function listToTree(list: any[]) {
|
||||
}
|
||||
|
||||
// 加载部门选项
|
||||
export function formatDeptTree(nodes: any[]): any[] {
|
||||
export function formatTree(nodes: any[]): any[] {
|
||||
return nodes.map(node => {
|
||||
const formattedNode = {
|
||||
value: node.id,
|
||||
@@ -153,7 +151,7 @@ export function formatDeptTree(nodes: any[]): any[] {
|
||||
};
|
||||
|
||||
if (node.children && node.children.length > 0) {
|
||||
Object.assign(formattedNode, { children: formatDeptTree(node.children) });
|
||||
Object.assign(formattedNode, { children: formatTree(node.children) });
|
||||
}
|
||||
|
||||
return formattedNode;
|
||||
|
||||
Reference in New Issue
Block a user