mirror of
https://github.com/zhigang1992/react-native-web.git
synced 2026-04-07 09:28:17 +08:00
Reformat 'performance' and 'src' code
This commit is contained in:
@@ -14,29 +14,20 @@ class DeepTree extends Component {
|
||||
const { Box } = components;
|
||||
|
||||
let result = (
|
||||
<Box
|
||||
color={id % 3}
|
||||
components={components}
|
||||
layout={depth % 2 === 0 ? 'column' : 'row'}
|
||||
outer
|
||||
>
|
||||
{depth === 0 && (
|
||||
<Box
|
||||
color={(id % 3) + 3}
|
||||
components={components}
|
||||
fixed
|
||||
/>
|
||||
)}
|
||||
{depth !== 0 && Array.from({ length: breadth }).map((el, i) => (
|
||||
<DeepTree
|
||||
breadth={breadth}
|
||||
components={components}
|
||||
depth={depth - 1}
|
||||
id={i}
|
||||
key={i}
|
||||
wrap={wrap}
|
||||
/>
|
||||
))}
|
||||
<Box color={id % 3} components={components} layout={depth % 2 === 0 ? 'column' : 'row'} outer>
|
||||
{depth === 0 && <Box color={id % 3 + 3} components={components} fixed />}
|
||||
{depth !== 0 &&
|
||||
Array.from({ length: breadth })
|
||||
.map((el, i) => (
|
||||
<DeepTree
|
||||
breadth={breadth}
|
||||
components={components}
|
||||
depth={depth - 1}
|
||||
id={i}
|
||||
key={i}
|
||||
wrap={wrap}
|
||||
/>
|
||||
))}
|
||||
</Box>
|
||||
);
|
||||
for (let i = 0; i < wrap; i++) {
|
||||
|
||||
Reference in New Issue
Block a user