4 Commits

Author SHA1 Message Date
b051c59e9e feat: init 2023-10-01 01:26:04 +08:00
653fc7b09d feat: init 2023-10-01 01:17:53 +08:00
620154793b feat: init 2023-10-01 01:15:26 +08:00
e9557c1ef3 feat: init 2023-10-01 01:06:54 +08:00
8 changed files with 23 additions and 17 deletions

View File

@@ -1,15 +0,0 @@
# umi project
## Getting Started
Install dependencies,
```bash
$ yarn
```
Start the dev server,
```bash
$ yarn start
```

BIN
bun.lockb

Binary file not shown.

View File

@@ -20,4 +20,9 @@ export default defineConfig({
favicon: '/favicon.ico',// 网站图标
dynamicImport: {}, // 按需加载
mountElementId: 'root', // 指定 reactapp 渲染到元素的根元素 id
// 主题
theme: {
'@primary-color': 'red',
},
});

View File

@@ -28,7 +28,7 @@
"devDependencies": {
"@types/react": "^17.0.0",
"@types/react-dom": "^17.0.0",
"@umijs/preset-react": "1.x",
"@umijs/preset-react": "latest",
"@umijs/test": "^3.5.41",
"lint-staged": "^10.0.7",
"prettier": "^2.2.0",

BIN
public/user.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
src/assets/user.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

13
src/components/Box.tsx Normal file
View File

@@ -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 (<div>
<h1>Box-{number}</h1>
<Button onClick={ clickHandler }>+</Button>
</div>)
}

View File

@@ -1,9 +1,12 @@
import styles from './index.less';
import { Button } from 'antd'
import { BoxDiv } from '@/components/Box'
export default function IndexPage() {
return (
<div>
<h1 className={styles.title}>Page index</h1>
<Button type={"primary"}>Click</Button>
<BoxDiv></BoxDiv>
</div>
);
}