📅  最后修改于: 2022-03-11 15:00:58.344000             🧑  作者: Mango
import Combine
import SwiftUI
struct ContentView: View {
@State var location: String = ""
var body: some View {
TextField("Search Location", text: $location)
.onReceive(Just(location)) { location in
// print(location)
}
}
}