perf(efficiency): 落实首批采样减负与发行包瘦身
This commit is contained in:
@@ -1,15 +1,12 @@
|
||||
import SwiftUI
|
||||
|
||||
/// The same system numeric roll/blur transition as the original metric rows.
|
||||
/// Static numbers avoid per-sample glyph rasterization and transition caches.
|
||||
struct AnimatedMetricText: View {
|
||||
let value: String
|
||||
@Environment(\.accessibilityReduceMotion) private var reduceMotion
|
||||
|
||||
var body: some View {
|
||||
Text(verbatim: value)
|
||||
.monospacedDigit()
|
||||
.contentTransition(.numericText())
|
||||
.animation(reduceMotion ? nil : .spring(duration: 0.35, bounce: 0), value: value)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user