Skip to content

Commit

Permalink
📝 docs: 更新性能对比文档
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Jun 26, 2023
1 parent 4a1114e commit 6d94b35
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
export default () => (
<iframe
src={'https://cssinjs-benchmark.arvinx.app/'}
src={'https://cssinjs-benchmark.arvinx.app/dynamic-value'}
style={{ border: 'none', width: '100%', height: '100vh' }}
/>
);
9 changes: 9 additions & 0 deletions docs/guide/demos/benchmark/large-content.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/**
* iframe: 600
*/
export default () => (
<iframe
src={'https://cssinjs-benchmark.arvinx.app/large-content/'}
style={{ border: 'none', width: '100%', height: '100vh' }}
/>
);
21 changes: 18 additions & 3 deletions docs/guide/performance-comparsion.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,34 @@ group: 进阶使用

# CSS-in-JS 性能对比

## 单次渲染性能对比
## 基础渲染性能对比

```tsx | inline
import { FullscreenOutlined } from '@ant-design/icons';
import { Button } from 'antd';

export default () => (
<a href="https://cssinjs-benchmark.arvinx.app/" target={'_blank'}>
<a href="https://cssinjs-benchmark.arvinx.app/large-content" target={'_blank'}>
<Button type={'primary'} icon={<FullscreenOutlined />}>
点击全屏查看
</Button>
</a>
);
```

<code src="./demos/benchmark/index.tsx"></code>
<code src="./demos/benchmark/large-content.tsx"></code>

## 动态值渲染性能对比

```tsx | inline
import { FullscreenOutlined } from '@ant-design/icons';
import { Button } from 'antd';

export default () => (
<a href="https://cssinjs-benchmark.arvinx.app/dynamic-value" target={'_blank'}>
<Button icon={<FullscreenOutlined />}>点击全屏查看</Button>
</a>
);
```

<code src="./demos/benchmark/dynamic-value.tsx"></code>

0 comments on commit 6d94b35

Please sign in to comment.