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

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

萌新求教!Vue this.$nextTick() 之后再執(zhí)行,導(dǎo)致渲染不準(zhǔn)確各位有什么建議?

萌新求教!Vue this.$nextTick() 之后再執(zhí)行,導(dǎo)致渲染不準(zhǔn)確各位有什么建議?

眼眸繁星 2019-11-03 10:16:55
問(wèn)題this.$nextTick(()=>{this.$refs.multipleTable.toggleAllSelection()this.isChecked=false})注意:this.$refs.multipleTable.toggleAllSelection()必須放在this.$nextTick()里面執(zhí)行才能生效如上所示我希望先執(zhí)行this.$refs.multipleTable.toggleAllSelection(),再this.isChecked=false,但是經(jīng)過(guò)測(cè)試發(fā)現(xiàn)this.isChecked=false總是在前執(zhí)行導(dǎo)致頁(yè)面渲染不正確弱雞解決法this.$nextTick(()=>{this.$refs.multipleTable.toggleAllSelection()setTimeout(()=>{this.isChecked=false},100);})這樣可以解決這個(gè)問(wèn)題,但是總感覺不太好嘗試過(guò)封裝asyncawit但是無(wú)效如下:constnextTickAsync=()=>{returnnewPromise((resolve,reject)=>{this.$nextTick(()=>{this.$refs.multipleTable.toggleAllSelection();resolve(true)})})}constisCheckedAsycn=()=>{returnnewPromise((resolve,reject)=>{this.$nextTick(()=>{this.isChecked=falseresolve(true)})})}(async()=>{awaitnextTickAsync()awaitisCheckedAsycn()})()求問(wèn)解決方法?如何先執(zhí)行完this.$nextTick()在執(zhí)行后續(xù)的this.isChecked=false
查看完整描述

2 回答

?
千巷貓影

TA貢獻(xiàn)1829條經(jīng)驗(yàn) 獲得超7個(gè)贊

this.$refs.multipleTable.toggleAllSelection()
this.$nextTick(()=>{
this.isChecked=false
})
                            
查看完整回答
反對(duì) 回復(fù) 2019-11-03
?
人到中年有點(diǎn)甜

TA貢獻(xiàn)1895條經(jīng)驗(yàn) 獲得超7個(gè)贊

注意:this.$refs.multipleTable.toggleAllSelection()必須放在this.$nextTick()里面執(zhí)行才能生效
                            
查看完整回答
反對(duì) 回復(fù) 2019-11-03
  • 2 回答
  • 0 關(guān)注
  • 258 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號(hào)

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