chatText.vue 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="chatText" @click="click">
  3. <view class="chat-nickname">{{chat.member.nickname}}</view>
  4. <view class="chat-content"><text class="text">{{chat.content}}</text></view>
  5. </view>
  6. </template>
  7. <script>
  8. var timer = null
  9. export default {
  10. name: "chatText",
  11. props: ['chat', 'width', 'height'],
  12. data() {
  13. return {
  14. play: false,
  15. dblClick: false,
  16. autoplay: true,
  17. muted: true,
  18. };
  19. },
  20. mounted() {
  21. },
  22. methods: {
  23. click() {
  24. let _this = this
  25. _this.$emit('textClick', true);
  26. },
  27. },
  28. created() {}
  29. }
  30. </script>
  31. <style>
  32. .chatText {
  33. display: flex;
  34. /* padding: 10rpx; */
  35. /* margin-bottom: 20rpx; */
  36. /* background: rgba(0, 0, 0, 0.1); */
  37. /* border-radius: 60rpx; */
  38. /* flex-direction: row; */
  39. /* justify-content: left; */
  40. /* line-height: 28rpx; */
  41. }
  42. .chat-nickname {
  43. color: #14ECCC;
  44. /* min-width: 100rpx; */
  45. font-size: 28rpx;
  46. /* display: inline-block; */
  47. /* width: 140rpx; */
  48. height: 28rpx;
  49. line-height: 28rpx;
  50. /* vertical-align: middle; */
  51. margin-right: 10rpx;
  52. }
  53. .chat-content {
  54. flex-direction: row;
  55. flex-wrap: nowrap;
  56. }
  57. .text {
  58. /* width: ; */
  59. color: #e4e4e4;
  60. font-size: 28rpx;
  61. }
  62. </style>