2025-02-11
如果侧边栏信息过多,可以选择用可折叠菜单, 主要参数是isExpanded
可折叠菜单
isExpanded
Section(isExpanded: $isExpanded){ Text("Item 1") Text("Item 2") Text("Item 3") }
或者用DisclosureGroup
DisclosureGroup
DisclosureGroup("DisclosureGroup"){ Text("Item 1") Text("Item 2") Text("Item 3") }