Skip to content

mayacger/antd-init-create-react-app-admin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

说明

  • 基于 Ant Design
  • 参考 ant-design-pro
  • 但是 ant-design-pro 使用了阿里开发 dva、roadhog等工具,对初学者难度增大。
  • 所以默认采用了 create-react-app,关于ant-design在create-react-app一些配置请参考 使用文档
  • 没有采用redux-saga,也是便于初学redux简单些。

已知问题

没有实现less 做为对象引入,即 import style from './index.less' 模式,目前暂时使用 import './index.less',因此有可能污染全局css,请注意css命名。 采用yarn eject配置 已经支持,less要命名*.module.less,如:index.module.less,即 import style from './index.module.less'

proxy

在package.json添加

"proxy": "http://api.yoursite.com",

特定配置

"proxy": {
    "/api": {
      "target": "http://api.yoursite.com",
      "changeOrigin": true,
      "secure": false
    },
    "/api2": {
      "target": "http://api.yoursite.com",
      "changeOrigin": true,
      "secure": false
    }
  },

使用

$ git clone https://github.com/mayacger/antd-init-create-react-app-admin.git
$ cd antd-init-create-react-app-admin
$ yarn //或者 npm i
$ yarn start        

兼容性

现代浏览器及 IE11。

thanks

ant-design-pro

About

antd-init-create-react-app-admin

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published