mirror of
https://github.com/zuiidea/antd-admin
synced 2026-10-22 07:43:50 +00:00
📝 Add some Chinese documentations.
This commit is contained in:
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
@@ -0,0 +1,24 @@
|
||||
|
||||
<svg width="169px" height="141px" viewBox="0 0 169 141" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<!-- Generator: Sketch 51.3 (57544) - http://www.bohemiancoding.com/sketch -->
|
||||
<desc>Created with Sketch.</desc>
|
||||
<defs>
|
||||
<linearGradient x1="54.0428975%" y1="4.39752391%" x2="54.0428975%" y2="108.456714%" id="linearGradient-1">
|
||||
<stop stop-color="#29CDFF" offset="0%"></stop>
|
||||
<stop stop-color="#148EFF" offset="62.3089445%"></stop>
|
||||
<stop stop-color="#0A60FF" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
<linearGradient x1="50%" y1="14.2201464%" x2="50%" y2="113.263844%" id="linearGradient-2">
|
||||
<stop stop-color="#FA816E" offset="0%"></stop>
|
||||
<stop stop-color="#F74A5C" offset="65.9092442%"></stop>
|
||||
<stop stop-color="#F51D2C" offset="100%"></stop>
|
||||
</linearGradient>
|
||||
</defs>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="Group" transform="translate(0.000000, -5.000000)">
|
||||
<rect id="Rectangle" fill="url(#linearGradient-1)" transform="translate(83.718923, 75.312358) rotate(-24.000000) translate(-83.718923, -75.312358) " x="68.7189234" y="0.312357954" width="30" height="150" rx="15"></rect>
|
||||
<rect id="Rectangle" fill="url(#linearGradient-1)" transform="translate(129.009910, 75.580213) rotate(-24.000000) translate(-129.009910, -75.580213) " x="114.00991" y="0.580212739" width="30" height="150" rx="15"></rect>
|
||||
<circle id="Oval" fill="url(#linearGradient-2)" cx="25" cy="120" r="25"></circle>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
+6
-2
@@ -8,6 +8,7 @@
|
||||
<meta name="description" content="An admin dashboard application demo built upon Ant Design and UmiJS">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
|
||||
<link rel="icon" href="/favicon.ico" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -21,10 +22,11 @@
|
||||
name: 'AntD Admin',
|
||||
loadSidebar: true,
|
||||
maxLevel: 3,
|
||||
subMaxLevel: 2,
|
||||
subMaxLevel: 3,
|
||||
auto2top: true,
|
||||
autoHeader: true,
|
||||
repo: 'zuiidea/antd-admin',
|
||||
themeColor: '#1890ff',
|
||||
search: {
|
||||
paths: 'auto',
|
||||
placeholder: {
|
||||
@@ -35,8 +37,9 @@
|
||||
noData: {
|
||||
'/zh-cn/': '找不到结果',
|
||||
'/': 'No Results'
|
||||
},
|
||||
}
|
||||
},
|
||||
// homepage: 'https://raw.githubusercontent.com/zuiidea/antd-admin/master/README.md'
|
||||
}
|
||||
|
||||
// if (typeof navigator.serviceWorker !== 'undefined') {
|
||||
@@ -47,6 +50,7 @@
|
||||
<script src="//unpkg.com/docsify/lib/plugins/search.min.js"></script>
|
||||
<script src="//unpkg.com/docsify/lib/plugins/emoji.min.js"></script>
|
||||
<script src="//unpkg.com/docsify/lib/plugins/zoom-image.min.js"></script>
|
||||
<script src="//unpkg.com/docsify-copy-code"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
+79
-1
@@ -1 +1,79 @@
|
||||
# Antd Admin
|
||||
|
||||
<h1 align="center">AntD Admin</h1>
|
||||
|
||||
<div align="center">
|
||||
|
||||
一套优秀的中后台前端解决方案
|
||||
|
||||
[](https://github.com/ant-design/ant-design)
|
||||
[](https://github.com/umijs/umi)
|
||||
[](https://github.com/zuiidea/antd-admin/issues)
|
||||
[](http://opensource.org/licenses/MIT)
|
||||

|
||||
[](https://github.com/zuiidea/antd-admin/pulls)
|
||||
[](https://gitter.im/antd-admin/antd-admin)
|
||||
|
||||
</div>
|
||||
|
||||
- 在线演示 - [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)
|
||||
|
||||
## 特性
|
||||
|
||||
- 国际化,源码中抽离翻译字段,按需加载语言包
|
||||
- 动态权限,不同权限对应不同菜单
|
||||
- 优雅美观,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。
|
||||
|
||||
| [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/edge/edge_48x48.png" alt="IE / Edge" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>IE / Edge | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/firefox/firefox_48x48.png" alt="Firefox" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Firefox | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/chrome/chrome_48x48.png" alt="Chrome" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Chrome | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/safari/safari_48x48.png" alt="Safari" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>Safari | [<img src="https://raw.githubusercontent.com/alrra/browser-logos/master/src/opera/opera_48x48.png" alt="Opera" width="24px" height="24px" />](http://godban.github.io/browsers-support-badges/)</br>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),更好的问题更容易获得帮助。
|
||||
@@ -1,8 +1,8 @@
|
||||
- 入门
|
||||
- [开始使用](getting-started.md)
|
||||
- [快速上手](zh-cn/getting-started.md)
|
||||
- 定制化
|
||||
- [配置项](configuration.md)
|
||||
- [配置项](zh-cn/configuration.md)
|
||||
- 指南
|
||||
- [部署](deploy.md)
|
||||
- [部署](zh-cn/deploy.md)
|
||||
- 更新日志
|
||||
- 5.0.0
|
||||
|
||||
@@ -0,0 +1,102 @@
|
||||
# 配置项
|
||||
|
||||
你可以在 `/src/utils/config.js` 里做一些自定义配置:
|
||||
|
||||
## siteName
|
||||
|
||||
- 类型: `String`
|
||||
|
||||
配置站点名称,应用到登录框,侧边栏顶部的标题文字显示。
|
||||
|
||||
## copyright
|
||||
|
||||
- 类型: `String`
|
||||
|
||||
配置版权声明,应用到登录页、`Primay`布局底部。
|
||||
|
||||
## logoPath
|
||||
|
||||
- 类型: `String`
|
||||
|
||||
配置站点 Logo,应用到登录框,侧边栏顶部的 Logo 显示。
|
||||
|
||||
## apiPrefix
|
||||
|
||||
- 类型: `String`
|
||||
|
||||
配置项目中接口的前缀,接口相关文档可查看 [接口配置化]()
|
||||
|
||||
## fixedHeader
|
||||
|
||||
- 类型: `String`
|
||||
|
||||
在`Primary`布局下,页面滚动时是否固定顶部。
|
||||
|
||||
## layouts
|
||||
|
||||
- 类型: `Array`
|
||||
|
||||
配置哪些路由使用哪种布局,未指定路由使用默认布局 `Public`,项目中目前有 `Primary` 和 `Public` 两种布局,
|
||||
默认配置如下:
|
||||
|
||||
```js
|
||||
layouts: [
|
||||
{
|
||||
name: 'primary',
|
||||
include: [/.*/],
|
||||
exlude: [/(\/(en|zh))*\/login/],
|
||||
},
|
||||
],
|
||||
```
|
||||
|
||||
每种布局的对象属性如下:
|
||||
|
||||
- `name` - 布局的名称;
|
||||
|
||||
- `include` - 指定使用该布局的路由规则列表,规则可为正则表达式或者字符串;
|
||||
|
||||
- `exlude` - 指定不使用该布局的路由规则列表,规则可为正则表达式或者字符串。
|
||||
|
||||
> 注意:`exlude` 优先级高于 `include`,后面的布局优先级高于前面的布局。开发过程中可能需要结合`src/layouts`目录下的布局使用,具体方法可查看 [使用布局]()。
|
||||
|
||||
## i18n
|
||||
|
||||
- 类型: `Object`
|
||||
|
||||
配置国际化,默认配置如下:
|
||||
|
||||
```js
|
||||
i18n: {
|
||||
languages: [
|
||||
{
|
||||
key: 'en',
|
||||
title: 'English',
|
||||
flag: '/america.svg',
|
||||
},
|
||||
{
|
||||
key: 'zh',
|
||||
title: '中文',
|
||||
flag: '/china.svg',
|
||||
},
|
||||
],
|
||||
defaultLanguage: 'en',
|
||||
}
|
||||
```
|
||||
|
||||
### i18n.languages
|
||||
|
||||
- 类型: `Array`
|
||||
|
||||
指定应用支持哪些语言,每种语言的对象属性如下:
|
||||
|
||||
- `key` - 语言的`key`,应用到页面 url 上以区分语言,也对应 `src/locales` 目录下的语言包文件夹名;
|
||||
|
||||
- `title` - 语言名称,在登录页底部、`Primay` 布局顶部语言切换显示;
|
||||
|
||||
- `flag` - 语言的国旗图标的路径,在 `Primay` 布局顶部语言切换显示。
|
||||
|
||||
### i18n.defaultLanguage
|
||||
|
||||
- 类型: `String`
|
||||
|
||||
配置默认使用哪种语言。
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
# 部署
|
||||
|
||||
## 本地开发
|
||||
|
||||
1. 静态文件编译
|
||||
|
||||
|
||||
```bash
|
||||
npm run trans #可选,提取翻译字段,并自动翻译
|
||||
npm run build
|
||||
```
|
||||
|
||||
@@ -1,87 +1,19 @@
|
||||
# 快速上手
|
||||
|
||||
> 在开始之前,推荐先学习 [React](http://facebook.github.io/react/) 、 [ES2015+](http://es6.ruanyifeng.com/) 、 [Antd Design](https://ant.design/docs/react/introduce-cn) , 了解 [UmiJS](https://umijs.org/) 、[Dva](http://github.com/dvajs/dva) ,并正确安装和配置了 [Node.js](https://nodejs.org/) v8 或以上 、[Git](https://git-scm.com/)。提前了解和学习这些知识会非常有帮助。
|
||||
|
||||
## 安装
|
||||
|
||||
```
|
||||
git clone https://github.com/zuiidea/antd-admin.git my-project
|
||||
cd my-project
|
||||
```
|
||||
|
||||
##目录结构
|
||||
|
||||
应用的目录结构如下
|
||||
|
||||
```bash
|
||||
├── dist/ # 默认build输出目录
|
||||
├── mock/ # Mock文件目录
|
||||
├── public/ # 静态资源文件目录
|
||||
├── src/ # 源码目录
|
||||
│ ├── components/ # 组件目录
|
||||
│ ├── e2e/ # e2e目录
|
||||
│ ├── layouts/ # 布局目录
|
||||
│ ├── locales/ # 国际化文件目录
|
||||
│ ├── models/ # 数据模型目录
|
||||
│ ├── pages/ # 页面组件目录
|
||||
│ ├── services/ # 数据接口目录
|
||||
│ │ ├── api.js # 接口配置
|
||||
│ │ └── index.js # 接口输出
|
||||
│ ├── themes/ # 项目样式目录
|
||||
│ │ ├── default.less # 样式变量
|
||||
│ │ ├── index.less # 全局样式
|
||||
│ │ ├── mixin.less # 样式函数
|
||||
│ │ └── vars.less # 样式变量及函数
|
||||
│ ├── utils/ # 工具函数目录
|
||||
│ │ ├── config.js # 项目配置
|
||||
│ │ ├── constant.js # 静态常量
|
||||
│ │ ├── index.js # 工具函数
|
||||
│ │ ├── request.js # 异步请求函数(axios)
|
||||
│ │ └── theme.js # 项目需要在js中使用到样式变量
|
||||
├── .editorconfig # 编辑器配置
|
||||
├── .env # 环境变量
|
||||
├── .eslintrc # ESlint配置
|
||||
├── .gitignore # Git忽略文件配置
|
||||
├── .prettierignore # Prettier忽略文件配置
|
||||
├── .prettierrc # Prettier配置
|
||||
├── .stylelintrc.json # Stylelint配置
|
||||
├── .travis.yml # Travis配置
|
||||
└── .umirc.js # Umi配置
|
||||
└── package.json # 项目信息
|
||||
```
|
||||
|
||||
##本地开发
|
||||
|
||||
进入目录安装依赖:
|
||||
|
||||
```bash
|
||||
npm install 或者 yarn install
|
||||
```
|
||||
|
||||
> 国内用户推荐使用 [cnpm](https://cnpmjs.org) 进行加速。
|
||||
|
||||
```bash
|
||||
npm run start
|
||||
```
|
||||
|
||||
启动完成后打开浏览器访问 [http://localhost:7000](http://localhost:7000),如果需要更改启动端口,可在`.env`文件中配置。
|
||||
|
||||
# 快速上手
|
||||
|
||||
> 在开始之前,推荐先学习 [React](http://facebook.github.io/react/) 、 [ES2015+](http://es6.ruanyifeng.com/) 、 [Antd Design](https://ant.design/docs/react/introduce-cn) , 了解 [UmiJS](https://umijs.org/) 、[Dva](http://github.com/dvajs/dva) ,并正确安装和配置了 [Node.js](https://nodejs.org/) v8 或以上 、[Git](https://git-scm.com/)。提前了解和学习这些知识会非常有帮助。
|
||||
|
||||
## 安装
|
||||
|
||||
```
|
||||
```bash
|
||||
git clone https://github.com/zuiidea/antd-admin.git my-project
|
||||
cd my-project
|
||||
```
|
||||
|
||||
##目录结构
|
||||
## 目录结构
|
||||
|
||||
应用的目录结构如下
|
||||
|
||||
```bash
|
||||
```text
|
||||
├── dist/ # 默认build输出目录
|
||||
├── mock/ # Mock文件目录
|
||||
├── public/ # 静态资源文件目录
|
||||
@@ -118,18 +50,24 @@ cd my-project
|
||||
└── package.json # 项目信息
|
||||
```
|
||||
|
||||
##本地开发
|
||||
## 本地开发
|
||||
|
||||
进入目录安装依赖:
|
||||
1. 进入目录安装依赖,国内用户推荐使用 [cnpm](https://cnpmjs.org) 进行加速
|
||||
|
||||
```bash
|
||||
npm install 或者 yarn install
|
||||
yarn install
|
||||
```
|
||||
|
||||
> 国内用户推荐使用 [cnpm](https://cnpmjs.org) 进行加速。
|
||||
或者
|
||||
|
||||
```bash
|
||||
npm install
|
||||
```
|
||||
|
||||
2. 启动本地服务器
|
||||
|
||||
```bash
|
||||
npm run start
|
||||
```
|
||||
|
||||
启动完成后打开浏览器访问 [http://localhost:7000](http://localhost:7000),如果需要更改启动端口,可在 `.env` 文件中配置。
|
||||
3. 启动完成后打开浏览器访问 [http://localhost:7000](http://localhost:7000),如果需要更改启动端口,可在 `.env` 文件中配置。
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
# 路由
|
||||
|
||||
本项目中采用约定式路由
|
||||
|
||||
参考[umi 路由](https://umijs.org/zh/guide/router.html)
|
||||
Reference in New Issue
Block a user