我有这样的看法:
struct LoginButton : View {
@Binding var showToastWrongLogin: Bool
var body: some View{
Button(action: {
Task {
等待Login.check Input()
}
}) {
Text("Login")
.padding(.vertical)
.frame(maxWidth: .infinity)
.foregroundColor(Color("ColorText"))
.overlay(
RoundedRectangle(cornerRadius: 5)
.stroke(Color.white, lineWidth: 0))
}
.background(Color("BtnDefaultBG"))
.frame(minWidth: 0, maxWidth: .infinity)
.cornerRadius(5)
.padding(.top, 16)
}
}
我正在try 调用位于Login内部的check Input()函数,该函数也是从其中调用此视图的
等待Login.check Input()
提供:
Instance member 'checkInput' cannot be used on type 'Login'; did you mean to use a value of this type instead?
请帮帮忙