2019-07-12 10:34:25 +08:00
|
|
|
|
# vue-admin-permission
|
2019-07-12 10:23:40 +08:00
|
|
|
|
项目基于vue-cli3.0进行搭建,并使用了vue全家桶vue vuex axios vue-router elementui,增加了按钮级别的权限控制
|
|
|
|
|
|
2019-07-12 16:15:40 +08:00
|
|
|
|
#
|
2019-07-12 16:16:09 +08:00
|
|
|
|
<h2><a href="http://www.vueadmin.cn">线上地址</a></h2>
|
2019-07-12 10:23:40 +08:00
|
|
|
|
## Project setup(安装包)
|
2018-08-15 16:25:05 +08:00
|
|
|
|
```
|
2019-07-12 10:23:40 +08:00
|
|
|
|
这里需要使用npm进行安装,如果用cnpm或者yarn会有热更新失效的问题
|
2018-08-15 16:25:05 +08:00
|
|
|
|
npm install
|
|
|
|
|
```
|
|
|
|
|
|
2019-07-12 12:30:16 +08:00
|
|
|
|
## Compiles and hot-reloads for development(运行项目)
|
2018-08-15 16:25:05 +08:00
|
|
|
|
```
|
2019-07-12 10:23:40 +08:00
|
|
|
|
|
|
|
|
|
npm run serve:randy
|
|
|
|
|
|
2018-08-15 16:25:05 +08:00
|
|
|
|
```
|
|
|
|
|
|
2019-07-12 12:30:16 +08:00
|
|
|
|
## Compiles and minifies for production(打包)
|
2018-08-15 16:25:05 +08:00
|
|
|
|
```
|
2019-07-12 10:23:40 +08:00
|
|
|
|
如果是首次打包或者第三方库文件发生变更,则需要先运行 npm run dll,用于抽离第三方库如vue vuex axios element-ui,此后直接运行npm run build即可
|
|
|
|
|
|
2018-08-15 16:25:05 +08:00
|
|
|
|
npm run build
|
|
|
|
|
```
|
2019-07-12 12:30:16 +08:00
|
|
|
|
## analyze your items (项目模块分析)
|
2018-08-15 16:25:05 +08:00
|
|
|
|
```
|
|
|
|
|
npm run analyze
|
2018-08-15 16:30:06 +08:00
|
|
|
|
```
|
2019-07-12 12:30:16 +08:00
|
|
|
|
## 温馨提示
|
2019-07-12 10:23:40 +08:00
|
|
|
|
```
|
|
|
|
|
在新增vue页面的时候,热更新可能会失效,重启一下项目
|
|
|
|
|
```
|
2019-07-12 12:30:16 +08:00
|
|
|
|
## Run your tests
|
2019-07-12 10:23:40 +08:00
|
|
|
|
```
|
|
|
|
|
yarn run test
|
|
|
|
|
```
|
|
|
|
|
|
2019-07-12 12:30:16 +08:00
|
|
|
|
## Lints and fixes files
|
2019-07-12 10:23:40 +08:00
|
|
|
|
```
|
|
|
|
|
yarn run lint
|
|
|
|
|
```
|
|
|
|
|
|
2019-07-12 12:30:16 +08:00
|
|
|
|
## Run your unit tests
|
2019-07-12 10:23:40 +08:00
|
|
|
|
```
|
|
|
|
|
yarn run test:unit
|
|
|
|
|
```
|
|
|
|
|
|
2019-07-12 12:30:16 +08:00
|
|
|
|
## Customize configuration
|
2019-07-12 10:23:40 +08:00
|
|
|
|
See [Configuration Reference](https://cli.vuejs.org/config/).
|