fix(ios): 修复三元表达式 Color/LinearGradient 类型不匹配

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
wangdl 2026-05-27 21:34:25 +08:00
parent e80f8af79b
commit 942c3e8454

View File

@ -29,7 +29,7 @@ struct CreateLibraryPage: View {
Text("创建").font(.system(size: 14, weight: .bold))
}
.foregroundColor(.white).frame(maxWidth: .infinity).frame(height: 52)
.background(name.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ? Color.zxHairlineStrong : ZXGradient.ctaPurple)
.background(name.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty ? AnyView(Color.zxHairlineStrong) : AnyView(ZXGradient.ctaPurple))
.clipShape(RoundedRectangle(cornerRadius: 16))
}
.disabled(isCreating || name.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty)