-
-
Notifications
You must be signed in to change notification settings - Fork 6.3k
/
Copy pathListItemInfo.vue
98 lines (87 loc) · 1.72 KB
/
ListItemInfo.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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
<template>
<div
class="list-item-info"
:class="{
selected
}"
>
<div class="name">
<slot name="name">
<span v-html="ansiColors(name)"/>
</slot>
</div>
<div v-if="description || link || showDescription" class="description">
<slot name="description">
<span v-html="ansiColors(description)"/>
</slot>
<a
v-if="link"
:href="link"
target="_blank"
class="more-info"
@click.stop="() => {}"
>
<VueIcon icon="open_in_new" class="medium top"/>
{{ $t('org.vue.components.list-item-info.more-info') }}
</a>
</div>
</div>
</template>
<script>
export default {
props: {
description: {
type: String,
default: ''
},
link: {
type: String,
default: null
},
name: {
type: String,
default: null
},
selected: {
type: Boolean,
default: false
},
showDescription: {
type: Boolean,
default: false
}
}
}
</script>
<style lang="stylus" scoped>
.list-item-info
v-box()
align-items stretch
justify-content center
.description
color $color-text-light
>>> :first-child
margin-right 4px
>>> .vue-ui-icon
svg
fill @color
.more-info
color $vue-ui-color-primary
padding 0 4px 0 2px
border-radius $br
display inline-block
.vue-ui-icon
>>> svg
fill @color
&:hover
color $vue-ui-color-light
background $vue-ui-color-primary
.vue-ui-icon
>>> svg
fill @color
&:active
background darken($vue-ui-color-primary, 10%)
&.selected
.name
color $vue-ui-color-primary
</style>