index.vue
873 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<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>