VideoCallComponent.vue 587 B

12345678910111213141516171819202122
  1. <template>
  2. <view class="im-chat-text" data-id="message.id">
  3. <text v-if="message.video" class="cuIcon cuIcon-record"></text>
  4. <text v-if="!message.video" class="cuIcon cuIcon-dianhua"></text>
  5. <text class="duration">{{
  6. message.result ? Math.ceil((message.duration ?? 0) / 60000) + '分钟' : '未接通'
  7. }}</text>
  8. </view>
  9. </template>
  10. <script setup lang="ts">
  11. import type VideoCallMessage from '../mode/VideoCallMessage'
  12. interface Props<T> {
  13. message: T
  14. }
  15. defineProps<Props<VideoCallMessage>>()
  16. </script>
  17. <style scoped>
  18. .duration {
  19. margin-left: 5px;
  20. }
  21. </style>