- 将 Form 替换为 VStack + roundedBorder TextField
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user