Compare commits
No commits in common. "9-antd-pro" and "master" have entirely different histories.
9-antd-pro
...
master
@ -1,6 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project version="4">
|
||||
<component name="VcsDirectoryMappings">
|
||||
<mapping directory="$PROJECT_DIR$" vcs="Git" />
|
||||
</component>
|
||||
</project>
|
14
.umirc.ts
Normal file
14
.umirc.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { defineConfig } from 'umi';
|
||||
|
||||
export default defineConfig({
|
||||
nodeModulesTransform: {
|
||||
type: 'none',
|
||||
},
|
||||
routes: [
|
||||
{ path: '/', component: '@/pages/index' },
|
||||
],
|
||||
fastRefresh: {},
|
||||
history: {
|
||||
type: 'hash'
|
||||
},
|
||||
});
|
12
README.md
12
README.md
@ -1,5 +1,15 @@
|
||||
# umi project
|
||||
|
||||
## Getting Started
|
||||
|
||||
http://localhost:3000/api/users
|
||||
Install dependencies,
|
||||
|
||||
```bash
|
||||
$ yarn
|
||||
```
|
||||
|
||||
Start the dev server,
|
||||
|
||||
```bash
|
||||
$ yarn start
|
||||
```
|
||||
|
@ -1,38 +0,0 @@
|
||||
import { defineConfig } from 'umi';
|
||||
import routes from './routes'
|
||||
export default defineConfig({
|
||||
nodeModulesTransform: {
|
||||
type: 'none', // all 慢 兼容好
|
||||
},
|
||||
routes,
|
||||
fastRefresh: {},
|
||||
history: {
|
||||
type: 'browser'
|
||||
},
|
||||
// 后续设置的配置
|
||||
devServer: {
|
||||
port: 3000, // 启动端口
|
||||
},
|
||||
title: 'UmiV3',// 网站标题
|
||||
favicon: '/favicon.ico',// 网站图标
|
||||
dynamicImport: {}, // 按需加载
|
||||
mountElementId: 'root', // 指定 reactapp 渲染到元素的根元素 id
|
||||
|
||||
proxy: {
|
||||
'/api': {
|
||||
target: 'https://127.0.0.1:8989'
|
||||
},
|
||||
},
|
||||
|
||||
// 主题
|
||||
theme: {
|
||||
// '@primary-color': 'red',
|
||||
},
|
||||
// https://v3.umijs.org/zh-CN/plugins/plugin-layout
|
||||
layout: {
|
||||
name: 'Umi.js',
|
||||
locale: true,
|
||||
layout: 'side',
|
||||
logo: '/user.jpg',
|
||||
},
|
||||
});
|
@ -1,4 +0,0 @@
|
||||
export default [
|
||||
{ path: '/', component: '@/pages/index', name: '首页' },
|
||||
{ path: '/about', component: '@/pages/about', name: '关于' },
|
||||
]
|
@ -1,7 +0,0 @@
|
||||
export default {
|
||||
// 支持值为 Object 和 Array
|
||||
'GET /api/users': { users: [1, 2] },
|
||||
|
||||
// GET 可忽略
|
||||
'/api/users/1': { id: 1 },
|
||||
}
|
@ -28,7 +28,7 @@
|
||||
"devDependencies": {
|
||||
"@types/react": "^17.0.0",
|
||||
"@types/react-dom": "^17.0.0",
|
||||
"@umijs/preset-react": "latest",
|
||||
"@umijs/preset-react": "1.x",
|
||||
"@umijs/test": "^3.5.41",
|
||||
"lint-staged": "^10.0.7",
|
||||
"prettier": "^2.2.0",
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 216 KiB |
BIN
public/user.jpg
BIN
public/user.jpg
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
Binary file not shown.
Before Width: | Height: | Size: 14 KiB |
@ -1,4 +0,0 @@
|
||||
body, html {
|
||||
width: 100%;
|
||||
min-height: 100vh;
|
||||
}
|
@ -1,11 +0,0 @@
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<link rel="shortcut icon" type="image/x-icon" href="/favicon.ico" />
|
||||
<link rel="stylesheet" href="/umi.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div id="root"></div>
|
||||
<script src="/umi.js"></script>
|
||||
</body>
|
||||
</html>
|
@ -1,10 +1,9 @@
|
||||
import styles from './index.less';
|
||||
import { Button } from 'antd'
|
||||
|
||||
export default function IndexPage() {
|
||||
return (
|
||||
<div>
|
||||
<h1 className={styles.title}>Page index</h1>
|
||||
<Button type={"primary"}>Click</Button>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user