<template>
  <div class="tag-wrapper" :class="classObject">
    {{ tagName }}
  </div>
</template>

<script setup>
import { ref, computed, onMounted } from 'vue'

const props = defineProps({
  tagName: {
    type: String,
    default: '标签名称'
  }
})

const classObject = computed(() => ({
  'tag1': props.tagName === '人工智能',
  'tag2': props.tagName === '生物科技',
  'tag3': props.tagName === '新一代通信网络',
  'tag4': props.tagName === '量子科技',
  'tag5': props.tagName === '新能源',
  'tag6': props.tagName === '集成电路',
  'tag7': props.tagName === '海洋',
  'tag8': props.tagName === '先进制造',
  'tag9': props.tagName === '新材料',
  'tag10': props.tagName === '航空航天',
  'tag11': props.tagName === '太空',
  'tag12': props.tagName === '深海',
  'tag13': props.tagName === '极地',
  'tag14': props.tagName === '核',
  'tag15': props.tagName === '其他',

}))



</script>

<style lang="scss" scoped>
.tag-wrapper {
  height: 24px;
  padding: 0 8px;
  line-height: 24px;
  text-align: center;
  font-family: Microsoft YaHei;
  font-style: Regular;
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0px;
  box-sizing: border-box;
  border-radius: 4px;
}

.tag1 {
  border: 1px solid rgba(255, 163, 158, 1);
  background: rgba(255, 241, 240, 1);
  color: rgba(245, 34, 45, 1);
}

.tag2 {
  border: 1px solid rgba(135, 232, 222, 1);
  background: rgba(230, 255, 251, 1);
  color: rgba(19, 168, 168, 1);
}

.tag3 {
  border: 1px solid rgba(174, 214, 255, 1);
  background: rgba(246, 250, 255, 1);
  color: rgba(5, 95, 194, 1);
}

.tag4 {
  border: 1px solid rgba(211, 173, 247, 1);
  background: rgba(249, 240, 255, 1);
  color: rgba(114, 46, 209, 1);
}

.tag5 {
  border: 1px solid rgba(183, 235, 143, 1);
  background: rgba(246, 255, 237, 1);
  color: rgba(82, 196, 26, 1);
}

.tag6 {
  border: 1px solid rgba(145, 202, 255, 1);
  background: rgba(230, 244, 255, 1);
  color: rgba(22, 119, 255, 1);
}

.tag7 {
  border: 1px solid rgba(156, 207, 245, 1);
  background: rgba(241, 247, 250, 1);
  color: rgba(15, 120, 199, 1);
}

.tag8 {
  border: 1px solid rgba(255, 229, 143, 1);
  background: rgba(255, 251, 230, 1);
  color: rgba(250, 173, 20, 1);
}

.tag9 {
  border: 1px solid rgba(255, 213, 145, 1);
  background: rgba(255, 247, 230, 1);
  color: rgba(250, 140, 22, 1);
}

.tag10 {
  border: 1px solid rgba(173, 198, 255, 1);
  background: rgba(240, 245, 255, 1);
  color: rgba(47, 84, 235, 1);
}

.tag11 {
  border: 1px solid rgba(173, 198, 255, 1);
  background: rgba(240, 245, 255, 1);
  color: rgba(47, 84, 235, 1);
}

.tag12 {
  border: 1px solid rgba(116, 146, 203, 1);
  background: rgba(230, 244, 255, 1);
  color: rgba(73, 104, 161, 1);
}

.tag13 {
  border: 1px solid rgba(214, 228, 255, 1);
  background: rgba(240, 245, 255, 1);
  color: rgba(133, 165, 255, 1);
}

.tag14 {
  border: 1px solid rgba(255, 187, 150, 1);
  background: rgba(255, 242, 232, 1);
  color: rgba(250, 84, 28, 1);
}

.tag15 {
  border: 1px solid rgba(183, 235, 143, 1);
  background: rgba(246, 255, 237, 1);
  color: rgba(82, 196, 26, 1);
}
</style>