fix: 修复账号表单输入框无法输入的问题
CI / lint-and-build (push) Has been cancelled

- 将 Form 替换为 VStack + roundedBorder TextField
This commit is contained in:
2026-06-30 08:55:19 +06:00
parent 1c8a329de3
commit 63d9d08141
@@ -81,12 +81,26 @@ struct AccountFormView: View {
Text(account == nil ? "添加账号" : "编辑账号")
.font(.title2)
Form {
TextField("名称", text: $name)
TextField("AccessKey ID", text: $accessKeyId)
SecureField(account == nil ? "AccessKey Secret" : "AccessKey Secret(留空则不修改)", text: $accessKeySecret)
TextField("Region", text: $region)
TextField("Endpoint(可选)", text: $endpoint)
VStack(alignment: .leading, spacing: 12) {
Text("名称")
TextField("用于区分不同账号", text: $name)
.textFieldStyle(.roundedBorder)
Text("AccessKey ID")
TextField("如 LTAI...", text: $accessKeyId)
.textFieldStyle(.roundedBorder)
Text(account == nil ? "AccessKey Secret" : "AccessKey Secret(留空则不修改)")
SecureField("如 8fKx...", text: $accessKeySecret)
.textFieldStyle(.roundedBorder)
Text("Region")
TextField("如 cn-shanghai", text: $region)
.textFieldStyle(.roundedBorder)
Text("Endpoint(可选)")
TextField("默认 vod.{region}.aliyuncs.com", text: $endpoint)
.textFieldStyle(.roundedBorder)
}
HStack {
@@ -101,7 +115,7 @@ struct AccountFormView: View {
}
}
.padding()
.frame(minWidth: 400)
.frame(minWidth: 450)
.onAppear {
if let account = account {
name = account.name