Vue_使用插槽(slot)

当父组件向子组件传值的时候,有时候,父组件传的并非单纯的数值、字符串,有多是带标签(DOM)的数据,那么如何传值呢?html 若是咱们像正常父向子传值那样操做。markdown <slott content="<p>hello,slot</p>"></slott> 1 子组件:this <template> <div class="slott"> <div>{{content1}}</div>
相关文章
相关标签/搜索