From 78612ad9259b32008768b2c75ff99b1e6ee67e53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=88=B4=E9=93=AD?= Date: Tue, 23 Apr 2024 12:13:57 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AF=BB=E5=8F=96=E4=B8=AD=E6=A0=B7=E5=BC=8F?= =?UTF-8?q?=E6=9B=BF=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SwiftPamphletApp/ViewComponet/ViewComponentImage.swift | 4 +++- SwiftPamphletApp/ViewComponet/ViewStyle.swift | 8 +++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/SwiftPamphletApp/ViewComponet/ViewComponentImage.swift b/SwiftPamphletApp/ViewComponet/ViewComponentImage.swift index 98df395de..2ccb9cadf 100644 --- a/SwiftPamphletApp/ViewComponet/ViewComponentImage.swift +++ b/SwiftPamphletApp/ViewComponet/ViewComponentImage.swift @@ -37,7 +37,9 @@ struct NukeImage: View { .foregroundColor(.secondary) } } else { - ProgressView() + Image(systemName: "chart.bar.doc.horizontal") + .imageScale(.large) + .symbolEffect(.variableColor.iterative.dimInactiveLayers.reversing, isActive: state.image == nil) } } .pipeline(pipeline) diff --git a/SwiftPamphletApp/ViewComponet/ViewStyle.swift b/SwiftPamphletApp/ViewComponet/ViewStyle.swift index 18108ebbb..80070315a 100644 --- a/SwiftPamphletApp/ViewComponet/ViewStyle.swift +++ b/SwiftPamphletApp/ViewComponet/ViewStyle.swift @@ -7,6 +7,7 @@ import SwiftUI +// MARK: Text extension Text { func gradientTitle(color: Color = .primary) -> some View { self @@ -17,6 +18,7 @@ extension Text { } } +// MARK: TextEidtor extension TextEditor { func border() -> some View { self @@ -29,6 +31,10 @@ extension TextEditor { } } + +// MARK: TextField + +// 圆角 extension TextField { func rounded() -> some View { self @@ -36,8 +42,8 @@ extension TextField { } } +// MARK: Toggle struct SymbolToggleStyle: ToggleStyle { - var systemImage: String = "checkmark" var activeColor: Color = .green