问题:
父组件中加载数据,部分数据传到子组件,通过子组件显示,切换页码之后,使用子组件显示的部分数据不刷新
解决办法:
类似v-for,给子组件加一个v-key,值唯一即可
<!-- 购买商品 -->
<el-table-column align="center" label="购买商品" min-width="100" fixed="right">
<template slot-scope="scope">
<item-info v-if="scope.row.stock_records" :item="scope.row.stock_records[0]" item-type="recharge" :key="scope.row.id">
</item-info>
</template>
</el-table-column>
加了之后就会更新了,原因暂时没深究,先记录一下