允许父组件再子组件中指定位置插入内容
Son.vue
<button>
<slot></slot>
</button>
Father.vue
<v-button>
<i>Icon</i>
search
</v-button>
components: { "v-button": Son }
效果:
2023-10-31 16:13:40
允许父组件再子组件中指定位置插入内容
Son.vue
<button>
<slot></slot>
</button>
Father.vue
<v-button>
<i>Icon</i>
search
</v-button>
components: { "v-button": Son }
效果: