我想在vue-cli中设置自定义标题。
vue的版本为2.5.2。
我尝试过:
Vue.http.headers.common['Cache-Control'] = 'no-cache, no-store, must-revalidate'
但返回:
Uncaught TypeError: Cannot read property 'headers' of undefined
请安装并重试。
https://github.com/pagekit/vue-resource
https://github.com/imcvampire/vue-axios
我希望这会有所帮助。