久久久久久久视色,久久电影免费精品,中文亚洲欧美乱码在线观看,在线免费播放AV片

<center id="vfaef"><input id="vfaef"><table id="vfaef"></table></input></center>

    <p id="vfaef"><kbd id="vfaef"></kbd></p>

    
    
    <pre id="vfaef"><u id="vfaef"></u></pre>

      <thead id="vfaef"><input id="vfaef"></input></thead>

    1. 站長(zhǎng)資訊網(wǎng)
      最全最豐富的資訊網(wǎng)站

      vuejs el有什么用

      在vuejs中,el的作用為:指明Vue實(shí)例的掛載目標(biāo),會(huì)提供一個(gè)在頁(yè)面上已存在的DOM元素作為Vue實(shí)例的掛載目標(biāo);在實(shí)例掛載之后,元素可以使用“vm.$el”訪問(wèn)。

      vuejs el有什么用

      本教程操作環(huán)境:windows7系統(tǒng)、vue2.9.6版,DELL G3電腦。

      vue官方API文檔中,對(duì)el有如下描述:

      https://cn.vuejs.org/v2/api/#el

      vuejs el有什么用

      el 的作用大家都知道,用于指明 Vue 實(shí)例的掛載目標(biāo)。我們重點(diǎn)關(guān)注上面兩個(gè)紅色嘆號(hào)部分,總結(jié)一下就是:如果存在 render 函數(shù)或 template 屬性,則掛載元素會(huì)被 Vue 生成的 DOM 替換;否則,掛載元素所在的 HTML 會(huì)被提取出來(lái)用作模版

      <!DOCTYPE html> <html>   <head>     <meta charset="utf-8">     <title></title>   </head>   <body>     <div id="ppp"></div>   </body> </html>

      示例1: render 函數(shù)渲染的 DOM 替換 <p id="ppp"></p>

      new Vue({   el: '#ppp',   router,   store,    render: h => h(App) })

      vuejs el有什么用

      示例2:字符串模版替換 <p id="ppp"></p>

      new Vue({   el: '#ppp',   router,   components: { App },   template: '<App/>' })

      vuejs el有什么用

      示例3:手動(dòng)掛載且不存在render函數(shù)和template屬性

      new Vue({   router,   store, }).$mount('#ppp')

      vuejs el有什么用

      贊(0)
      分享到: 更多 (0)
      網(wǎng)站地圖   滬ICP備18035694號(hào)-2    滬公網(wǎng)安備31011702889846號(hào)