亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

Vue 賦值問題

Vue 賦值問題

牛魔王的故事 2019-03-15 13:15:31
最近再學習 Vue.js想把 API 那里獲得的數據賦值給 Post_List,但是打印出來變量一直沒變 打印出來始終是 a?對 JS 不太了解,望大家指點下 export default {        data() {            const Login_Scope = this;            let Post_List = 'a';            axios.get('/api/postList')                .then(function (response) {                    console.log(response);                    Login_Scope.Post_List = response.data;                })                .catch(function (error) {                    // vm.answer = 'Error! Could not reach the API. ' + error                });            console.log(Post_List);            return {                postList: Post_List,            }        }    };
查看完整描述

1 回答

  • 1 回答
  • 0 關注
  • 324 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號