1
感谢您阅读我的问题。无法读取属性'后'的undefined vue
我看了一下我的问题
VUE JS 2 + WEBPACK Cannot read property 'get' of undefined VUE RESOURCE
但是我的系统中没有读Vue的变种:(
我有一个VUE组件调用app.vue,我需要使用VUE资源以从我的后得到的数据,但错误很多次是:?
TypeError: Cannot read property 'post' of undefined
at VueComponent.loadingProcess
不要ü有想法解决它
和我app.vue
<script>
var Vue = require('vue');
//Vue.use(require('vue-resource'));
//Vue.use();
export default {
data() {
return {
msg: 'Hello from vue-loader! nice!',
user: {}
}
},
mounted: function() {
this.loadingProcess();
},
methods: {
loadingProcess: function() {
var urlPost;
var answQSend = {...};
var that = this;
var jsonSend = {
"form_data": answQSend,
"prod_id": 3
};
Vue.$http.post(urlPost, jsonSend, {
"headers": {
"content-type": "application/json"
}
})
.then(function(response) {
})
...
提前感谢!