Skip to content

Commit 9ab7fde

Browse files
committed
format
1 parent 1f6b233 commit 9ab7fde

File tree

2 files changed

+26
-4
lines changed

2 files changed

+26
-4
lines changed

SwiftPamphletApp/Guide/Bookmark/View/BookmarkListView.swift

+9-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,15 @@ struct BookmarkListView: View {
1717
var body: some View {
1818
List {
1919
ForEach(bms) { bm in
20-
NavigationLink(destination: GuideDetailView(t: bm.name, icon: bm.icon, plName: bm.pamphletName, limit: $limit, trigger: $trigger)) {
20+
NavigationLink(
21+
destination: GuideDetailView(
22+
t: bm.name,
23+
icon: bm.icon,
24+
plName: bm.pamphletName,
25+
limit: $limit,
26+
trigger: $trigger
27+
)
28+
) {
2129
HStack {
2230
if bm.icon.isEmpty == false {
2331
Image(systemName: bm.icon)

SwiftPamphletApp/Guide/View/GuideListView.swift

+17-3
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,15 @@ struct GuideListView: View {
2929
}
3030
NavigationStack {
3131
SPOutlineListView(d: listModel.filtered(), c: \.sub) { i in
32-
NavigationLink(destination: GuideDetailView(t: i.t, icon: i.icon, plName: "ap", limit: $limit, trigger: $trigger)) {
32+
NavigationLink(
33+
destination: GuideDetailView(
34+
t: i.t,
35+
icon: i.icon,
36+
plName: "ap",
37+
limit: $limit,
38+
trigger: $trigger
39+
)
40+
) {
3341
HStack(spacing:3) {
3442
if i.icon.isEmpty == false {
3543
Image(systemName: i.icon)
@@ -49,7 +57,10 @@ struct GuideListView: View {
4957
.contentShape(Rectangle())
5058
}
5159
}
52-
.searchable(text: $listModel.searchText, prompt: "搜索 Apple 技术手册")
60+
.searchable(
61+
text: $listModel.searchText,
62+
prompt: "搜索 Apple 技术手册"
63+
)
5364
.listStyle(.sidebar)
5465
.onChange(of: trigger, { oldValue, newValue in
5566
updateApBookmarks()
@@ -63,7 +74,10 @@ struct GuideListView: View {
6374
.overlay {
6475
if listModel.filtered().isEmpty {
6576
ContentUnavailableView {
66-
Label("无结果", systemImage: "rectangle.and.text.magnifyingglass")
77+
Label(
78+
"无结果",
79+
systemImage: "rectangle.and.text.magnifyingglass"
80+
)
6781
} description: {
6882
Text("请再次输入")
6983
}

0 commit comments

Comments
 (0)