父元件給子元件傳遞一個物件item,發現用方法一的時候子元件中接收到的item裡每個屬性都會多出get/set方法,如果屬性比較多方法二太煩了,請教大神們是怎麼做的
方法一:
<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>