<template>
      <i-switch v-model="sv"  :true-color="trueColor?trueColor:'#2d8cf0'" :false-color="falseColor?falseColor:'#c5c8ce'" :size="size?size:'large'"  :disabled="isDisabled">
        <span slot="open">
           <slot name="open">
             <span>开</span>
           </slot>
        </span>
        <span slot="close">
          <slot name="close">
                    <span>闭</span>
          </slot>
        </span>
      </i-switch>
</template>
<script>
import { refQuery } from '@/api/meta'
export default {
  name: "Switches",
  props: ['value','trueColor','falseColor','size','isDisabled'],
  model:{
    prop: 'value',
    event: 'change'
 },
  data() {
    return {
       ops:[],
       sv:false
    };
  },
  created() {
 
  },
  mounted(){

  },
  watch: {
    value(nv,ov){
       this.sv=nv;
    },
    sv(nv,ov){
      this.$emit("change",this.sv);
    }
  },
  computed: {},
  methods: {}
};
</script>
