The parent component passes an object item to the child component. It is found that when using method one, each attribute in the item received in the child component will have an additional get/set method. If there are many attributes, method two is too annoying. Please ask an expert for advice. How did they do it
方法一:
<img-box :obj='item'></img-box>
方法二:
<img-box
:value='item.value'
:activeParam='item.activeParam'
:aimUrl='item.aimUrl'
:jumpType='item.jumpType'
:setTop='item.setTop'
:setWidth='item.setWidth'
:themeId='item.themeId'
:todocode='item.todocode'
:toolId='item.toolId'
:ttid='item.ttid'
></img-box>
Just pass an object directly, and then the sub-component uses the object to receive it
Parent component: <img-box :obj='item'></img-box>
Child component: props:{
I will receive the item directly