父组件中存在数组categoryList想把这个数组传递到子组件中,需要自定义事件来传递到子组件,那需要在父组件的哪里自定义事件呢?父组件是直接遍历数组的如果这样in :categoryList="in categoryList"好像是错误的语法,不知道在哪自定义事件
父组件
<div>
<son :list="数组变量'></son>
</div>
引入子组件 import son form './son'
computed {
son
}
子组件
porps:['list'] //传递的变量
console.log(this.list)
因为父组件是直接循环数组的,在循环中自定义事件绑定数组好像不对