widget-topic.vue
1.11 KB
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
<template>
<div v-if="topic" class="topic-wrap">
<div class="topic-icon">
<span class="iconfont icon-tag"></span>
</div>
<span class="topic-text">{{topic}}</span>
</div>
</template>
<script>
export default {
name: 'WidgetTopic',
props: {
topic: String,
}
};
</script>
<style type="scss">
.topic-wrap {
display: inline-block;
vertical-align: middle;
height: 44px;
line-height: 44px;
background-color: #f0f0f0;
border-radius: 22px;
box-sizing: border-box;
> * {
display: inline-block;
vertical-align: top;
}
.topic-icon {
width: 34px;
height: 34px;
line-height: 34px;
border-radius: 17px;
margin: 5px;
text-align: center;
background-color: #d0d0d0;
.iconfont {
font-size: 24px;
color: #fff;
display: block;
transform: scale(0.76, 0.76);
}
}
.topic-text {
font-size: 22px;
color: #9B9B9B;
margin-right: 16px;
max-width: 310px;
overflow: hidden;
text-overflow:ellipsis;
white-space: nowrap;
}
}
</style>