fix Login
This commit is contained in:
parent
c84bd4d12d
commit
21be7cef58
@ -51,12 +51,13 @@ struct LoginView: View {
|
|||||||
|
|
||||||
// 动态内容区
|
// 动态内容区
|
||||||
ZStack {
|
ZStack {
|
||||||
if authMethod == .token {
|
switch authMethod {
|
||||||
LoginTokenView()
|
case .account:
|
||||||
.transition(.move(edge: .trailing).combined(with: .opacity))
|
|
||||||
} else {
|
|
||||||
LoginAccountView(username: self.username ?? "")
|
LoginAccountView(username: self.username ?? "")
|
||||||
.transition(.move(edge: .leading).combined(with: .opacity))
|
.transition(.move(edge: .leading).combined(with: .opacity))
|
||||||
|
case .token:
|
||||||
|
LoginTokenView()
|
||||||
|
.transition(.move(edge: .trailing).combined(with: .opacity))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.animation(.spring(response: 0.3, dampingFraction: 0.8), value: authMethod)
|
.animation(.spring(response: 0.3, dampingFraction: 0.8), value: authMethod)
|
||||||
@ -77,7 +78,6 @@ struct LoginView: View {
|
|||||||
.padding(.bottom, 20)
|
.padding(.bottom, 20)
|
||||||
}
|
}
|
||||||
.frame(width: 380, height: 520)
|
.frame(width: 380, height: 520)
|
||||||
.ignoresSafeArea()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user