From 63d9d081415957aa917afd27ae07c199084516d3 Mon Sep 17 00:00:00 2001 From: William Date: Tue, 30 Jun 2026 08:55:19 +0600 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E8=B4=A6=E5=8F=B7?= =?UTF-8?q?=E8=A1=A8=E5=8D=95=E8=BE=93=E5=85=A5=E6=A1=86=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E8=BE=93=E5=85=A5=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 将 Form 替换为 VStack + roundedBorder TextField --- .../VODManager/Views/AccountListView.swift | 28 ++++++++++++++----- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/apps/macos/VODManager/Sources/VODManager/Views/AccountListView.swift b/apps/macos/VODManager/Sources/VODManager/Views/AccountListView.swift index 1c85f06..7c2dda2 100644 --- a/apps/macos/VODManager/Sources/VODManager/Views/AccountListView.swift +++ b/apps/macos/VODManager/Sources/VODManager/Views/AccountListView.swift @@ -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