-
-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathbasic.tsx
55 lines (52 loc) · 1.36 KB
/
basic.tsx
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import * as React from 'react';
import Image from 'rc-image';
import '../../assets/index.less';
export default function Base() {
return (
<div>
<Image
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
width={200}
style={{
marginRight: 24,
}}
onClick={() => {
console.log('click');
}}
preview={{
onVisibleChange: visible => {
console.log('visible', visible);
},
}}
/>
<Image
src="https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*P0S-QIRUbsUAAAAAAAAAAABkARQnAQ"
width={200}
style={{
marginRight: 24,
}}
preview={{ mask: 'Click to Preview' }}
/>
<Image
src="https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*ngiJQaLQELEAAAAAAAAAAABkARQnAQ"
width={200}
style={{
marginRight: 24,
}}
preview={{
dragRebound: false,
mask: 'close drag rebound'
}}
/>
<Image
src="https://gw.alipayobjects.com/mdn/rms_08e378/afts/img/A*NZuwQp_vcIQAAAAAAAAAAABkARQnAQ"
width={200}
/>
<Image
src="https://zos.alipayobjects.com/rmsportal/jkjgkEfvpUPVyRjUImniVslZfWPnJuuZ.png"
width={200}
height={100}
/>
</div>
);
}