You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

572 B

按钮样式

  • order: 3

按钮样式的单选组合。


var RadioButton = antd.Radio.Button;
var RadioGroup = antd.Radio.Group;

function onChange(e) {
  console.log('radio checked:' + e.target.value);
}

ReactDOM.render((
  <RadioGroup onChange={onChange} defaultValue="a">
    <RadioButton value="a">杭州</RadioButton>
    <RadioButton value="b">上海</RadioButton>
    <RadioButton value="c">北京</RadioButton>
    <RadioButton value="d">成都</RadioButton>
  </RadioGroup>
), document.getElementById('components-radio-demo-radiobutton'));