index.vue 873 Bytes
<template>
  <div v-if="list && list.length" class="warn-wrapper">
    <div v-for="warn in list"
         :key="warn"
         class="warn-item"
         :style="storeWarnList[warn].style">
      {{ storeWarnList[warn].label }}
    </div>
  </div>
</template>

<script>
import { keyBy } from "lodash-es";
import { storeWarnList } from "@/views/performance/constant/performance";

export default {
	name: "",
	props: {
		list: {
			type: Array,
			default: () => ([]),
		},
	},
	data() {
		return {
			storeWarnList: keyBy(storeWarnList, "key"),
		};
	},
	computed: {

	},
	mounted() {

	},
	methods: {

	},
};
</script>

<style scoped lang="scss">
.warn-wrapper {
	display: flex;
	align-content: center;
	column-gap: 6px;
	.warn-item {
		padding: 2px 4px;
		border-radius: 3px;
		font-weight: 400;
		font-size: 8px;
		line-height: 12px;
		text-align: center;
	}
}
</style>