zxl
2025-05-23 5d5b0f7ab0f34019e11901ddcd59cd8b51ea9ff9
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
<template>
  <div class="revoke-message">
    <div class="content">
      <span v-if="$store.state.user.id == item.user_id">
        你撤回了一条消息 | {{ sendTime(item.created_at) }}
      </span>
      <span v-else-if="item.talk_type == 1">
        对方撤回了一条消息 | {{ sendTime(item.created_at) }}
      </span>
      <span v-else>
        "{{ item.nickname }}" 撤回了一条消息 | {{ sendTime(item.created_at) }}
      </span>
    </div>
  </div>
</template>
<script>
import { formatTime as sendTime } from "@/utils/functions";
 
export default {
  name: "RevokeMessage",
  props: {
    item: {
      type: Object,
    },
  },
  methods: {
    sendTime,
  },
};
</script>
<style lang="less" scoped>
.revoke-message {
  display: flex;
  justify-content: center;
 
  .content {
    margin: 10px auto;
    background-color: #f5f5f5;
    font-size: 11px;
    line-height: 30px;
    padding: 0 8px;
    word-break: break-all;
    word-wrap: break-word;
    color: #979191;
    user-select: none;
    font-weight: 300;
    display: inline-block;
    border-radius: 3px;
 
    span {
      margin: 0 5px;
    }
 
    a {
      color: #939596;
      cursor: pointer;
      font-size: 12px;
      font-weight: 400;
 
      &:hover {
        color: black;
      }
    }
  }
}
</style>