一、Vue 插槽 (slot)
- 所谓的插槽就是先预留一个位置,然后去想要的数据填充它
1. 组件插槽的作用
- 父组件向子组件传递内容 (父组件向子组件传递数据过去填充子组件预留的插槽)
2. 插槽的位置(子组件)
Vue.component('alert-box', {
template: `
<div
1. 组件插槽的作用
2. 插槽的位置(子组件)
Vue.component('alert-box', {
template: `
<div