我使用v-for生成了一列卡片,想要使用el-switch来选择显示生效或者不生效的卡片,在改变el-switch状态调用的update()函数中,我如何重新刷新v-for来显示新数据?
<div class="section" >
<el-switch class="switch" v-model="switchvalue1" active-text="显示生效记录"
inactive-text="显示所有历史记录" @change="update()"></el-switch>
<div class="list_section">
<el-row :span="5" v-for="item in recommend_content" :key="item.id" offset="1"
style="margin-left:0%;margin-top:1.5%;width: 95%;">
<el-card :body-style="{ padding: '0px' }" @click.native="pushToUrl(item.id)">
</el-card>
</el-row>
</div>
</div>