如何将导航“返回按钮”(它是自动创建的)的颜色更改为黑色, 和 DisclosureGroup "Chevron" 的颜色变成另一种颜色?
我已经尝试过 .buttonStyle(PlainButtonStyle())
和 .foregroundColor(.black)
struct ContentView: View {
var body: some View {
NavigationView {
NavigationLink(destination: DetailView()) {
Text("Go to details ->")
.foregroundColor(.purple)
.underline()
}
}
}
}
struct DetailView: View {
@State private var isExpanded = false
var body: some View {
VStack {
DisclosureGroup("All Details", isExpanded: $isExpanded) {
}.buttonStyle(PlainButtonStyle())
.foregroundColor(.black)
Spacer()
}
.padding()
}
}
答案 0 :(得分:3)
在这种情况下使用 val
const Joi = require('joi')
let externalVar = true
module.exports = Joi.object({
username: Joi.string().alphanum().min(3).max(30).required(),
password: Joi.string().pattern( /^[a-zA-Z0-9]{3,30}$/ ).required(),
// here
role: Joi.number().when(externalVar, { is: false, then: Joi.required(), otherwise: null })
})
添加
<input id="drop" type="checkbox"/>