:key="Math.random()"
<Table
:tableConfig="tableConfig.tHead"
:tableTitle="tableConfig.tableName"
:tableData="tableData"
:paginationShow="false"
:config="tableConfig"
:key="Math.random()"
>
<!-- 退费课时 -->
<template v-slot:orderTimes="slotData">
<div v-if="!slotData.data.orderTimes" class="cellHover"
@click="refundClassHour(slotData.data.stcoId, slotData.data.courseType,slotData.index)">{{'请点击输入'}}</div>
<span v-else>{{slotData.data.orderTimes}}</span>
</template>
<!-- 退费金额 -->
<template v-slot:courseMoney="slotData">
<div class="cellHover">{{'请点击输入'}}</div>
</template>
</Table>
Table 是我封装的一个表格组件;将 :key="Math.random()" 写在组件标签上可以实现: 当表格数据变化后,页面渲染的数据也会自动变化; 将 :key="Math.random()" 直接写在el-table 也可以;
变化原因未知;