1.数组
<GXTchartcopy :list="FJenergyX" ref="GXTchartREF" />
props: {
list: {
type: Array,
default: () => [],
},
},
2.字符串
//父页面,向子元素my-com传递值:父子传参
<my-com title="你是子元素"/>
//子页面
//props:通过属性接收父元素传递的参数
props:['title']
<div>title:{{title}}</div>
3.对象
props: {
attrs: {
type: Object,
default () {
return {}
}
}
},