1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-02 15:38:15 +00:00

optimized code style

This commit is contained in:
shanshuirenjia
2018-12-18 10:36:42 +08:00
parent 93b619899f
commit c2266f9af1
3 changed files with 6 additions and 2 deletions

View File

@@ -8,12 +8,14 @@ import { Utils } from '../../utils/utils';
import { seafileAPI } from '../../utils/seafile-api.js'; import { seafileAPI } from '../../utils/seafile-api.js';
class GroupItem extends React.Component { class GroupItem extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
isOperationShow: false isOperationShow: false
}; };
} }
onMouseEnter = () => { onMouseEnter = () => {
this.setState({isOperationShow: true}); this.setState({isOperationShow: true});
} }

View File

@@ -7,12 +7,14 @@ import { Button, Input } from 'reactstrap';
import { seafileAPI } from '../../utils/seafile-api.js'; import { seafileAPI } from '../../utils/seafile-api.js';
class UserItem extends React.Component { class UserItem extends React.Component {
constructor(props) { constructor(props) {
super(props); super(props);
this.state = { this.state = {
isOperationShow: false isOperationShow: false
}; };
} }
onMouseEnter = () => { onMouseEnter = () => {
this.setState({isOperationShow: true}); this.setState({isOperationShow: true});
} }

View File

@@ -46,14 +46,14 @@ class RepoListItem extends React.Component {
<span className="icon far fa-folder"></span> <span className="icon far fa-folder"></span>
<span className="name">{this.props.repo.repo_name}</span> <span className="name">{this.props.repo.repo_name}</span>
</span> </span>
{ {this.state.isShowChildren && (
<DirentListView <DirentListView
repo={this.props.repo} repo={this.props.repo}
isShowChildren={this.state.isShowChildren} isShowChildren={this.state.isShowChildren}
onDirentItemClick={this.onDirentItemClick} onDirentItemClick={this.onDirentItemClick}
selectedPath={this.props.selectedPath} selectedPath={this.props.selectedPath}
/> />
} )}
</li> </li>
); );
} }