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

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

Vue2.0 如何動態(tài)切換組件?

Vue2.0 如何動態(tài)切換組件?

點(diǎn)擊按鈕切換組件 但切換不了js:var Rm={    template:'#aa', }var Wr={    template:'#bb', }var vm=new Vue({    el:'#app',    data:{        currentView:Rm,        picked:0     },    mounted:function(){     },    watch:{        'picked':function(val){            this.currentView=Wr                 console.log(this.currentView)         }     }, })html<script type="text/x-template" id="rm">     <div>123</div><script><script type="text/x-template" id="wr">     <div>456</div><script><component :is="currentView"></component>報錯內(nèi)容是 vue2.0.js:2611 [Vue warn]: Cannot find element: #wrvue2.0.js:2611 [Vue warn]: You are using the runtime-only build of Vue where the template option is not available. Either pre-compile the templates into render functions, or use the compiler-included build. (found in anonymous component - use the "name" option for better debugging messages.)
查看完整描述

1 回答

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

添加回答

舉報

0/150
提交
取消
微信客服

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

幫助反饋 APP下載

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

公眾號

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