1、效果
2、代码
@Entry
@Component
struct Index {
@State message: string = 'Hello World'
build() {
Column() {
Row() {
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(false).height(100)
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(false).height(100)
}.justifyContent(FlexAlign.SpaceBetween)
.padding({
left: 50,
right: 50
})
.margin({
top: 40
})
.width("100%")
Row() {
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(false).height(100)
}
Row() {
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(false).height(100)
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(false).height(100)
}.justifyContent(FlexAlign.SpaceBetween)
.padding({
left: 50,
right: 50
})
.width("100%")
Row() {
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(false).height(100)
}.justifyContent(FlexAlign.End)
.padding({
left: 50,
right: 50
})
.margin({
top: 40
})
.width("100%")
Row() {
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(false).height(100)
}
Row() {
Radio({ value: 'Radio1', group: 'radioGroup' })
.checked(false).height(100)
}.justifyContent(FlexAlign.SpaceBetween)
.padding({
left: 50,
right: 50
})
.width("100%")
}
.height('100%')
}
}