mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-04 16:31:13 +00:00
Repair eslint wraning (#2453)
This commit is contained in:
@@ -1,7 +1,19 @@
|
||||
import React from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import { serviceUrl } from '../../utils/constants';
|
||||
import OperationGroup from '../dirent-operation/operation-group';
|
||||
|
||||
const propTypes = {
|
||||
isItemFreezed: PropTypes.bool.isRequired,
|
||||
node: PropTypes.object.isRequired,
|
||||
needOperationGroup: PropTypes.bool.isRequired,
|
||||
onItemMenuHide: PropTypes.func.isRequired,
|
||||
onItemMenuShow: PropTypes.func.isRequired,
|
||||
onMainNodeClick: PropTypes.func.isRequired,
|
||||
onDelete: PropTypes.func.isRequired,
|
||||
onDownload: PropTypes.func.isRequired,
|
||||
};
|
||||
|
||||
class TreeDirList extends React.Component {
|
||||
|
||||
constructor(props) {
|
||||
@@ -68,7 +80,7 @@ class TreeDirList extends React.Component {
|
||||
return (
|
||||
<tr className={this.state.highlight ? 'tr-highlight' : ''} onMouseEnter={this.onMouseEnter} onMouseLeave={this.onMouseLeave} onMouseOver={this.onMouseOver}>
|
||||
<td className="icon">
|
||||
<img src={node.type === 'dir' ? serviceUrl + '/media/img/folder-192.png' : serviceUrl + '/media/img/file/192/txt.png'}></img>
|
||||
<img src={node.type === 'dir' ? serviceUrl + '/media/img/folder-192.png' : serviceUrl + '/media/img/file/192/txt.png'} alt='icon'></img>
|
||||
</td>
|
||||
<td className="name a-simulate" onClick={this.onMainNodeClick}>{node.name}</td>
|
||||
{
|
||||
@@ -93,4 +105,6 @@ class TreeDirList extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
TreeDirList.propTypes = propTypes;
|
||||
|
||||
export default TreeDirList;
|
||||
|
@@ -11,7 +11,7 @@ const propTypes = {
|
||||
node: PropTypes.object.isRequired,
|
||||
onMainNodeClick: PropTypes.func.isRequired,
|
||||
onDeleteItem: PropTypes.func.isRequired,
|
||||
}
|
||||
};
|
||||
|
||||
class TreeDirView extends React.Component {
|
||||
|
||||
|
Reference in New Issue
Block a user