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) {
})
...
提前感謝!