值为字符串时

<el-switch v-model="state" active-value="a" nactive-value="b"></el-switch>

值为Number时,必须有前面加上:

<el-switch v-model="state" :active-value="1" :inactive-value="0"></el-switch>