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
| <template>
| <div class="tag-container flex flex-wrap">
| <div class="tag-item flex items-center" v-for="item in tagList">
| <div class="label text-xs text-gray-500 mr-2">{{ item.name }}</div>
| <div class="tag flex-shrink-0" :style="{backgroundColor: item.bgColor, borderColor: item.borderColor}"></div>
| </div>
| </div>
| </template>
|
| <script setup>
| import {ref} from 'vue';
|
| const tagList = ref([
| {
| name: '已答',
| bgColor: '#3680fa',
| borderColor: '#3680fa',
| },
| {
| name: '当前',
| bgColor: '#ffffff',
| borderColor: '#3680fa',
| },
| {
| name: '未答',
| bgColor: '#ffffff',
| borderColor: '#DCDFE6',
| },
| ])
|
| </script>
|
| <style lang="scss" scoped>
| .tag-item {
| margin-right: 14px;
| &:last-of-type {
| margin: 0;
| }
| }
| .tag {
| width: 12px;
| height: 12px;
| border: 1px solid #fff;
| background-color: #fff;
| }
| </style>
|
|