答案 0 :(得分:3)
要获得快速详细信息 - 使用默认键盘映射在Windows上调用import React, { Component, PropTypes } from 'react'
import RaisedButton from 'material-ui/RaisedButton'
import Appbar from 'material-ui/AppBar'
import { Tabs, Tab } from 'material-ui/Tabs'
import SwipeableViews from 'react-swipeable-views'
import FloatingActionButton from 'material-ui/FloatingActionButton'
import ContentAdd from 'material-ui/svg-icons/content/add'
class Hello extends Component {
constructor(){
this.state = {
tabSelected: 0,
tabHeight:0
}
}
componentDidMount() {
console.log(this.tab)
let height = this.tab.height
this.setState({tabHeight: height})
console.log(height)
}
handleChange = value => this.setState({tabSelected: value})
render(){
return(
<div>
<Appbar style={{
backgroundColor: '#3e9bbe',
position:'fixed',
top:0,
left:0,
height:60
}}
title='Static Appbar'
/>
<div>
<Tabs
ref={(tab) => this.tab = tab}
style={{position:'fixed',
top:60,
left:0,
minheight:'100%',
minWidth:'100%'}}
onChange={this.handleChange}
value={this.state.tabSelected}
>
<Tab label="Info" value={0} />
<Tab label="Questions" value={1} />
<Tab label="Discussion" value={2} />
</Tabs>
</div>
<div style={{position:'fixed', top:120, left:0, minWidth:'100%'}}>
<SwipeableViews
index={this.state.tabSelected}
onChangeIndex={this.handleChange}>
<div key='Tab1' style={{position:'relative', width:'100%', height:'calc(99vh - 60px - 48px)', overflow:'scroll'}}>
<h1>TAB1</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum tempus mi vitae iaculis iaculis. Aenean blandit maximus tortor, accumsan lobortis augue ultricies mattis. Cras in gravida lacus. Duis ac purus ex. Sed volutpat diam vitae velit vulputate ullamcorper. Donec interdum id augue quis suscipit. Pellentesque iaculis vulputate lectus, id porttitor mauris mollis in. Sed convallis sapien non eros eleifend condimentum. Etiam dictum vitae nibh sit amet varius. Nam eget interdum tellus. Donec dignissim, tortor id imperdiet ......
</p>
<FloatingActionButton style={{position:'fixed', bottom:10, right:'calc(30px - 100vw * 1)'}} onClick={() => alert('Tab 2')}>
<ContentAdd />
</FloatingActionButton>
</div>
<div key='Tab3' style={{position:'relative', width:'100%', height:500, overflow:'scroll'}}>
<h1>TAB3</h1>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum tempus mi vitae iaculis iaculis. Aenean blandit maximus tortor, accumsan lobortis augue ultricies mattis. Cras in gravida lacus. Duis ac purus ex. Sed volutpat diam vitae velit vulputate ullamcorper. Donec interdum id augue quis suscipit. Pellentesque iaculis vulputate lectus, id porttitor mauris mollis in. Sed convallis sapien non eros eleifend condimentum. Etiam dictum vitae nibh sit amet varius. Nam eget interdum tellus. Donec dignissim, tortor id imperdiet egestas, velit lorem interdum purus, nec ultrices ante eros non ligula.
{+ More}
</p>
<FloatingActionButton style={{position:'fixed', bottom:10, right:'calc(30px - 100vw * 2'}} onClick={() => alert('Tab 3')}>
<ContentAdd />
</FloatingActionButton>
</div>
</SwipeableViews>
</div>
</div>
)
}
}
export default Hello
( Ctrl + Q ),同时将符号放在所需的符号(类/函数/变量/等)上
https://www.jetbrains.com/help/phpstorm/inline-documentation.html#d427447e209
要提供简短的工具提示 - 只需按住 Ctrl 键即可将鼠标悬停在功能上。
自动显示“快速文档”窗口(无需手动调用) - 启用相应的配置选项:
View | Quick Documentation
注意:因为弹出窗口非常大...让它自动弹出是不太实际的,因为它会覆盖相当多的屏幕空间 - 可能会覆盖很少的下一行/上一行代码有趣的是同时看到。