This action will force synchronization from sxfad/react-admin, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
基于React17.x、Ant Design4.x的管理系统架构。
yarn
注:如果由于网络等原因安装不成功,可以尝试 tyarn
或 cnpm
或 npm
或 yarn --registry https://registry.npm.taobao.org
设置环境变量,windows平台可以使用 cross-env
如果您是第一次使用,想快速预览效果,可以是用mock方式启动:REACT_APP_MOCK=true yarn start
# 正常启动开发模式
yarn start
# 自定义端口
PORT=3001 yarn start
# HTTPS 方式启动
HTTPS=true yarn start
# 开启本地mock
REACT_APP_MOCK=true yarn start
修改src/setupProxyConfig.json
,页面右上角头部有下拉,可以快速切换代理。
[
{
"name": "张三",
"disabled": false,
"baseUrl": "/zhangsan",
"target": "http://127.0.0.1:8080"
},
{
"name": "测试环境",
"baseUrl": "/api",
"target": "http://127.0.0.1:8080"
}
]
# 正常构建
yarn build
# 构建到指定目录
BUILD_PATH=./dist yarn build
# 指定配置环境
REACT_APP_CONFIG_ENV=test yarn build
# 打包大小分析
yarn build:analyzer
# 打包时间分析
yarn build:time
import styles from './style.module.less';
<div className={styles.root}>
<h1 className={styles.title}></h1>
</div>
import styles from './style.module.less';
const isActive = true;
<div className={[styles.root, isActive && styles.active]}>
<h1 className={styles.title}></h1>
</div>
团队多人开发,无论使用webstorm还是vscode,都使用prettier(配置文件:.prettierrc.js)进行代码格式化。
IDE格式化快捷键可以配置成prettier
git commit 时会根据prettier进行代码格式化,确保提交到仓库的代码都符合规范
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。