element-ui
vue-antd
vue-axios
import axios from "axios";
Vue.prototype.$axios = axios;
// vue.config.js 配置说明
//官方vue.config.js 参考文档 https://cli.vuejs.org/zh/config/#css-loaderoptions
module.exports = {
devServer: {
host: "localhost",
port: 8080, // 端口号
https: false, // https:{type:Boolean}
open: true, //配置自动启动浏览器
// proxy: 'http://localhost:4000' // 配置跨域处理,只有一个代理
// 配置多个代理
proxy: {
"/api": {
target: "https://www.baidu.com",
ws: true,
changeOrigin: true,
pathRewrite:{
"^/api":''
}
},
}
}
};