File tree Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Expand file tree Collapse file tree 2 files changed +9
-5
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @alitajs/hooks" ,
3
- "version" : " 0.0.1 " ,
3
+ "version" : " 0.0.2 " ,
4
4
"description" : " Awesome react hooks" ,
5
5
"main" : " dist/index.js" ,
6
6
"module" : " dist/index.esm.js" ,
Original file line number Diff line number Diff line change @@ -29,8 +29,12 @@ React 状态钩子,用户动态获取 窗口 resize 后的值。
29
29
return (
30
30
<Fragment >
31
31
<Descriptions bordered title = " 窗口resize动态变化" >
32
- <Descriptions.Item label = " height" >{ windowSize .height } </Descriptions.Item >
33
- <Descriptions.Item label = " width" >{ windowSize .width } </Descriptions.Item >
32
+ <Descriptions.Item label = " height" >
33
+ { windowSize .height }
34
+ </Descriptions.Item >
35
+ <Descriptions.Item label = " width" >
36
+ { windowSize .width }
37
+ </Descriptions.Item >
34
38
</Descriptions >
35
39
</Fragment >
36
40
)}, [windowSize ])
@@ -50,9 +54,9 @@ React 状态钩子,用户动态获取 窗口 resize 后的值。
50
54
## API
51
55
52
56
```
53
- const windowSize = useWindowSize({waitTime: 500});
57
+ const windowSize = useWindowSize({ waitTime: 500 });
54
58
55
- params: { waitTime?: number}
59
+ params: { waitTime?: number }
56
60
```
57
61
58
62
## 结果
You can’t perform that action at this time.
0 commit comments