0.6.5 • Published 12 months ago

@lx-react-materiel/mp-radio v0.6.5

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
12 months ago

mp-radio

单选框

该组件只能在 Taro3 中使用

代码示例

import MpRadio from '@lx-react-materiel/mp-radio';

const Demo = () => {
  const [type, setType] = useState(1);

  const options = [{
    lable: 'AA',
    value: 1,
  }, {
    lable: 'BB',
    value: 2,
  }];
  return (
    <MpRadio
      options={options}
      value={type}
      align="space-around"
      onChange={(v) => setType(v)}
    />
  )
};

API

Props

参数说明类型默认值必填
options配置选项Array<{ label: string value: any disabled?: boolean }>--
value选中值any--
color选中时颜色string'#1677fe'
align排列方式'row' | 'col' | 'space-around'row'

Events

事件说明回调参数
onChange选择回调选中的 Radio value
0.6.3

12 months ago

0.6.3-beta.0

12 months ago

0.6.5

12 months ago

0.6.4

12 months ago

0.5.0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.1.0

3 years ago

0.0.1-beta.0

3 years ago