This commit is contained in:
Pan 2018-08-16 11:19:38 +08:00
parent 56d234840d
commit 3e5f9549a7
3 changed files with 19 additions and 19 deletions

View File

@ -2,13 +2,13 @@
> 这是一个 极简的 vue admin 管理后台 它只包含了 Element UI & axios & iconfont & permission control & lint这些搭建后台必要的东西。
[线上地址](http://panjiachen.github.io/vue-admin-template )
[线上地址](http://panjiachen.github.io/vue-admin-template)
## Extra
如果你想要根据用户角色来动态生成侧边栏和 router你可以使用改分支[permission-control](https://github.com/PanJiaChen/vue-admin-template /tree/permission-control)
如果你想要根据用户角色来动态生成侧边栏和 router你可以使用改分支[permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)
本项目基于`webpack4`开发,若还想使用`webpack3`开发,请使用该分支[webpack3](https://github.com/PanJiaChen/vue-admin-template /tree/webpack3)
本项目基于`webpack4`开发,若还想使用`webpack3`开发,请使用该分支[webpack3](https://github.com/PanJiaChen/vue-admin-template/tree/webpack3)
## 相关项目
@ -28,7 +28,7 @@
```bash
# Clone project
git clone https://github.com/PanJiaChen/vue-admin-template .git
git clone https://github.com/PanJiaChen/vue-admin-template.git
# Install dependencies
npm install
@ -52,11 +52,11 @@ npm run build --report
### Element-Ui 使用 cdn 教程
首先找到 `index.html` ([根目录下](https://github.com/PanJiaChen/vue-admin-template /blob/element-ui-cdn/index.html))
首先找到 `index.html` ([根目录下](https://github.com/PanJiaChen/vue-admin-template/blob/element-ui-cdn/index.html))
引入 Element 的 css 和 js ,并且引入 vue 。因为 Element-Ui 是依赖 vue 的,所以必须在它之前引入 vue 。
之后找到 [webpack.base.conf.js](https://github.com/PanJiaChen/vue-admin-template /blob/element-ui-cdn/build/webpack.base.conf.js) 加入 `externals` 让 webpack 不打包 vue 和 element
之后找到 [webpack.base.conf.js](https://github.com/PanJiaChen/vue-admin-template/blob/element-ui-cdn/build/webpack.base.conf.js) 加入 `externals` 让 webpack 不打包 vue 和 element
```
externals: {
@ -71,12 +71,12 @@ externals: {
如图:
![demo](https://panjiachen.github.io/images/element-cdn.png)
**[具体代码](https://github.com/PanJiaChen/vue-admin-template /commit/746aff560932704ae821f82f10b8b2a9681d5177)**
**[具体代码](https://github.com/PanJiaChen/vue-admin-template/commit/746aff560932704ae821f82f10b8b2a9681d5177)**
**[对应分支](https://github.com/PanJiaChen/vue-admin-template /tree/element-ui-cdn)**
**[对应分支](https://github.com/PanJiaChen/vue-admin-template/tree/element-ui-cdn)**
## License
[MIT](https://github.com/PanJiaChen/vue-admin-template /blob/master/LICENSE) license.
[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.
Copyright (c) 2017-present PanJiaChen

View File

@ -4,13 +4,13 @@
**Live demo:** http://panjiachen.github.io/vue-admin-template
[中文文档](https://github.com/PanJiaChen/vue-admin-template /blob/master/README-zh.md)
[中文文档](https://github.com/PanJiaChen/vue-admin-template/blob/master/README-zh.md)
## Build Setup
```bash
# Clone project
git clone https://github.com/PanJiaChen/vue-admin-template .git
git clone https://github.com/PanJiaChen/vue-admin-template.git
# Install dependencies
npm install
@ -33,9 +33,9 @@ https://panjiachen.gitee.io/vue-element-admin-site/zh/guide/
## Extra
If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vue-admin-template /tree/permission-control)
If you want router permission && generate menu by user roles , you can use this branch [permission-control](https://github.com/PanJiaChen/vue-admin-template/tree/permission-control)
This project is based on `webpack4` development. If you want to use `webpack3` development, please use this branch [webpack3](https://github.com/PanJiaChen/vue-admin-template /tree/webpack3)
This project is based on `webpack4` development. If you want to use `webpack3` development, please use this branch [webpack3](https://github.com/PanJiaChen/vue-admin-template/tree/webpack3)
## Related Project
@ -45,11 +45,11 @@ This project is based on `webpack4` development. If you want to use `webpack3` d
### Element-Ui using cdn tutorial
First find `index.html`([root directory](https://github.com/PanJiaChen/vue-admin-template /blob/element-ui-cdn/index.html))
First find `index.html`([root directory](https://github.com/PanJiaChen/vue-admin-template/blob/element-ui-cdn/index.html))
Import css and js of `Element`, and then import vue. Because `Element` is vue-dependent, vue must be import before it.
Then find [webpack.base.conf.js](https://github.com/PanJiaChen/vue-admin-template /blob/element-ui-cdn/build/webpack.base.conf.js)
Then find [webpack.base.conf.js](https://github.com/PanJiaChen/vue-admin-template/blob/element-ui-cdn/build/webpack.base.conf.js)
Add `externals` to make webpack not package vue and element.
```
@ -67,12 +67,12 @@ And you can use `npm run build --report` to see the effect
Pictured:
![demo](https://panjiachen.github.io/images/element-cdn.png)
**[Detailed code](https://github.com/PanJiaChen/vue-admin-template /commit/746aff560932704ae821f82f10b8b2a9681d5177)**
**[Detailed code](https://github.com/PanJiaChen/vue-admin-template/commit/746aff560932704ae821f82f10b8b2a9681d5177)**
**[Branch](https://github.com/PanJiaChen/vue-admin-template /tree/element-ui-cdn)**
**[Branch](https://github.com/PanJiaChen/vue-admin-template/tree/element-ui-cdn)**
## License
[MIT](https://github.com/PanJiaChen/vue-admin-template /blob/master/LICENSE) license.
[MIT](https://github.com/PanJiaChen/vue-admin-template/blob/master/LICENSE) license.
Copyright (c) 2017-present PanJiaChen

View File

@ -57,7 +57,7 @@ module.exports = {
* then assetsPublicPath should be set to "/bar/".
* In most cases please use '/' !!!
*/
assetsPublicPath: '/vue-admin-template /', // If you are deployed on the root path, please use '/'
assetsPublicPath: '/vue-admin-template/', // If you are deployed on the root path, please use '/'
/**
* Source Maps