第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問(wèn)題,去搜搜看,總會(huì)有你想問(wèn)的

子組件computed屬性改變視圖不改變

子組件computed屬性改變視圖不改變

白豬掌柜的 2019-03-19 19:36:43
父組件:<parent :date_schedule="date_schedule"></parent>子組件:props: {     date_schedule:{        type:Array,        default: []     },   },   data () {    return {       ...     }   },   watch: {     date_schedule: {         handler(newVal,oldVal) {            console.log(newVal)            console.log(oldVal)            //console.log('date_schedule:update');             //this.update_calendar_schedule();         },         deep: true     },     table_data: {         handler(value) {            //console.log('table_data:update');             //this.update_calendar_schedule();         },         deep: true     },   },   computed: {     table_data:{        get: function() {            return this.date_schedule;         },        set: function(value) {            console.log(value);         }     },   },子組件中使用table_data來(lái)渲染出一個(gè)table。當(dāng)父組件的date_schedule修改時(shí),子組件的date_schedule和table_data都有變化,但是子組件中的table視圖卻不隨變化而更新,顯示的永遠(yuǎn)是還是上一次table_data數(shù)據(jù)。我知道是數(shù)據(jù)檢測(cè)變化的問(wèn)題,但始終找不出是哪里的問(wèn)題,請(qǐng)大家?guī)兔匆幌聗謝謝了
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 608 瀏覽
慕課專(zhuān)欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢(xún)優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)