day1
1. vue cli 与ant design vue之前端建设
1. vue cli项目搭建
vue create demo
2. 使用ant deisign vue
-
官网
-
需要配置less时出现问题.bezierEasingMixin()
传送门
3. axios is not defined
cnpm i axios
import axios from 'axios'
Vue.prototype.$axios = axios
this.$axios
.get('/login')
.then(res => {
console.log(res)
this.verify = res.data
})
.catch(err => {
console.error(err)
})
4. localhost 8080接口访问3000后台,因为端口不同,同源协议生效,导致报错。
module.exports = {
devServer: {
proxy: {
'/api': {
target: 'http://localhost:3000/',
changeOrigin: true,
pathRewrite: {
'^/api': ''
}
}
}
}
}
axios.defaults.baseURL =