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":''
}
},
}
}
};