我想要文本字段的底部边框作为以下设计
我的代码
ZStack {
RoundedRectangle(cornerRadius: 6)
.fill(LinearGradient(colors: [Color("#B37CFA").opacity(0.5),Color("#2A5389").opacity(0.5),Color("#2DB854").opacity(0.5)], startPoint: .leading, endPoint: .trailing))
.frame(height: 50)
.mask(
Rectangle()
.frame(height: 20)
.cornerRadius(10, corners: [.bottomLeft, .bottomRight])
)
}