From e01a2f5348a3625b2ce0dcb78829bc186559e65a Mon Sep 17 00:00:00 2001 From: taoya7 <569781231@qq.com> Date: Sun, 1 Oct 2023 13:25:41 +0800 Subject: [PATCH] feat: init --- config/config.ts | 9 ++++++++- config/routes.ts | 4 ++-- src/components/Box.tsx | 13 ------------- src/pages/index.tsx | 3 --- 4 files changed, 10 insertions(+), 19 deletions(-) delete mode 100644 src/components/Box.tsx diff --git a/config/config.ts b/config/config.ts index 886e748..46cf849 100644 --- a/config/config.ts +++ b/config/config.ts @@ -26,6 +26,13 @@ export default defineConfig({ // 主题 theme: { - '@primary-color': 'red', + // '@primary-color': 'red', + }, + // https://v3.umijs.org/zh-CN/plugins/plugin-layout + layout: { + name: 'Umi.js', + locale: true, + layout: 'side', + logo: '/user.jpg', }, }); diff --git a/config/routes.ts b/config/routes.ts index e7ac9b0..09e9978 100644 --- a/config/routes.ts +++ b/config/routes.ts @@ -1,4 +1,4 @@ export default [ - { path: '/', component: '@/pages/index' }, - { path: '/about', component: '@/pages/about' }, + { path: '/', component: '@/pages/index', name: '首页' }, + { path: '/about', component: '@/pages/about', name: '关于' }, ] diff --git a/src/components/Box.tsx b/src/components/Box.tsx deleted file mode 100644 index 564c4ae..0000000 --- a/src/components/Box.tsx +++ /dev/null @@ -1,13 +0,0 @@ -import {useState} from "react"; -import { Button } from 'antd' -export function BoxDiv(){ - let [number, setNumber] = useState(0) - function clickHandler(){ - setNumber(number+1); - } - - return (