父组件给子组件传递一个对象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>
料青山看我应如是
相关分类