提交 21605c97 编写于 作者: O oasis-cloud

chore: 增加对 props 的受控和非受控的封装

上级 56f96c29
......@@ -44,7 +44,7 @@ test('should fireEvent correctly', () => {
<CheckboxGroup
data-testid="group"
className="test"
checkedValue={['1']}
defaultValue={['1']}
onChange={handleChange}
>
<Checkbox checked={false} label="1">
......@@ -72,7 +72,7 @@ test('should fireEvent correctly', () => {
test('Render checkboxs by configuring options', () => {
const CheckboxGroupOptions = () => {
const [checkedValue] = useState(['1'])
const [defaultValue] = useState(['1'])
const [optionsDemo1, setOptionsDemo1] = useState([
{
label: '选项一',
......@@ -91,7 +91,7 @@ test('Render checkboxs by configuring options', () => {
return (
<>
<CheckboxGroup
checkedValue={checkedValue}
defaultValue={defaultValue}
options={optionsDemo1}
></CheckboxGroup>
</>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册