<template>
  <view :class="`wl_enum_tag wl_tag_size_${size}`" :style="styleObj">
    {{ props?.Enums?.[props.value]?.text }}
  </view>
</template>
<script setup lang="ts">
import { onMounted, ref } from "vue";
const styleObj = ref();
const props = defineProps(["Enums", "value", "type", "size"]);
onMounted(() => {
  styleObj.value = { color: props?.Enums?.[props.value]?.color };
});
</script>
<style scoped lang="scss">
.wl_enum_tag {
  border-radius: 4rpx;
  font-size: 20rpx;
  padding: 2rpx 7rpx;
  background-color: #f8f8f8;
  color: #000;
  display: inline-block;
}

.wl_tag_size_md {
  padding: 3rpx 12rpx;
  font-size: 23rpx;
}
</style>
