Vue中Switch开关的实现

1、介绍

Switch开关为element-ui中的开关控件;

2、页面代码

<el-switch
  v-model="rohs"
  active-color="#13ce66"
  inactive-color="#ff4949">
</el-switch>

3、JS代码

<script>
  export default {
    data() {
      return {
        rohs: true,
      }
    }
  };
</script>


版权声明:本文为qq_27474555原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。