vue.js插槽Slot的用法與具名插槽、做用域插槽的使用

一、基本用法 插槽指容許將自定義的組件像普通標籤同樣插入內容vue import Vue from 'vue' // 定義組件componentOne const compoentOne = { template: ` <div :style="style1"> <slot></slot> // 定義插槽 </div> `
相關文章
相關標籤/搜索