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

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

vue數據加載不出

vue數據加載不出

下雨不停的雨婷 2017-04-16 20:13:48
new Vue({???? el: '.wrap',???? data: {???????? addressList: [],???????? productList: [],???????? sendMessage: ''???? },???? mounted: function() {???? this.$nextTick(function() {???????? this.getAddressList();???????? this.getProductList();???????? this.getSendMessage();???? });???? },???? methods: {???????? getAddressList: function() {???????????? this.$http.get('data/address.json', {}).then(res => {???????????? this.addressList = res.data.result;???????????? });???????? },???????? getProductList: function() {???????????? this.$http.get('data/cart.json', {}).then(res => {???????????? this.productList = res.data.result.productList;???????????? });???????? },???????? getSendMessage: function() {???????????? var _this = this;???????????? this.addressList.forEach(function(item, index) {???????????????? if (item.isDefault) {???????????????? ???? _this.sendMessage = item.streetName + item.userName + item.postCode;???????????????? }???????????? });?????????} ????}});其他地方都正常運行了this.addressList返回的是json數據streetName userName postCode 都在json里有大概是這樣的json在html里 用 {{ sendMessage }} 引用數據了sendMessage并沒有改變值是不是不能這么寫函數?
查看完整描述

目前暫無任何回答

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

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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