未验证 提交 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,19 +53,19 @@ CheckboxGroup( group?: string ) ...@@ -53,19 +53,19 @@ CheckboxGroup( group?: string )
@Entry @Entry
@Component @Component
struct CheckboxExample { struct CheckboxExample {
build() { build() {
Scroll() { Scroll() {
Column() { Column() {
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){ Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
CheckboxGroup({group : 'checkboxGroup'}) CheckboxGroup({ group: 'checkboxGroup' })
.selectedColor(0xed6f21) .selectedColor(0xed6f21)
.onChange((itemName:CheckboxGroupResult) => { .onChange((itemName: CheckboxGroupResult) => {
console.info("TextPicker::dialogResult is" + JSON.stringify(itemName)) console.info("TextPicker::dialogResult is" + JSON.stringify(itemName))
}) })
Text('select all').fontSize(20) Text('select all').fontSize(20)
} }
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Checkbox({ name: 'checkbox1', group: 'checkboxGroup' }) Checkbox({ name: 'checkbox1', group: 'checkboxGroup' })
.select(true) .select(true)
.selectedColor(0x39a2db) .selectedColor(0x39a2db)
...@@ -74,7 +74,8 @@ struct CheckboxExample { ...@@ -74,7 +74,8 @@ struct CheckboxExample {
}) })
Text('Checkbox1').fontSize(20) Text('Checkbox1').fontSize(20)
} }
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Checkbox({ name: 'checkbox2', group: 'checkboxGroup' }) Checkbox({ name: 'checkbox2', group: 'checkboxGroup' })
.select(false) .select(false)
.selectedColor(0x39a2db) .selectedColor(0x39a2db)
...@@ -83,7 +84,8 @@ struct CheckboxExample { ...@@ -83,7 +84,8 @@ struct CheckboxExample {
}) })
Text('Checkbox2').fontSize(20) Text('Checkbox2').fontSize(20)
} }
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }){
Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) {
Checkbox({ name: 'checkbox3', group: 'checkboxGroup' }) Checkbox({ name: 'checkbox3', group: 'checkboxGroup' })
.select(true) .select(true)
.selectedColor(0x39a2db) .selectedColor(0x39a2db)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册