<template>
  <div class="k-tag">
     {{label}}
     <i class="k-tag-close icon-close" @click.stop="$emit('close', index, id)"></i>
  </div>
</template>
<script>
// import emitter from "yt-ui/src/mixins/emitter";
// import transferDom from "yt-ui/src/directives/transferDom";
// import winScroll from "yt-ui/src/directives/winScroll";
// import docClick from "yt-ui/src/directives/docClick";
// import transferDom from "yt-ui/src/directives/transferDom";
export default {
  name: "YTag",
  props: {
    label: {
      type: String,
      default: ''
    },
    id: {
      type: [String, Number],
      default: ''
    },
    index: {
      type: Number,
      default: 0
    }
  },
  watch: {

  },
  data() {
    return {
    }
  },
  mounted() {

  },
  computed: {
    // classes() {
    //   return [
    //     "k-select",
    //     {
    //       ["k-select-disabled"]: this.disabled,
    //       ["k-select-open"]: this.visible
    //     }
    //   ];
    // },
  },
  methods: {
  }
}
</script>
<style lang="less">
@import '../styles/src/global.less';
.k-tag{
  position: relative;
  display: inline-block;
  margin-right: 10px;
  height: 20px;
  line-height: 20px;
  padding: 3px 19px 3px 5px;
  color: @333;
  font-size: 12px;
  background: #EAF2FE;
  .k-tag-close{
    position: absolute;
    right: 2px;
    top: 6px;
    display: block;
    width: 15px;
    height: 15px;
    line-height: 17px;
    text-align: center;
    font-size: 13px;
    color:  #9AB4D8;
    &:hover{
      background: #C5D8F2;
      border-radius: 50%;
    }
  }
}
</style>

