diff --git a/README-zh_CN.md b/README-zh_CN.md new file mode 100644 index 0000000..cc2268f --- /dev/null +++ b/README-zh_CN.md @@ -0,0 +1,81 @@ + +

AntD Admin

+ +
+ +一套优秀的中后台前端解决方案 + +[![antd](https://img.shields.io/badge/antd-^3.10.0-blue.svg?style=flat-square)](https://github.com/ant-design/ant-design) +[![umi](https://img.shields.io/badge/umi-^2.2.1-orange.svg?style=flat-square)](https://github.com/umijs/umi) +[![GitHub issues](https://img.shields.io/github/issues/zuiidea/antd-admin.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/issues) +[![MIT](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](http://opensource.org/licenses/MIT) +![Travis (.org)](https://img.shields.io/travis/zuiidea/antd-admin.svg) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/pulls) +[![Gitter](https://img.shields.io/gitter/room/antd-admin/antd-admin.svg)](https://gitter.im/antd-admin/antd-admin) + +
+ +- 在线演示 - [https://antd-admin.zuiidea.com](https://antd-admin.zuiidea.com) +- 使用文档 - [https://doc.antd-admin.zuiidea.com/#/zh-cn/](https://doc.antd-admin.zuiidea.com/#/zh-cn/) +- 常见问题 - [https://doc.antd-admin.zuiidea.com/#/zh-cn/faq](https://doc.antd-admin.zuiidea.com/#/zh-cn/faq) +- 更新日志 - [https://doc.antd-admin.zuiidea.com/#/zh-cn/change-log](https://doc.antd-admin.zuiidea.com/#/zh-cn/change-log) + +[English](./README.md) | 简体中文 + +## 特性 + +- 国际化,源码中抽离翻译字段,按需加载语言包 +- 动态权限,不同权限对应不同菜单 +- 优雅美观,Ant Design 设计体系 +- Mock 数据,本地数据调试 + + +## 使用 + +1. 下载项目代码。 + +```bash +git clone https://github.com/zuiidea/antd-admin.git my-project +cd my-project +``` + +2. 进入目录安装依赖,国内用户推荐使用 [cnpm](https://cnpmjs.org) 进行加速。 + +```bash +yarn install +``` + +或者 + +```bash +npm install +``` + +3. 启动本地服务器。 + +```bash +npm run start +``` + +4. 启动完成后打开浏览器访问 [http://localhost:7000](http://localhost:7000),如果需要更改启动端口,可在 `.env` 文件中配置。 + + +> 更多信息请参考 [使用文档](https://doc.antd-admin.zuiidea.com/#/zh-cn/)。 + + +## 支持环境 + +现代浏览器及 IE9。 + +| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | [Opera](http://godban.github.io/browsers-support-badges/)
Opera | +| --------- | --------- | --------- | --------- | --------- | +| IE9, IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions + +## 参与贡献 + +我们非常欢迎你的贡献,你可以通过以下方式和我们一起共建 :smiley: +- 在你的公司或个人项目中使用 AntD Admin。 +- 通过 [Issue](http://github.com/zuiidea/antd-admin/issues) 报告 bug 或进行咨询。 +- 提交 [Pull Request](http://github.com/zuiidea/antd-admin/pulls) 改进代码。 + +> 强烈推荐阅读 [《提问的智慧》](https://github.com/ryanhanwu/How-To-Ask-Questions-The-Smart-Way)、[《如何向开源社区提问题》](https://github.com/seajs/seajs/issues/545) 和 [《如何有效地报告 Bug》](http://www.chiark.greenend.org.uk/%7Esgtatham/bugs-cn.html)、[《如何向开源项目提交无法解答的问题》](https://zhuanlan.zhihu.com/p/25795393),更好的问题更容易获得帮助。 \ No newline at end of file diff --git a/README.md b/README.md index d121fee..2247333 100644 --- a/README.md +++ b/README.md @@ -1,143 +1,80 @@ -# Antd Admin -[![React](https://img.shields.io/badge/react-^16.2.0-brightgreen.svg?style=flat-square)](https://github.com/facebook/react) -[![Ant Design](https://img.shields.io/badge/ant--design-^3.0.3-yellowgreen.svg?style=flat-square)](https://github.com/ant-design/ant-design) -[![dva](https://img.shields.io/badge/dva-^2.1.0-orange.svg?style=flat-square)](https://github.com/dvajs/dva) +

AntD Admin

-[![GitHub issues](https://img.shields.io/github/issues/zuiidea/antd-admin.svg?style=flat-square)](https://github.com/zuiidea/antd-admin) -[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/pulls) +
+ +A excellent front-end solution for enterprise applications. + +[![antd](https://img.shields.io/badge/antd-^3.10.0-blue.svg?style=flat-square)](https://github.com/ant-design/ant-design) +[![umi](https://img.shields.io/badge/umi-^2.2.1-orange.svg?style=flat-square)](https://github.com/umijs/umi) +[![GitHub issues](https://img.shields.io/github/issues/zuiidea/antd-admin.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/issues) [![MIT](https://img.shields.io/dub/l/vibe-d.svg?style=flat-square)](http://opensource.org/licenses/MIT) -[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com) +![Travis (.org)](https://img.shields.io/travis/zuiidea/antd-admin.svg) +[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](https://github.com/zuiidea/antd-admin/pulls) +[![Gitter](https://img.shields.io/gitter/room/antd-admin/antd-admin.svg)](https://gitter.im/antd-admin/antd-admin) -演示地址 +
-## 特性 +- Preview - [https://antd-admin.zuiidea.com](https://antd-admin.zuiidea.com) +- Documentation - [https://doc.antd-admin.zuiidea.com](https://doc.antd-admin.zuiidea.com) +- FAQ - [https://doc.antd-admin.zuiidea.com/#/faq](https://doc.antd-admin.zuiidea.com/#/faq) +- ChangeLog - [https://doc.antd-admin.zuiidea.com/#/change-log](https://doc.antd-admin.zuiidea.com/#/change-log) -* 基于[react](https://github.com/facebook/react),[ant-design](https://github.com/ant-design/ant-design),[dva](https://github.com/dvajs/dva),[Mock](https://github.com/nuysoft/Mock) 企业级后台管理系统最佳实践。 -* 基于 Antd UI 设计语言,提供后台管理系统常见使用场景。 -* 基于[dva](https://github.com/dvajs/dva)动态加载 Model 和路由,按需加载。 -* 使用[umi](https://github.com/umijs/umi)本地调试和构建,其中 Mock 功能实现脱离后端独立开发。 -* 浅度响应式设计。 +English | [简体中文](./README-zh_CN.md) -## 更新日志 +## Features -### 5.0.0-beta +- Internationalization, extracting translation fields from source code, loading language packs on demand +- Dynamic permissions, different permissions for different menus +- Elegant and beautiful, Ant Design system +- Mock data, local data debugging -`2018-6-20` - * 感谢@sorrycc、@xiaohuoni [PR](https://github.com/zuiidea/antd-admin/pull/770) - - * 更新`roadhog`至`umi` - 详见 [使用 umi 改进 dva 项目开发](https://github.com/sorrycc/blog/issues/66#issuecomment-408596579) | [umi model 用法](https://github.com/umijs/umi/issues/171) +## Usage -### 4.3.9 - -`2017-12-27` - -* 更新`antd`至`3.0.3`,以及其它主要库,并解决升级带来的兼容问题。 -* 尽可能的保持`antd`的设计语言。 - -[More Change Log](https://github.com/zuiidea/antd-admin/wiki/Change-Log) - -## 开发构建 - -### 目录结构 +1. Clone project code. ```bash -├── /dist/ # 项目输出目录 -├── /mock/ # 数据mock -├── /public/ # 公共文件,编译时copy至dist目录 -├── /src/ # 项目源码目录 -│ ├── /components/ # UI组件及UI相关方法 -│ ├── /layouts/ # 全局组件 -│ │ └── app.js # 页面入口 -│ │ └── index.js # 入口文件 -│ ├── /models/ # 数据模型 -│ ├── /pages/ # 页面组件 -│ │ └── document.ejs # html模版 -│ ├── /services/ # 数据接口 -│ ├── /themes/ # 项目样式 -│ │ ├── default.less # 全局样式 -│ │ └── vars.less # 全局样式变量 -│ ├── /utils/ # 工具函数 -│ │ ├── config.js # 项目常规配置 -│ │ ├── menu.js # 菜单及面包屑配置 -│ │ ├── config.js # 项目常规配置 -│ │ ├── request.js # 异步请求函数(axios) -│ │ └── theme.js # 项目需要在js中使用到样式变量 -├── package.json # 项目信息 -├── .eslintrc # Eslint配置 -└── .umirc.js # umi配置 -└── .umirc.mock.js # mock配置 -└── .theme.config.js # 主题less编译配置 +git clone https://github.com/zuiidea/antd-admin.git my-project +cd my-project ``` -pages中可参考 [duck 模式](https://medium.freecodecamp.org/scaling-your-redux-app-with-ducks-6115955638be) -文件夹命名说明: - -* components:组件(方法)为单位以文件夹保存,文件夹名组件首字母大写(如`DataTable`),方法首字母小写(如`layer`),文件夹内主文件与文件夹同名,多文件以`index.js`导出对象(如`./src/components/Layout`)。 -* routes:页面为单位以文件夹保存,文件夹名首字母小写(特殊除外,如`UIElement`),文件夹内主文件以`index.js`导出,多文件时可建立`components`文件夹(如`./src/routes/dashboard`),如果有子路由,依次按照路由层次建立文件夹(如`./src/routes/UIElement`)。 - -### 快速开始 - -克隆项目文件: +2. Installation dependence. ```bash -git clone https://github.com/zuiidea/antd-admin.git +yarn install ``` -进入目录安装依赖: +Or ```bash -#开始前请确保没有安装roadhog、webpack到NPM全局目录, 国内用户推荐yarn或者cnpm -npm i 或者 yarn install +npm install ``` -开发: +3. Start local server. ```bash npm run start -打开 http://localhost:8000 #端口在package.json中cross-env后加上 PORT=8000指定 ``` -构建: -[详情](https://github.com/zuiidea/antd-admin/issues/269) +4. After the startup is complete, open a browser and visit [http://localhost:7000](http://localhost:7000), If you need to change the startup port, you can configure it in the `.env` file. -代码检测: -```bash -npm run lint -``` +> More instructions at [documentation](https://doc.antd-admin.zuiidea.com)。 -## FAQ -* 项目打包后如何部署? [#269](https://github.com/zuiidea/antd-admin/issues/269) -* 如何做权限管理? [#384](https://github.com/zuiidea/antd-admin/issues/384) -* 如何使用 mock.js 模拟接口,怎么使用线上接口? [#348](https://github.com/zuiidea/antd-admin/issues/348) -* 如何使用 Iconfont,如何使用本地的 svg 图标? [#270](https://github.com/zuiidea/antd-admin/issues/270) -* 怎么按版本打包,上线时不影响正在访问的用户? [#449](https://github.com/zuiidea/antd-admin/issues/449) -* windows 处理 CRLF?[参考](http://blog.csdn.net/lysc_forever/article/details/42835203) +## Browsers support - ```bash - git config --global core.autocrlf false - ``` +Modern browsers and IE9. -## 参考 +| [IE / Edge](http://godban.github.io/browsers-support-badges/)
IE / Edge | [Firefox](http://godban.github.io/browsers-support-badges/)
Firefox | [Chrome](http://godban.github.io/browsers-support-badges/)
Chrome | [Safari](http://godban.github.io/browsers-support-badges/)
Safari | [Opera](http://godban.github.io/browsers-support-badges/)
Opera | +| --------- | --------- | --------- | --------- | --------- | +| IE9, IE10, IE11, Edge| last 2 versions| last 2 versions| last 2 versions| last 2 versions -用户列表: +## Contributing -dashboard 设计稿: (已征得作者同意) +We very much welcome your contribution, you can build together with us in the following ways :smiley: -## 截屏 - -web - -![](https://user-images.githubusercontent.com/8142164/43032162-37db46e2-8ce3-11e8-9c7e-73a773bc0545.gif) - -移动 - -![](https://user-images.githubusercontent.com/8142164/43032163-3a1f2838-8ce3-11e8-89c5-8e1ae077d34a.gif) - -效果图 - -![](https://user-images.githubusercontent.com/8142164/43032165-5d151bae-8ce3-11e8-9bfd-8a121620ea78.jpg) +- Use Ant Design Pro in your daily work. +- Submit [GitHub issues](http://github.com/zuiidea/antd-admin/issues)s to report bugs or ask questions. +- Propose [Pull Request](http://github.com/zuiidea/antd-admin/pulls) to improve our code.