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

+
); }