replyItem.vue
2 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
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
99
100
101
102
<template>
<div class="reply-item">
<Icon
name="icon-user02"
:style="{ color: replyHeaderColor }"
class="item-img"
></Icon>
<div class="reply-box">
<div class="box-content">
<div class="reply-user">
<span class="reply-name">{{ replyUser }}</span>
<span class="by-reply-name">@ {{ byReplyUser }}:</span>
</div>
<div v-html="replyContent" class="reply-content"></div>
</div>
<div class="reply-date">
{{ replyTime | formatTime("yyyy-MM-dd hh:mm:ss") }}
</div>
</div>
</div>
</template>
<script>
export default {
name: "replyItem",
components: {},
props: {
byReplyUser: {
type: String,
default: "",
},
replyContent: {
type: String,
default: "",
},
replyHeaderColor: {
type: String,
default: "",
},
replyTime: {
type: String,
default: "",
},
replyUser: {
type: String,
default: "",
},
},
computed: {},
data() {
return {};
},
watch: {},
created() {},
mounted() {},
beforeDestroy() {},
methods: {},
};
</script>
<style lang="less" scoped>
.reply-item {
background-color: @thinBgColor;
padding: 10px 20px;
margin-left: 42px;
margin-bottom: 10px;
border-radius: 10px;
display: flex;
align-items: flex-start;
.item-img {
font-size: 32px;
margin-right: 10px;
}
.reply-box {
flex: 1;
.box-content {
.reply-user {
font-size: 14px;
line-height: 24px;
.reply-name {
color: @mainColor;
}
.by-reply-name {
color: @warningColor;
}
}
.reply-content {
flex: 1;
font-size: 14px;
line-height: 24px;
color: @thinColor;
}
}
.reply-date {
font-size: 12px;
color: @borderBoldColor;
margin-top: 2px;
text-align: right;
}
}
}
</style>