mirror of
https://github.com/fastapiadmin/FastapiAdmin.git
synced 2026-10-02 08:29:21 +00:00
feat: 新增权限指令并集成到多个页面组件
refactor(backend): 重构数据库模型和初始化逻辑 fix(frontend): 修复权限指令在多个组件中的使用问题 perf(backend): 优化数据库连接和初始化性能 docs: 更新低代码生成器的README文档 style: 清理无用代码和注释 chore: 移除不再需要的依赖项 test: 更新用户权限相关测试用例 ci: 更新CI配置以支持新的权限检查 build: 更新依赖项版本
This commit is contained in:
@@ -104,19 +104,6 @@ export function getRangeDate(startDate: string | number | Date, endDate: string
|
||||
return targetArr;
|
||||
}
|
||||
|
||||
|
||||
// export function listToTree(list) {
|
||||
// let resultList = list.filter((item) => {
|
||||
// let children = list.filter((child) => {
|
||||
// return item.id === child.parent_id;
|
||||
// });
|
||||
// if (children.length > 0) {
|
||||
// item.children = children;
|
||||
// }
|
||||
// return item.parent_id === null;
|
||||
// });
|
||||
// return cloneDeep(resultList);
|
||||
// }
|
||||
export function listToTree(list: any[]) {
|
||||
const map: { [key: string | number]: any } = {};
|
||||
// 创建映射表,保留每个节点的 parent_id 等原始字段
|
||||
|
||||
Reference in New Issue
Block a user