<template>
  <div class="label">
    <div
      v-for="(item, index) in titleArr"
      :key="index"
      :style="{ color: item.color }"
      >{{ item.label }}</div
    >
  </div>
</template>
<script setup name="LABEL">
import { ref, watch, computed } from 'vue';
const props = defineProps({
  config: { type: Object },
});
const titleArr = computed(() => {
  let title = props.config.title;
  if (typeof props.config.title === 'string') {
    title = props.config.title.replace(/[\r|\n|\t]/g, '');
  }
  return JSON.parse(title || '[]');
});
</script>
<style lang="less" scoped>
.label {
  margin: 0 0 15px;
  font-size: 14px;
  // font-weight: bold;
  color: #262626;
  line-height: 24px;
}
</style>
