<template>
 
  <AreaTag :tag-name="label" :class="tagClass" />
</template>

<script setup>
 
import { h, defineComponent } from 'vue'

const AreaTag = defineComponent({
  name: 'AreaTag',
  props: {
    tagName: { type: String, default: '标签名称' },
  },
  setup(props) {
    return () => h('div', { class: 'tag-wrapper' }, props.tagName)
  },
})

defineProps({
  label: { type: String, required: true },
  tagClass: { type: String, default: 'tag3' },
})
</script>

<style scoped>
 
.tag-wrapper {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 24px;
  padding: 0 8px;
  line-height: 24px;
  text-align: center;
  font-family: Microsoft YaHei, sans-serif;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0px;
  box-sizing: border-box;
  border-radius: 4px;
  border: 1px solid rgba(183, 235, 143, 1);
  background: rgba(246, 255, 237, 1);
  color: rgba(82, 196, 26, 1);
}
 
.tag3 .tag-wrapper,
:deep(.tag3) {
  border: 1px solid rgba(174, 214, 255, 1);
  background: rgba(246, 250, 255, 1);
  color: rgba(5, 95, 194, 1);
}
 
.tag1 .tag-wrapper,
:deep(.tag1) {
  border: 1px solid rgba(255, 163, 158, 1);
  background: rgba(255, 241, 240, 1);
  color: rgba(245, 34, 45, 1);
}
 
.tag6 .tag-wrapper,
:deep(.tag6) {
  border: 1px solid rgba(145, 202, 255, 1);
  background: rgba(230, 244, 255, 1);
  color: rgba(22, 119, 255, 1);
}
 
.tag8 .tag-wrapper,
:deep(.tag8) {
  border: 1px solid rgba(255, 229, 143, 1);
  background: rgba(255, 251, 230, 1);
  color: rgba(250, 173, 20, 1);
}
 
.tag9 .tag-wrapper,
:deep(.tag9) {
  border: 1px solid rgba(255, 213, 145, 1);
  background: rgba(255, 247, 230, 1);
  color: rgba(250, 140, 22, 1);
}
 
.tag4 .tag-wrapper,
:deep(.tag4) {
  border: 1px solid rgba(211, 173, 247, 1);
  background: rgba(249, 240, 255, 1);
  color: rgba(114, 46, 209, 1);
}
</style>
