开关 去掉v-if

This commit is contained in:
贾二小 2021-11-28 08:25:22 +00:00 committed by Gitee
parent 9e349f3e56
commit c3fb3bb5eb
1 changed files with 1 additions and 1 deletions

View File

@ -43,7 +43,7 @@
<el-table-column label="键值" prop="key" width="150"></el-table-column>
<el-table-column label="是否有效" prop="yx" width="100">
<template #default="scope">
<el-switch v-if="scope.row.yx" v-model="scope.row.yx" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_yx" active-value="1" inactive-value="0"></el-switch>
<el-switch v-model="scope.row.yx" @change="changeSwitch($event, scope.row)" :loading="scope.row.$switch_yx" active-value="1" inactive-value="0"></el-switch>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="right" width="140">