开关 switch
<el-table-column label="公开 | 隐藏" align="center" width="100"> <template slot-scope="scope"> <el-switch v-model="scope.row.dynamicStatus" :active-value="1" :inactive-value="0" active-text="公开" inactive-text="隐藏" @change="handleSwitchChange(scope.row)" ></el-switch> </template> </el-table-column>handleSwitchChange(row) { updateDynamic(row).then(response => { this.$modal.msgSuccess('操作成功') this.getList() }) },
<style> .el-switch__label--right { margin-left: -7px; } .el-switch__label--left { z-index: 1; left: 7px; font-size: 12px !important; } </style>
原文地址:https://blog.csdn.net/m0_60646036/article/details/142789218
免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!