使用v-if页面不及时刷新
1.使用v-if改变了值,而vue的值没有及时刷新,解决办法,使用key,设置key来实现及时刷新<el-table-columnv-model="roles" v-if="roles!='MANAGER'" label="操作" width="100px" align="center" :key="del"><template slot-scope="{row}"><
·
1.使用v-if改变了值,而vue的值没有及时刷新,解决办法,使用key,设置key来实现及时刷新:key=“1”,设置固定值
<el-table-column v-model="roles" v-if="roles!='MANAGER'" label="操作" width="100px" align="center" :key="1">
<template slot-scope="{row}">
<el-button v-if="row.providerState==1" size="small" type="primary" @click.native="delCityProvider(row.id)">
取消
</el-button>
</template>
</el-table-column>
更多推荐
已为社区贡献2条内容
所有评论(0)