-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathbasic.tsx
More file actions
29 lines (27 loc) · 854 Bytes
/
basic.tsx
File metadata and controls
29 lines (27 loc) · 854 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
import React, { useState } from 'react';
import { Button } from 'antd';
import { Modal } from 'dt-react-component';
export default function Basic() {
const [visible, setVisible] = useState(false);
return (
<>
<Modal
title="最大高度限制"
open={visible}
onCancel={() => setVisible(false)}
onOk={() => setVisible(false)}
>
<ul>
{Array.from({ length: 300 }).map((_, i) => (
<li key={i} style={{ height: 30 }}>
{i}
</li>
))}
</ul>
</Modal>
<Button type="primary" onClick={() => setVisible(true)}>
最大高度限制
</Button>
</>
);
}