Skip to content

Commit 4b013c6

Browse files
committed
chore: fix ts
1 parent 7906c55 commit 4b013c6

File tree

3 files changed

+27
-9
lines changed

3 files changed

+27
-9
lines changed

docs/examples/controlledWithGroup.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,14 @@ export default function Base() {
3434
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
3535
width={200}
3636
/>
37-
<Image wrapperStyle={{ marginRight: 24, width: 200 }} src={require('./images/1.jpeg')} />
38-
<Image wrapperStyle={{ marginRight: 24, width: 200 }} src={require('./images/2.jpeg')} />
37+
<Image
38+
styles={{ root: { marginRight: 24, width: 200 } }}
39+
src={require('./images/1.jpeg')}
40+
/>
41+
<Image
42+
styles={{ root: { marginRight: 24, width: 200 } }}
43+
src={require('./images/2.jpeg')}
44+
/>
3945
</Image.PreviewGroup>
4046
</div>
4147
);

docs/examples/fallback.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import { defaultIcons } from './common';
66
export default function Base() {
77
return (
88
<Image
9-
preview={{ mask: 'preview!', icons: defaultIcons }}
9+
preview={{ cover: 'preview!', icons: defaultIcons }}
1010
src="error1"
1111
fallback="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
1212
width={200}

docs/examples/previewgroup.tsx

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,28 @@ export default function PreviewGroup() {
3535
console.log(`当前第${current}张,上一次第${prev === undefined ? '-' : prev}张`),
3636
}}
3737
>
38-
<Image wrapperStyle={{ marginRight: 24, width: 200 }} src={require('./images/1.jpeg')} />
3938
<Image
40-
wrapperStyle={{ marginRight: 24, width: 200 }}
39+
styles={{ root: { marginRight: 24, width: 200 } }}
40+
src={require('./images/1.jpeg')}
41+
/>
42+
<Image
43+
styles={{ root: { marginRight: 24, width: 200 } }}
4144
preview={false}
4245
src={require('./images/disabled.jpeg')}
4346
/>
44-
<Image wrapperStyle={{ marginRight: 24, width: 200 }} src={require('./images/2.jpeg')} />
45-
<Image wrapperStyle={{ marginRight: 24, width: 200 }} src={require('./images/3.jpeg')} />
46-
<Image wrapperStyle={{ marginRight: 24, width: 200 }} src="error" alt="error" />
47-
<Image wrapperStyle={{ marginRight: 24, width: 200 }} src={require('./images/1.jpeg')} />
47+
<Image
48+
styles={{ root: { marginRight: 24, width: 200 } }}
49+
src={require('./images/2.jpeg')}
50+
/>
51+
<Image
52+
styles={{ root: { marginRight: 24, width: 200 } }}
53+
src={require('./images/3.jpeg')}
54+
/>
55+
<Image styles={{ root: { marginRight: 24, width: 200 } }} src="error" alt="error" />
56+
<Image
57+
styles={{ root: { marginRight: 24, width: 200 } }}
58+
src={require('./images/1.jpeg')}
59+
/>
4860
</Image.PreviewGroup>
4961
</div>
5062
);

0 commit comments

Comments
 (0)