vue中阻止冒泡事件 @click.stop.native
<el-switchv-model="scope.row.isRecommend"active-color="#13ce66"inactive-color="#ff4949":active-value="1":inactive-value="0"@change="changeStatus($even...
·
<el-switch
v-model="scope.row.isRecommend"
active-color="#13ce66"
inactive-color="#ff4949"
:active-value="1"
:inactive-value="0"
@change="changeStatus($event, scope.row)"
@click.stop.native
>
</el-switch>
直接在其子组件或者子元素上加 @click.stop.native就可以了
更多推荐
已为社区贡献2条内容
所有评论(0)