@beisen-phoenix/mobile-radio

单选。

Usage no npm install needed!

<script type="module">
  import beisenPhoenixMobileRadio from 'https://cdn.skypack.dev/@beisen-phoenix/mobile-radio';
</script>

README

单选。

概述

用于单项选择

API

RadioGroup

参数 说明 类型 默认值
options 可选项 Array
value 指定选中的选项 string / number
defaultValue 默认选中的选项 string number
icon 选择时的自定义icon 不传则为默认的 React.ReactNode RadioIcon
translation 语言包 用于翻译组件内置常量 {empty: string} {empty: '暂时没有信息哦~'}
onChange 变化时回调函数 (checkedValue: string / number ,checkItem: {text: any,value: any,checked?: boolean,disabled?: boolean}) => void
allowClear 是否允许显示清空选项 boolean false

RadioGroupWithFooter

参数 说明 类型 默认值
options 可选项 Array
value 指定选中的选项 Array<string / number>
defaultValue 默认选中的选项 Array<string / number>
icon 选择时的自定义icon 不传则为默认的 React.ReactNode RadioIcon
translation 语言包 用于翻译组件内置常量 {cancel: string,clear: string,empty: string} {empty: '暂时没有信息哦~',clear: '清空',cancel: '取消'}
onChange 变化时回调函数 (checkedValue: string / number ,checkItem: {text: any,value: any,checked?: boolean,disabled?: boolean}) => void
onCancel 点击取消按钮时的回调 () => void
allowClear 是否允许显示清空选项 boolean false