message-room-default.vue 853 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <template>
  2. <div
  3. :class="[
  4. 'room-default',
  5. isUniFrameWork && 'room-default-uni',
  6. props.message.flow === 'in' ? 'room-default-in' : 'room-default-out',
  7. ]"
  8. >
  9. {{ TUITranslateService.t("message.custom.自定义消息") }}
  10. </div>
  11. </template>
  12. <script setup lang="ts">
  13. import { TUITranslateService, IMessageModel } from '@tencentcloud/chat-uikit-engine';
  14. import { isUniFrameWork } from '../../../utils/env';
  15. interface IProps {
  16. message: IMessageModel;
  17. }
  18. const props = withDefaults(defineProps<IProps>(), {
  19. message: () => ({} as IMessageModel),
  20. });
  21. </script>
  22. <style lang="scss" scoped>
  23. .room-default {
  24. padding: 12px;
  25. font-size: 14px;
  26. &-uni{
  27. padding: 0;
  28. }
  29. &-in {
  30. background: #fbfbfb;
  31. border-radius: 0 10px;
  32. }
  33. &-out {
  34. background: #dceafd;
  35. border-radius: 10px 0 10px 10px;
  36. }
  37. }
  38. </style>