首页 > TAG信息列表 > refId

SwiftUI View初始化复杂数据

问题重现 @State不生效 struct ProductDetailView: View { @State private var product: ProductModel init(refId: String) { let mProduct = AppLocalAPI.findProduct(refId: refId) _product = State(initialValue: mProduct) } var body