-
Notifications
You must be signed in to change notification settings - Fork 1.8k
[webui] eslint fix #1864
[webui] eslint fix #1864
Changes from 5 commits
725c472
0c4d8d9
e2a9db5
60fa3a7
4c5fe45
336409b
1ce7067
0cdfa8a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,7 +20,7 @@ class Compare extends React.Component<CompareProps, {}> { | |
super(props); | ||
} | ||
|
||
intermediate = () => { | ||
intermediate = (): any => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what is the object type of the return value? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's hard to ensure its type. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Have you tried |
||
const { compareRows } = this.props; | ||
const trialIntermediate: Array<Intermedia> = []; | ||
const idsList: Array<string> = []; | ||
|
@@ -52,14 +52,14 @@ class Compare extends React.Component<CompareProps, {}> { | |
tooltip: { | ||
trigger: 'item', | ||
enterable: true, | ||
position: function (point: Array<number>, data: TooltipForIntermediate) { | ||
position: function (point: Array<number>, data: TooltipForIntermediate): Array<number> { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks |
||
if (data.dataIndex < length / 2) { | ||
return [point[0], 80]; | ||
} else { | ||
return [point[0] - 300, 80]; | ||
} | ||
}, | ||
formatter: function (data: TooltipForIntermediate) { | ||
formatter: function (data: TooltipForIntermediate): any { | ||
const trialId = data.seriesName; | ||
let obj = {}; | ||
const temp = trialIntermediate.find(key => key.name === trialId); | ||
|
@@ -106,7 +106,7 @@ class Compare extends React.Component<CompareProps, {}> { | |
} | ||
|
||
// render table column --- | ||
initColumn = () => { | ||
initColumn = (): any => { | ||
const idList: Array<string> = []; | ||
const sequenceIdList: Array<number> = []; | ||
const durationList: Array<number> = []; | ||
|
@@ -195,15 +195,15 @@ class Compare extends React.Component<CompareProps, {}> { | |
); | ||
} | ||
|
||
componentDidMount() { | ||
componentDidMount(): void { | ||
this._isCompareMount = true; | ||
} | ||
|
||
componentWillUnmount() { | ||
componentWillUnmount(): void { | ||
this._isCompareMount = false; | ||
} | ||
|
||
render() { | ||
render(): any{ | ||
const { visible, cancelFunc } = this.props; | ||
|
||
return ( | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can the return type be
React.ReactNode
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's right!