一、内容插槽
二、后备插槽
三、作用域插槽
主要是用来访问子组件中的数据
四、具名插槽
主要是用于页面需要用多个插槽,每个插槽都有自己的名字
<base-layout>
<template v-slot:header>
<h1>Here might be a page title</h1>
</template>
<template v-slot:default>
<p>A paragraph for the main content.</p>
<p>And another one.</p>
</template>
<template v-slot:footer>
<p>Here's some contact info</p>
</template>
</base-layout>