diff --git a/examples/components/feature/src/main/ets/pages/pickers/CheckboxGroupBootcamp.ets b/examples/components/feature/src/main/ets/pages/pickers/CheckboxGroupBootcamp.ets index cd75ff8d12f..eea03efc1c6 100644 --- a/examples/components/feature/src/main/ets/pages/pickers/CheckboxGroupBootcamp.ets +++ b/examples/components/feature/src/main/ets/pages/pickers/CheckboxGroupBootcamp.ets @@ -49,7 +49,7 @@ export struct CheckboxGroupBootcamp { Column() { // 全选按钮 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { CheckboxGroup({ group: 'checkboxGroup' }) .checkboxShape(useEnabled(this.enableCheckboxGroupShape, this.checkboxGroupShape)) .enabled(useEnabled(this.enableCheckboxGroup, this.enable)) @@ -61,8 +61,9 @@ export struct CheckboxGroupBootcamp { } // 选项1 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { Checkbox({ name: 'checkbox1', group: 'checkboxGroup' }) + .shape(useEnabled(this.enableCheckboxGroupShape, this.checkboxGroupShape)) .select(true) .onChange((value: boolean) => { console.info(`Checkbox1 change is ${value}`) @@ -71,8 +72,9 @@ export struct CheckboxGroupBootcamp { } // 选项2 - Flex({ justifyContent: FlexAlign.Start, alignItems: ItemAlign.Center }) { + Flex({ justifyContent: FlexAlign.Center, alignItems: ItemAlign.Center }) { Checkbox({ name: 'checkbox2', group: 'checkboxGroup' }) + .shape(useEnabled(this.enableCheckboxGroupShape, this.checkboxGroupShape)) .onChange((value: boolean) => { console.info(`Checkbox2 change is ${value}`) }) diff --git a/examples/components/feature/src/main/ets/pages/pickers/SliderBootcamp.ets b/examples/components/feature/src/main/ets/pages/pickers/SliderBootcamp.ets index 2e67646b24f..663516b411f 100644 --- a/examples/components/feature/src/main/ets/pages/pickers/SliderBootcamp.ets +++ b/examples/components/feature/src/main/ets/pages/pickers/SliderBootcamp.ets @@ -13,7 +13,7 @@ * limitations under the License. */ -import { RadioBlock, useEnabled } from 'common'; +import { RadioBlock, useEnabled, SliderBlock } from 'common'; import { Drawer } from 'common/src/main/ets/components/Drawer'; @Component @@ -24,6 +24,8 @@ export struct SliderBootcamp { @State sliderStyle: SliderStyle = SliderStyle.OutSet; @State enableShowSteps: boolean = false; @State showSteps: boolean = false; + @State enableStep: boolean = false; + @State step: number = 1; @State enableShowTips: boolean = false; @State showTips: boolean = false; @State enableDirection: boolean = false; @@ -49,7 +51,7 @@ export struct SliderBootcamp { @Builder Content() { Column({ space: 8 }) { - Slider({ style: useEnabled(this.enableSliderStyle, this.sliderStyle) }) + Slider({ style: useEnabled(this.enableSliderStyle, this.sliderStyle), step: this.step }) .showTips(useEnabled(this.enableShowTips, this.showTips)) .showSteps(useEnabled(this.enableShowSteps, this.showSteps)) .direction(useEnabled(this.enableDirection, this.currentDirection)) @@ -80,6 +82,14 @@ export struct SliderBootcamp { ] }) + SliderBlock({ + title: '间续滑动步长', + isEnabled: this.enableStep, + value: this.step, + min: 1, + max: 20 + }) + RadioBlock({ title: '是否显示气泡', isEnabled: this.enableShowTips,