Skip to content

Commit

Permalink
内容不显示问题修复
Browse files Browse the repository at this point in the history
  • Loading branch information
ming1016 committed Oct 2, 2024
1 parent 799bdf3 commit e594fff
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 41 deletions.
8 changes: 4 additions & 4 deletions SwiftPamphletApp.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -2992,7 +2992,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 22;
CURRENT_PROJECT_VERSION = 24;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"SwiftPamphletApp/Preview Content\"";
DEVELOPMENT_TEAM = 962Z8PV35L;
Expand All @@ -3007,7 +3007,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 6.6.1;
MARKETING_VERSION = 6.6.3;
OTHER_LDFLAGS = (
"-Xlinker",
"-interposable",
Expand Down Expand Up @@ -3037,7 +3037,7 @@
CODE_SIGN_IDENTITY = "Apple Development";
CODE_SIGN_STYLE = Automatic;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 22;
CURRENT_PROJECT_VERSION = 24;
DEAD_CODE_STRIPPING = YES;
DEVELOPMENT_ASSET_PATHS = "\"SwiftPamphletApp/Preview Content\"";
DEVELOPMENT_TEAM = 962Z8PV35L;
Expand All @@ -3052,7 +3052,7 @@
"@executable_path/../Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 14.0;
MARKETING_VERSION = 6.6.1;
MARKETING_VERSION = 6.6.3;
PRODUCT_BUNDLE_IDENTIFIER = com.starming.SwiftPamphletAppByMing;
PRODUCT_NAME = "戴铭的开发小册子";
PROVISIONING_PROFILE_SPECIFIER = "";
Expand Down
76 changes: 39 additions & 37 deletions SwiftPamphletApp/Guide/View/GuideListView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,47 +27,49 @@ struct GuideListView: View {
}
.padding(.top, 10)
}
SPOutlineListView(d: listModel.filtered(), c: \.sub) { i in
NavigationLink(destination: GuideDetailView(t: i.t, icon: i.icon, plName: "ap", limit: $limit, trigger: $trigger)) {
HStack(spacing:3) {
if i.icon.isEmpty == false {
Image(systemName: i.icon)
.foregroundStyle(i.sub == nil ? Color.secondary : .indigo)
} else if i.sub != nil {
Image(systemName: "folder.fill")
.foregroundStyle(.indigo)
}
Text(listModel.searchText.isEmpty == true ? GuideListModel.simpleTitle(i.t) : i.t)
Spacer()
if apBookmarks.contains(i.t) {
Image(systemName: "bookmark")
.foregroundStyle(.secondary)
.font(.footnote)
NavigationStack {
SPOutlineListView(d: listModel.filtered(), c: \.sub) { i in
NavigationLink(destination: GuideDetailView(t: i.t, icon: i.icon, plName: "ap", limit: $limit, trigger: $trigger)) {
HStack(spacing:3) {
if i.icon.isEmpty == false {
Image(systemName: i.icon)
.foregroundStyle(i.sub == nil ? Color.secondary : .indigo)
} else if i.sub != nil {
Image(systemName: "folder.fill")
.foregroundStyle(.indigo)
}
Text(listModel.searchText.isEmpty == true ? GuideListModel.simpleTitle(i.t) : i.t)
Spacer()
if apBookmarks.contains(i.t) {
Image(systemName: "bookmark")
.foregroundStyle(.secondary)
.font(.footnote)
}
}
.contentShape(Rectangle())
}
.contentShape(Rectangle())
}
}
.searchable(text: $listModel.searchText, prompt: "搜索 Apple 技术手册")
.listStyle(.sidebar)
.onChange(of: trigger, { oldValue, newValue in
updateApBookmarks()
})
.onAppear(perform: {
updateApBookmarks()
//导出内容
// listModel.buildMDContent()

})
.overlay {
if listModel.filtered().isEmpty {
ContentUnavailableView {
Label("无结果", systemImage: "rectangle.and.text.magnifyingglass")
} description: {
Text("请再次输入")
.searchable(text: $listModel.searchText, prompt: "搜索 Apple 技术手册")
.listStyle(.sidebar)
.onChange(of: trigger, { oldValue, newValue in
updateApBookmarks()
})
.onAppear(perform: {
updateApBookmarks()
//导出内容
// listModel.buildMDContent()
})
.overlay {
if listModel.filtered().isEmpty {
ContentUnavailableView {
Label("无结果", systemImage: "rectangle.and.text.magnifyingglass")
} description: {
Text("请再次输入")
}
}
}
} // end overlay
} // end overlay
}
}

func updateApBookmarks() {
Expand Down

0 comments on commit e594fff

Please sign in to comment.