<template>
  <div class="ihr-tag">
    <div class="tag" v-for="(item, index) in list"  @click="handleClick(item)" :key="index">{{item}}</div>
  </div>
</template>

<script>
export default {
  name: 'ihr-tag',
  props: {
    list: Array
  },
  data () {
    return {
      num: 0
    }
  },
  methods: {
    handleClick (item) {
      console.log('item', item)
      this.$emit('click', item)
    }
  }
}
</script>

<style lang="less" scoped>
.ihr-tag{
  display: flex;
}
.tag {
  padding: 2px 10px;
  border: 1px solid #999;
  border-radius: 4px;
  margin-right: 10px;
  display: flex;
}
</style>
