https://github.com/bingxuelover/vue-element-axios
vue+element-ui按需加载+axios封装
https://github.com/bingxuelover/vue-element-axios
axios element-ui qs vue vue-router
Last synced: 2 months ago
JSON representation
vue+element-ui按需加载+axios封装
- Host: GitHub
- URL: https://github.com/bingxuelover/vue-element-axios
- Owner: bingxuelover
- Created: 2020-10-13T07:05:26.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-10-13T09:02:20.000Z (over 4 years ago)
- Last Synced: 2025-01-22T10:31:12.933Z (4 months ago)
- Topics: axios, element-ui, qs, vue, vue-router
- Language: JavaScript
- Homepage:
- Size: 119 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vue-element-axios
## 项目命令
```安装
yarn install
```### 本地编译并热重启
```command
yarn serve
```### 编译并打包
```command
yarn build
```### 检查和修正文件内容
```command
yarn lint
```### 自定义配置
查看 [Configuration Reference](https://cli.vuejs.org/config/).
## 文件结构
### config
配置项
- path.js
请求服务器的正式和测试环境路径配置
- server.js
后台接口路径配置
- post.js
axios 请求封装文件
- dev.env.js prod.env.js
配置打包环境### utils
组件配置
- element-ui.js
element 组件按需加载
- utils.js
自定义功能### 访问本地项目文件
本地文件夹启动项目后访问
- 全局安装 serve
```command
yarn global add serve
```- 进入项目文件夹,通过 serve 启动
允许跨域访问,启动时增加 --cors```command
serve --cors
```