1.插槽 (组件components)
2.具名插槽:slot 加入name属性,父组件修改根据slot = name
components:{
"cpn : { template : '#cpn'}
}
2.作用域
子组件及父组件作用域;
3.作用域插槽
父组件获取子组件插槽的数据
{{slot.data}}
pgdrng 2020-11-04 13:03 原文
1.插槽 (组件components)
2.具名插槽:slot 加入name属性,父组件修改根据slot = name
components:{
"cpn : { template : '#cpn'}
}
2.作用域
子组件及父组件作用域;
3.作用域插槽
父组件获取子组件插槽的数据