-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTag.vue
72 lines (65 loc) · 1.26 KB
/
Tag.vue
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<template>
<span class="tag" :class="selectedTheme">
<span class="content">{{ tag }}</span>
<span class="close" @click="$emit('removeOneTagEvent',index)">x</span>
</span>
</template>
<script>
export default {
name: 'tag',
props : ["tag", "index", "tagColor"],
data () {
return {
selectedTheme : null
}
},
created(){
this.selectedTheme = this.tagColor;
}
}
</script>
<style scoped>
.success {
background-color: #D5EDDB;
border: 1px solid #c3e6cb;
color: #155724;
}
.primary {
color: #004085;
background-color: #cce5ff;
border-color: #b8daff;
}
.secondary {
color: #383d41;
background-color: #e2e3e5;
border-color: #d6d8db;
}
.info {
color: #0c5460;
background-color: #d1ecf1;
border-color: #bee5eb;
}
.warning {
color: #856404;
background-color: #fff3cd;
border-color: #ffeeba;
}
.danger {
color: #721c24;
background-color: #f8d7da;
border-color: #f5c6cb;
}
.tag {
padding: 10px;
cursor: default;
margin-right: 5px;
border-radius: 5px;
}
.tag * {
font-size: 14px;
}
.tag .close {
font-size: 12px;
cursor: pointer;
}
</style>