Skip to content

Commit

Permalink
report filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Allen Zhang (张涛) committed Feb 22, 2024
1 parent ef7537b commit 0d0a8ed
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 13 deletions.
1 change: 0 additions & 1 deletion packages/canyon-report/dev.md

This file was deleted.

32 changes: 20 additions & 12 deletions packages/canyon-report/src/Report/components/IstanbulReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -137,18 +137,26 @@ const IstanbulReport: FC<IstanbulReportProps> = ({
<Th />
<tbody>
{/*// @ts-ignore*/}
{summaryTreeItem.children.map(({ path, summary }) => {
return (
<Tr
setActivePath={(p) => {
setActivePath(p);
}}
path={path}
item={summary}
watermarks={watermarks}
/>
);
})}
{summaryTreeItem.children
.filter(
(item) =>
// 过滤掉这些
!['index.android.js', 'index.ios.js'].some((str) => {
return item.path.includes(str);
}),
)
.map(({ path, summary }) => {
return (
<Tr
setActivePath={(p) => {
setActivePath(p);
}}
path={path}
item={summary}
watermarks={watermarks}
/>
);
})}
</tbody>
</table>
</div>
Expand Down

0 comments on commit 0d0a8ed

Please sign in to comment.