mirror of
https://github.com/ant-design/ant-design.git
synced 2025-06-11 11:32:52 +08:00
fix: demos suspence block (#52051)
This commit is contained in:
parent
4a354188e5
commit
4fcf3da852
@ -2,7 +2,7 @@ import React, { Suspense, useContext } from 'react';
|
|||||||
import { BugOutlined, CodeOutlined, ExperimentOutlined } from '@ant-design/icons';
|
import { BugOutlined, CodeOutlined, ExperimentOutlined } from '@ant-design/icons';
|
||||||
import { ConfigProvider, Tooltip, Button } from 'antd';
|
import { ConfigProvider, Tooltip, Button } from 'antd';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
import { DumiDemoGrid, FormattedMessage } from 'dumi';
|
import { DumiDemoGrid, FormattedMessage, DumiDemo } from 'dumi';
|
||||||
import { css, Global } from '@emotion/react';
|
import { css, Global } from '@emotion/react';
|
||||||
|
|
||||||
import useLayoutState from '../../../hooks/useLayoutState';
|
import useLayoutState from '../../../hooks/useLayoutState';
|
||||||
@ -114,7 +114,14 @@ const DemoWrapper: typeof DumiDemoGrid = ({ items }) => {
|
|||||||
</span>
|
</span>
|
||||||
<ConfigProvider theme={{ cssVar: enableCssVar, hashed: !enableCssVar }}>
|
<ConfigProvider theme={{ cssVar: enableCssVar, hashed: !enableCssVar }}>
|
||||||
<Suspense>
|
<Suspense>
|
||||||
<DumiDemoGrid items={demos} />
|
<DumiDemoGrid
|
||||||
|
items={demos}
|
||||||
|
demoRender={(item) => (
|
||||||
|
<Suspense>
|
||||||
|
<DumiDemo key={item.demo.id} {...item} />
|
||||||
|
</Suspense>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
</Suspense>
|
</Suspense>
|
||||||
</ConfigProvider>
|
</ConfigProvider>
|
||||||
</div>
|
</div>
|
||||||
|
@ -230,7 +230,7 @@
|
|||||||
"cross-fetch": "^4.0.0",
|
"cross-fetch": "^4.0.0",
|
||||||
"dekko": "^0.2.1",
|
"dekko": "^0.2.1",
|
||||||
"dotenv": "^16.4.5",
|
"dotenv": "^16.4.5",
|
||||||
"dumi": "~2.4.16",
|
"dumi": "~2.4.17",
|
||||||
"dumi-plugin-color-chunk": "^1.1.2",
|
"dumi-plugin-color-chunk": "^1.1.2",
|
||||||
"eslint": "^9.13.0",
|
"eslint": "^9.13.0",
|
||||||
"eslint-plugin-compat": "^6.0.1",
|
"eslint-plugin-compat": "^6.0.1",
|
||||||
|
Loading…
Reference in New Issue
Block a user