在使用element ui 时,使用el-table时,在template中添加了自定义组件后,发现删除时,只能删除只能删除最后一条记录了,去掉就正常。。。什么强制更新 forceUpdate,重新赋值都不好使,最后是通过增加一个key属性解决的,这个key不能使用scope.$index,得使用其它的唯一值。
<el-table-column prop="transNum" label="数量" min-width="30%" align="center">
<template slot-scope="scope">
<UnitAndNumberSelect
:key="scope.row.TimeStamp" />
</template>
</el-table-column>