
回复
添加资源
添加资源将有机会获得更多曝光,你也可以直接关联已上传资源
去关联
Material component radio design in OpenHarmony.
Install using npm
npm i ohos-material-radio
Details about OpenHarmony NPM environment configuration, see at here
import { RadioButton, RadioGroup, RadioOption, RadioModel } from '@ohos/material-radio'
private radioModel: RadioModel = new RadioModel(1, "Radio Label")
RadioButton({
checked: true,
model: this.radioModel,
onCheckChange: (selectedRadioId) => {
console.log("Selected Radio Button Id:: " + selectedRadioId);
}
})
RadioGroup(
{
selectedRadioId: 1,
options: [new RadioOption(1, "Option 1"), new RadioOption(2, "Option 2")],
onCheckChange: (selectedRadioId) => {
console.log("Selected Radio Button Id:: " + selectedRadioId);
}
}
)
Supports OpenHarmony API version 8
If you find any problems during usage, you can submit an Issue to us. Of course, we also welcome you to send us PR.
This project is based on Apache License 2.0, please enjoy and participate in open source freely.
Design by : Dharma Seelan