Vue_使用插槽(slot)

當父組件向子組件傳值的時候,有時候,父組件傳的並非單純的數值、字符串,有多是帶標籤(DOM)的數據,那麼如何傳值呢?html 若是咱們像正常父向子傳值那樣操做。markdown <slott content="<p>hello,slot</p>"></slott> 1 子組件:this <template> <div class="slott"> <div>{{content1}}</div>
相關文章
相關標籤/搜索