Skip to content

Commit 4a349d7

Browse files
committed
fix(doc): 修复Controller类型错误
1 parent d759ad1 commit 4a349d7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

website/src/routes/Controller.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Suspense } from 'react';
1+
import { Key, Suspense } from 'react';
22
import { Routes, Route, Navigate } from 'react-router-dom';
33
import { Loader } from 'uiw';
44
import { routeData } from '../routes/router';
@@ -16,7 +16,7 @@ export default function Controller() {
1616
<Route path="/" element={<Navigate replace to="/home" />} />
1717
<Route path="/docs" element={<Navigate replace to="/docs/getting-started" />} />
1818
<Route path="/components" element={<Navigate replace to="/components/about" />} />
19-
{routeData.map(({ component: BasicLayout, path, children = [] }, idx) => (
19+
{routeData.map(({ component: BasicLayout, path, children = [] }: any, idx) => (
2020
<Route
2121
path={path}
2222
key={idx}
@@ -26,7 +26,7 @@ export default function Controller() {
2626
</Suspense>
2727
}
2828
>
29-
{children.map((child, idx) => {
29+
{children.map((child: { component: any; path: string }, idx: Key | null | undefined) => {
3030
const Child = child.component as any;
3131
return (
3232
<Route

0 commit comments

Comments
 (0)