Skip to content

Commit a308ae7

Browse files
committed
fix: 不要中间节点
1 parent 5362a69 commit a308ae7

File tree

4 files changed

+4
-14
lines changed

4 files changed

+4
-14
lines changed

src/packages/checkbox/demos/h5/demo2.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,7 @@ const Demo2 = () => {
3737
value={controlledGroup}
3838
onChange={(value) => setControlledGroup(value)}
3939
>
40-
<span>
41-
<Checkbox value="1" label={optionsDemo1[0].label} />
42-
</span>
40+
<Checkbox value="1" label={optionsDemo1[0].label} />
4341
<Checkbox value="2" label={optionsDemo1[1].label} />
4442
<Checkbox value="3" disabled label={optionsDemo1[2].label} />
4543
</Checkbox.Group>

src/packages/checkbox/demos/h5/demo3.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,7 @@ const Demo3 = () => {
3030
</Cell>
3131
<Cell className="nut-cell">
3232
<Checkbox.Group labelPosition="left" defaultValue={['1']}>
33-
<span>
34-
<Checkbox value="1" label={optionsDemo1[0].label} />
35-
</span>
33+
<Checkbox value="1" label={optionsDemo1[0].label} />
3634
<Checkbox value="2" label={optionsDemo1[1].label} />
3735
<Checkbox value="3" label={optionsDemo1[2].label} />
3836
</Checkbox.Group>

src/packages/checkbox/demos/taro/demo2.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React, { useState } from 'react'
22
import { Cell, Checkbox } from '@nutui/nutui-react-taro'
33
import { Checklist } from '@nutui/icons-react-taro'
4-
import { View } from '@tarojs/components'
54

65
const Demo2 = () => {
76
const [controlled, setControlled] = useState(false)
@@ -37,9 +36,7 @@ const Demo2 = () => {
3736
value={controlledGroup}
3837
onChange={(value) => setControlledGroup(value)}
3938
>
40-
<View>
41-
<Checkbox value="1" label={optionsDemo1[0].label} />
42-
</View>
39+
<Checkbox value="1" label={optionsDemo1[0].label} />
4340
<Checkbox value="2" label={optionsDemo1[1].label} />
4441
<Checkbox value="3" disabled label={optionsDemo1[2].label} />
4542
</Checkbox.Group>

src/packages/checkbox/demos/taro/demo3.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import React, { useState } from 'react'
22
import { Checkbox, Cell } from '@nutui/nutui-react-taro'
3-
import { View } from '@tarojs/components'
43

54
const Demo3 = () => {
65
const [checked, setChecked] = useState(true)
@@ -31,9 +30,7 @@ const Demo3 = () => {
3130
</Cell>
3231
<Cell className="nut-cell">
3332
<Checkbox.Group labelPosition="left" defaultValue={['1']}>
34-
<View>
35-
<Checkbox value="1" label={optionsDemo1[0].label} />
36-
</View>
33+
<Checkbox value="1" label={optionsDemo1[0].label} />
3734
<Checkbox value="2" label={optionsDemo1[1].label} />
3835
<Checkbox value="3" label={optionsDemo1[2].label} />
3936
</Checkbox.Group>

0 commit comments

Comments
 (0)