Skip to content

Commit

Permalink
读取中样式替换
Browse files Browse the repository at this point in the history
  • Loading branch information
ming1016 committed Apr 23, 2024
1 parent 32be4c5 commit 78612ad
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
4 changes: 3 additions & 1 deletion SwiftPamphletApp/ViewComponet/ViewComponentImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
8 changes: 7 additions & 1 deletion SwiftPamphletApp/ViewComponet/ViewStyle.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

import SwiftUI

// MARK: Text
extension Text {
func gradientTitle(color: Color = .primary) -> some View {
self
Expand All @@ -17,6 +18,7 @@ extension Text {
}
}

// MARK: TextEidtor
extension TextEditor {
func border() -> some View {
self
Expand All @@ -29,15 +31,19 @@ extension TextEditor {
}
}


// MARK: TextField

// 圆角
extension TextField {
func rounded() -> some View {
self
.textFieldStyle(RoundedBorderTextFieldStyle())
}
}

// MARK: Toggle
struct SymbolToggleStyle: ToggleStyle {

var systemImage: String = "checkmark"
var activeColor: Color = .green

Expand Down

0 comments on commit 78612ad

Please sign in to comment.