Skip to content

Commit 5e71c2e

Browse files
authored
fix: 修复overlay遮罩层demo2关闭 (#575)
1 parent 8d2e488 commit 5e71c2e

File tree

1 file changed

+8
-11
lines changed
  • packages/react-vant/src/components/overlay

1 file changed

+8
-11
lines changed

packages/react-vant/src/components/overlay/README.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,14 @@ export default () => {
5858
<Button type="primary" onClick={() => setVisible(true)}>
5959
嵌入内容
6060
</Button>
61-
<Overlay visible={visible} onClick={() => setVisible(false)}>
62-
<div
63-
style={{
64-
height: '100%',
65-
display: 'flex',
66-
alignItems: 'center',
67-
justifyContent: 'center',
68-
}}
69-
>
70-
<div style={{ width: 120, height: 120, backgroundColor: '#fff', borderRadius: 4 }} />
71-
</div>
61+
<Overlay visible={visible} onClick={() => setVisible(false)}
62+
style={{
63+
height: '100%',
64+
display: 'flex',
65+
alignItems: 'center',
66+
justifyContent: 'center',
67+
}}>
68+
<div style={{ width: 120, height: 120, backgroundColor: '#fff', borderRadius: 4 }} />
7269
</Overlay>
7370
</>
7471
);

0 commit comments

Comments
 (0)