Skip to content

Commit d66eb1f

Browse files
committed
Update build vben5 tree
1 parent c82bd38 commit d66eb1f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

backend/utils/build_tree.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,16 @@ def get_vben5_tree_data(row: Sequence[RowData]) -> list[dict[str, Any]]:
9393
:param row: 原始数据行序列
9494
:return:
9595
"""
96-
# 需要移除的原始字段
97-
remove_keys = {'title', 'icon', 'link', 'cache', 'display', 'status'}
96+
meta_keys = {'title', 'icon', 'link', 'cache', 'display', 'status'}
9897

9998
vben5_nodes = [
10099
{
101-
**{k: v for k, v in node.items() if k not in remove_keys},
100+
**{k: v for k, v in node.items() if k not in meta_keys},
102101
'meta': {
103102
'title': node['title'],
104103
'icon': node['icon'],
105-
'link': node['link'],
104+
'link': node['link'] if node['type'] == 3 else '',
105+
'iframeSrc': node['link'] if node['type'] == 4 else '',
106106
'keepAlive': node['cache'],
107107
'hideInMenu': not bool(node['display']),
108108
'menuVisibleWithForbidden': not bool(node['status']),

0 commit comments

Comments
 (0)