perf(efficiency): 落实首批采样减负与发行包瘦身
This commit is contained in:
@@ -5,7 +5,6 @@ struct MetricRingGauge: View {
|
||||
let title: LocalizedStringKey
|
||||
let value: Double?
|
||||
let color: Color
|
||||
@Environment(\.accessibilityReduceMotion) private var reduceMotion
|
||||
|
||||
private var fraction: Double { value.flatMap { $0.isFinite ? min(1, max(0, $0)) : nil } ?? 0 }
|
||||
|
||||
@@ -16,7 +15,6 @@ struct MetricRingGauge: View {
|
||||
Circle().trim(from: 0, to: fraction)
|
||||
.stroke(color, style: StrokeStyle(lineWidth: 3, lineCap: .round))
|
||||
.rotationEffect(.degrees(-90))
|
||||
.animation(reduceMotion ? nil : .easeInOut(duration: 0.35), value: fraction)
|
||||
AnimatedMetricText(value: MetricFormat.percent(value)).font(.system(size: 8, weight: .semibold))
|
||||
.lineLimit(1).minimumScaleFactor(0.6).frame(width: 18, height: 12)
|
||||
}.padding(2).frame(width: 28, height: 28).accessibilityHidden(true)
|
||||
|
||||
Reference in New Issue
Block a user