Skip to content

Commit

Permalink
feat: 🚀 add a new MenuItem type
Browse files Browse the repository at this point in the history
  • Loading branch information
limuen committed May 27, 2024
1 parent 98c4f97 commit f537413
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 2 additions & 2 deletions apps/react-low-code/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@ import zhCN from "antd/locale/zh_CN";
import { ConfigProvider } from "antd";
import router from "./router";

export function App() {
const App: React.FC = () => {
return (
<ConfigProvider locale={zhCN} prefixCls="ant-prefix">
<RouterProvider router={router} />
</ConfigProvider>
);
}
};

export default App;
8 changes: 7 additions & 1 deletion apps/react-low-code/src/layout/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,18 @@ import { useEffect, useState } from "react";
import { Outlet, useLocation, useNavigate } from "react-router-dom";
import { Menu } from "antd";

interface MenuItem {
key: string;
label: string;
}

const Layout: React.FC = () => {
const navigate = useNavigate();
const location = useLocation();

const [selectedKeys, setSelectedKeys] = useState(["/"]);
const items: any[] = [

const items: MenuItem[] = [
{
key: "/lowcode/table",
label: "表格"
Expand Down

0 comments on commit f537413

Please sign in to comment.