未验证 提交 16bf002c 编写于 作者: O openharmony_ci 提交者: Gitee

!7716 【轻量级 PR】:update...

!7716 【轻量级 PR】:update zh-cn/application-dev/reference/arkui-ts/ts-basic-components-checkboxgroup.md.修改代码格式
Merge pull request !7716 from 李毅/N/A
......@@ -53,45 +53,47 @@ CheckboxGroup( group?: string )
@Entry
@Component
struct CheckboxExample {
build() {
Scroll() {
Column() {
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){
CheckboxGroup({group : 'checkboxGroup'})
.selectedColor(0xed6f21)
.onChange((itemName:CheckboxGroupResult) => {
console.info("TextPicker::dialogResult is" + JSON.stringify(itemName))
})
Text('select all').fontSize(20)
}
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){
Checkbox({ name: 'checkbox1', group: 'checkboxGroup' })
.select(true)
.selectedColor(0x39a2db)
.onChange((value: boolean) => {
console.info('Checkbox1 change is' + value)
})
Text('Checkbox1').fontSize(20)
}
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){
Checkbox({ name: 'checkbox2', group: 'checkboxGroup' })
.select(false)
.selectedColor(0x39a2db)
.onChange((value: boolean) => {
console.info('Checkbox2 change is' + value)
})
Text('Checkbox2').fontSize(20)
}
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){
Checkbox({ name: 'checkbox3', group: 'checkboxGroup' })
.select(true)
.selectedColor(0x39a2db)
.onChange((value: boolean) => {
console.info('Checkbox3 change is' + value)
})
Text('Checkbox3').fontSize(20)
}
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
CheckboxGroup({ group: 'checkboxGroup' })
.selectedColor(0xed6f21)
.onChange((itemName: CheckboxGroupResult) => {
console.info("TextPicker::dialogResult is" + JSON.stringify(itemName))
})
Text('select all').fontSize(20)
}
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Checkbox({ name: 'checkbox1', group: 'checkboxGroup' })
.select(true)
.selectedColor(0x39a2db)
.onChange((value: boolean) => {
console.info('Checkbox1 change is' + value)
})
Text('Checkbox1').fontSize(20)
}
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Checkbox({ name: 'checkbox2', group: 'checkboxGroup' })
.select(false)
.selectedColor(0x39a2db)
.onChange((value: boolean) => {
console.info('Checkbox2 change is' + value)
})
Text('Checkbox2').fontSize(20)
}
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Checkbox({ name: 'checkbox3', group: 'checkboxGroup' })
.select(true)
.selectedColor(0x39a2db)
.onChange((value: boolean) => {
console.info('Checkbox3 change is' + value)
})
Text('Checkbox3').fontSize(20)
}
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册