index.vue 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. <template>
  2. <div
  3. :class="{
  4. 'mulitple-select-panel': true,
  5. 'mulitple-select-panel-mobile': isMobile,
  6. }"
  7. >
  8. <div
  9. class="forward-button"
  10. @click="oneByOneForwardMessage"
  11. >
  12. <Icon
  13. :file="ForwardEachIcon"
  14. :size="iconSize"
  15. />
  16. <span
  17. :class="{
  18. 'forward-button-text': true,
  19. 'forward-button-text-mobile': isMobile,
  20. }"
  21. >{{ TUITranslateService.t('TUIChat.逐条转发') }}</span>
  22. </div>
  23. <div
  24. class="forward-button"
  25. @click="mergeForwardMessage"
  26. >
  27. <Icon
  28. :file="ForwardMergeIcon"
  29. :size="iconSize"
  30. />
  31. <span
  32. :class="{
  33. 'forward-button-text': true,
  34. 'forward-button-text-mobile': isMobile,
  35. }"
  36. >{{ TUITranslateService.t('TUIChat.合并转发') }}</span>
  37. </div>
  38. <div
  39. class="forward-button"
  40. @click="cancelMultipleSelect"
  41. >
  42. <Icon
  43. class="cancel-button-icon"
  44. :file="AddIcon"
  45. :size="iconSize"
  46. />
  47. <span
  48. :class="{
  49. 'forward-button-text': true,
  50. 'forward-button-text-mobile': isMobile,
  51. }"
  52. >
  53. {{ TUITranslateService.t('TUIChat.取消') }}
  54. </span>
  55. </div>
  56. </div>
  57. </template>
  58. <script lang="ts" setup>
  59. import { ref } from '../../../adapter-vue';
  60. import {
  61. TUITranslateService,
  62. } from '@tencentcloud/chat-uikit-engine';
  63. import Icon from '../../common/Icon.vue';
  64. import ForwardEachIcon from '../../../assets/icon/forward-each.svg';
  65. import ForwardMergeIcon from '../../../assets/icon/forward-merge.svg';
  66. import AddIcon from '../../../assets/icon/add-circle.svg';
  67. import { isMobile } from '../../../utils/env';
  68. interface IEmits {
  69. (key: 'oneByOneForwardMessage'): void;
  70. (key: 'mergeForwardMessage'): void;
  71. (key: 'toggleMultipleSelectMode'): void;
  72. }
  73. const emits = defineEmits<IEmits>();
  74. const iconSize = ref(isMobile ? '25px' : '30px');
  75. function oneByOneForwardMessage() {
  76. emits('oneByOneForwardMessage');
  77. }
  78. function mergeForwardMessage() {
  79. emits('mergeForwardMessage');
  80. }
  81. function cancelMultipleSelect() {
  82. emits('toggleMultipleSelectMode');
  83. }
  84. </script>
  85. <style lang="scss" scoped>
  86. :not(not) {
  87. display: flex;
  88. flex-direction: column;
  89. box-sizing: border-box;
  90. min-width: 0;
  91. }
  92. .mulitple-select-panel {
  93. height: 196px;
  94. border-top: 1px solid #ebebeb;
  95. flex-direction: row;
  96. justify-content: space-around;
  97. align-items: center;
  98. background-color: #EBF0F6;
  99. &-mobile {
  100. height: 64px;
  101. padding-bottom: 15px;
  102. flex-direction: row;
  103. align-items: flex-end;
  104. }
  105. }
  106. .forward-button {
  107. justify-content: center;
  108. align-items: center;
  109. &-text {
  110. margin-top: 8px;
  111. font-size: 12px;
  112. &-mobile {
  113. margin-top: 2px;
  114. }
  115. }
  116. .cancel-button-icon {
  117. transform: rotate(45deg);
  118. }
  119. }
  120. </style>