<template>
       <i-switch v-model="switch1" size="large" :true-color="truecolor"  :false-color="falsecolor">
        <span slot="open">{{ openlabel}}</span>
        <span slot="close">{{closelabel}}</span>
      </i-switch>
</template>
<script>
import { refQuery } from "@/api/meta";
export default {
  name: "switchs",
  components: {},
  model: {
    prop: "value",
    event: "change"
  },
  props: {
    value: {
      type: Boolean,
      default() {
        return false;
      }
    },
    truecolor:String,
    falsecolor:String,
    openlabel:String,
    closelabel:String
  },
  data() {
    return {
      switch1: this.value,
    };
  },
  watch: {
    value(nv, ov) {
      this.switch1 = nv;
    }
  },
  methods: {
    onchange(v) {
      this.$emit("change", this.switch1);
    }
  },
  created() {

  },
  mounted() {}
};
</script>
<style>
</style>
