forked from vuejs/vue-cli
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathProjectPluginItem.vue
89 lines (75 loc) · 1.95 KB
/
ProjectPluginItem.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
<template>
<div class="project-plugin-item list-item">
<ItemLogo :image="plugin.logo"/>
<ListItemInfo
:name="plugin.id"
:link="plugin.website"
show-description
>
<span slot="description" class="plugin-description">
<span class="info version">
<span class="label">{{ $t('components.project-plugin-item.version') }}</span>
<span class="value">{{ plugin.version.current }}</span>
</span>
<span class="info latest">
<span class="label">{{ $t('components.project-plugin-item.latest') }}</span>
<VueIcon
v-if="plugin.version.current !== plugin.version.latest"
icon="warning"
class="top medium"
/>
<span class="value">{{ plugin.version.latest }}</span>
</span>
<span v-if="plugin.official" class="info">
<VueIcon
icon="star"
class="top medium"
/>
{{ $t('components.project-plugin-item.official') }}
</span>
<span v-if="plugin.installed" class="info">
<VueIcon
icon="check_circle"
class="top medium"
/>
{{ $t('components.project-plugin-item.installed') }}
</span>
<span v-if="plugin.description" class="package-description">
{{ plugin.description }}
</span>
</span>
</ListItemInfo>
</div>
</template>
<script>
export default {
props: {
plugin: {
type: Object,
required: true
}
}
}
</script>
<style lang="stylus" scoped>
@import "~@/style/imports"
.project-plugin-item
padding $padding-item
h-box()
box-center()
.list-item-info
flex 100% 1 1
width 0
.plugin-description
margin-right $padding-item
.label
opacity .7
.info
display inline-block
space-between-x($padding-item)
>>> > *
space-between-x(4px)
.package-description
font-style italic
opacity .7
</style>