<el-table-column
label="是否置顶">
<template slot-scope="scope">
<el-switch
v-model="scope.row.top"
active-text="是"
inactive-text="否"
:active-value="1"
:inactive-value="0"
@change="updateStatus(scope.row)">
</el-switch>
</template>
</el-table-column>
update pr_video
<set>
<if test=" top != null and top != ''">
top = #{top},
</if>
<if test=" status != null">
status = #{status},
</if>
</set>
where id = #{id} limit 1
前端传递0 在盘判断的时候回把0判断为’’ 从而更新不了