Button {
debugPrint("登录操作")
} label: {
Text("测试按钮")
.font(.system(size: 15))
.foregroundColor(.white)
.frame(maxWidth: .infinity)
.padding(.top,10)
.padding(.bottom,10)
}
.background(.green)
.cornerRadius(10)
.padding()
Button {
debugPrint("icon")
} label: {
Image(systemName: "applelogo")
.font(.largeTitle)
.padding()
}
.background(.orange)
.clipShape(Circle())
Button {
debugPrint("登录操作")
} label: {
HStack(alignment: .center, content: {
Image(systemName: "applelogo")
.font(.system(size: 18))
Text("测试按钮")
.font(.system(size: 18))
.foregroundColor(.white)
})
.padding()
}
.background(.green)
.cornerRadius(10)
.padding()