需求:在表格中使用el-switch开关 要求文字在开关内显示 、 官网给的不符合我们的要求 点击开关时给用户提示 是否启用禁用该状态 ?废话不多说 上代码 效果图你扒拉扒拉 见最后 看看是不是你需要的
1、HTML部分
<el-table-column label="状态" align="center" min-width="100">
<template slot-scope="scope">
<el-switch
class="switch"
:inactive-value = 0
:active-value = 1
active-text="已启用"
inactive-text="未启用"
active-color="#1890ff"
inactive-color="#c0c0c0"
v-model= scope.row.isEffective
@change=