2 Commits

Author SHA1 Message Date
e8729a499a feat: init 2023-10-01 13:16:11 +08:00
1a1cd5d8d3 feat: init 2023-10-01 01:37:49 +08:00
4 changed files with 19 additions and 0 deletions

View File

@@ -0,0 +1,5 @@
http://localhost:3000/api/users

View File

@@ -18,6 +18,12 @@ export default defineConfig({
dynamicImport: {}, // 按需加载
mountElementId: 'root', // 指定 reactapp 渲染到元素的根元素 id
proxy: {
'/api': {
target: 'https://127.0.0.1:8989'
},
},
// 主题
theme: {
'@primary-color': 'red',

7
mock/api.ts Normal file
View File

@@ -0,0 +1,7 @@
export default {
// 支持值为 Object 和 Array
'GET /api/users': { users: [1, 2] },
// GET 可忽略
'/api/users/1': { id: 1 },
}

View File

@@ -1,6 +1,7 @@
import styles from './index.less';
import { Button } from 'antd'
import { BoxDiv } from '@/components/Box'
import { request } from 'umi'
export default function IndexPage() {
return (
<div>