2 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
3 changed files with 15 additions and 21 deletions

View File

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

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,16 +1,12 @@
import styles from './index.less';
import { Button } from 'antd'
import { Button as ButtonMobileV2 } from 'antd-mobile-v2'
import { Button as ButtonMobileV5 } from 'antd-mobile'
import { BoxDiv } from '@/components/Box'
export default function IndexPage() {
return (
<div>
<h1 className={styles.title}>Page index</h1>
<Button type={"primary"}>Click</Button>
<ButtonMobileV2>Click</ButtonMobileV2>
<ButtonMobileV5>Click</ButtonMobileV5>
<img src={ require('@/assets/user.jpg') } alt="" draggable={false} />
<img src="/user.jpg" alt="" draggable={false}/>
<BoxDiv></BoxDiv>
</div>
);
}