From b051c59e9e3d5f78fa60ba8923a657627b40c4ab Mon Sep 17 00:00:00 2001 From: taoya7 <569781231@qq.com> Date: Sun, 1 Oct 2023 01:26:04 +0800 Subject: [PATCH] feat: init --- README.md | 5 ----- src/components/Box.tsx | 13 +++++++++++++ src/pages/index.tsx | 2 ++ 3 files changed, 15 insertions(+), 5 deletions(-) create mode 100644 src/components/Box.tsx diff --git a/README.md b/README.md index 6a912f5..e69de29 100644 --- a/README.md +++ b/README.md @@ -1,5 +0,0 @@ -# 默认全局 - -src/global.less - - diff --git a/src/components/Box.tsx b/src/components/Box.tsx new file mode 100644 index 0000000..564c4ae --- /dev/null +++ b/src/components/Box.tsx @@ -0,0 +1,13 @@ +import {useState} from "react"; +import { Button } from 'antd' +export function BoxDiv(){ + let [number, setNumber] = useState(0) + function clickHandler(){ + setNumber(number+1); + } + + return (
+

Box-{number}

+ +
) +} diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 4a4c7c6..58bad12 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,10 +1,12 @@ import styles from './index.less'; import { Button } from 'antd' +import { BoxDiv } from '@/components/Box' export default function IndexPage() { return (

Page index

+
); }