必须使用slot插槽 自定义组件里至少要有一个slot,否则不生效 只有一个slot的情况,slot必须在第一级view里否则不生效 想要复杂层级的插槽必须使用具名插槽 具名插槽 自定义组件里使用name=“插槽名” 调用的时候必须使用template v-slot:插槽名来调用 <template v-slot:header> <view>Here might be a page title</view> </template> <